Do migrations make sense when the database is changed externally?

70 views Asked by At

I'm thinking about using migrations with Entity Framework. The thing is that someone else, an external colleague is changing columns on his own, so the migration would not do any changes in the database by using update-database, because it's already done.

Is there any sense to use migrations in such a case?

1

There are 1 answers

0
mcs_dodo On

In my experience not. Manual changes in DB structure can sometimes really mess up next migrations to be applied. Best way is to get to an agreement in your company that will set rules how DBs are maintained. This agreement needs to be honored, because you won't be able to replicate any changes made by hand if the application is deployed to other environments. Even worse, after some changes you might not be able to apply newest migration at all (because the DB snapshots won't fit), and this implies lots of unnecessary investigation and work.