Last post Feb 24, 2013 05:26 PM by BrockAllen
Feb 24, 2013 05:15 PM|ydbn|LINK
I'm developing in MVC 5, EF 5.0 code first.
I can use database migration to update the developing localDb when the model is changed. However, after I published the project to a remote server, it shows the error of models being changed and migration required on the production web server which use a
full SQL database server.
I know I can delete the database on the production server and let it recreates the database. However, there are already user entered data in the tables.
Is there a way to apply the model/database changes without recreate the database?
Feb 24, 2013 05:26 PM|BrockAllen|LINK
The dirty little secret about migrations is that they are different per-provider and DB engine. This means migrations for SqlServerCompact are different than SqlServer. I don't use localDb myself, but I'd imagine those also might be different.