Resolve database migration issues