Xander
Xander

Reputation: 9171

Stop automatic migrations when I deploy to production

I have a linq to entities application that was working great until someone tried to add a column to a database table.

I was quite surprised to see that the production application crashed because it wanted to run to automatic migration and delete the column. It stopped due to potential dataloss.

How can I have my application run and not try to sync the database up? I would like older versions of my linq to entities code first applications to run alongside the newer versions if the database changes are not breaking changes.

Upvotes: 2

Views: 749

Answers (1)

jjj
jjj

Reputation: 4997

In production, you could...

Either way, automatic migrations would be disabled (as would the __MigrationsHistory/metadata check...I think).

Upvotes: 3

Related Questions