c# - Entity Framework generate update script for dev/production -
i have been made few changes database locally , have been adding migrations , updating database via package manager console.
now i've checked in , deployed out dev server getting error:
the model backing 'myprojectcontext' context has changed since database created. consider using code first migrations update database (http://go.microsoft.com/fwlink/?linkid=238269).
i know telling me version of database out of date don't want drop database time im trying generate script manually run on database don't understand how can tell last migration dev db aware of , current, date one, ive tried below not working:
so if "added isimportant exceptions" last migration updated on dev server, , "set importantid identity specification" last update manually run locally, how generate right script dev?
turns out doing right needed full configuration name double quotes.
update-database -script -sourcemigration:"201507091527309_added isimportant exception" -targetmigration:"201507281410132_set importantid identity specification"
once ran generated script , able upgrade database.
Comments
Post a Comment