entity framework - How would EF find Down() migration on deployment of previous version? -


we have site uses code first migrations , @ moment deployment partly manual, in scripts applied hand after new site folder in place on server.

i want move using web deploy , getting application_start apply migrations automatically, concerned when rolling per-migration site version. mental logic tells me old version not have appropriate down migration available undo more recent migration.

am correct or missing something?

martyn

how generating contents of up/down methods in migration code? if you're using add-migration, down() method should contain need roll corresponding up() call.

if you've manually changed contents of up() method (or if automatic process has changed it), you'll have ensure down() method updated reflect contents of up() method, ensure proper downgrades, if have modify down() method yourself.

hope helps?

if can clarify further, try answer in more detail.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -