entity framework - Migrations over an existing database? -
i have been using code-first approach existing database mapping tables in dbcontext file , forth.
everything works great, i'd able migration on top of existing database structure without using automatically generated migration code create database scratch or setting automaticmigrationenabled = true
right getting error acceptable initial migration file not include existing structure:
unable update database match current model because there pending changes , automatic migration disabled. either write pending model changes code-based migration or enable automatic migration. set dbmigrationsconfiguration.automaticmigrationsenabled true enable automatic migration. can use add-migration command write pending model changes code-based migration.
what need run migration?
i found tip on youtube fabio scopel code first migrations - how update database schema.
Comments
Post a Comment