7

I have an application that uses Entity Framework code first migrations where the application is deployed on two servers both using the same database. Now I have a simple database update where a table and the EF model has a new column/property. I have created the migration and it works fine in a one server scenario.

But how do I deploy this to two servers without downtime? Without EF I would just start out and add the column to the table and then update the servers one by one. The old app would work just fine against the updated database as long as it is a simple change like this. What is the best way to do this in EF? Can I avoid problems in the second, not updated server, while I am updating the first one and the database?

yossico
  • 3,155
  • 3
  • 38
  • 69
Jojje
  • 703
  • 1
  • 7
  • 10

1 Answers1

0

This sounds like a perfect candidate for a Mirrored database, assuming you are using SQL Server.

You'd just apply your migrations to the Principal database and it will take care of the rest behind the scenes.

IntoNET
  • 388
  • 1
  • 14