fixing problem while migrating database from zero