fixed db migration issues with email uniqueness