Updates database structure