Simon Elms
Simon Elms

Reputation: 19768

EF Core migrations: updating database with previous migration existing in __EFMigrationsHistory table but not in .NET project

I'd like to update a shared dev database with my latest migrations. However, I see someone has applied new migrations from a different branch. Those migrations appear in the __EFMIgrationsHistory table in the shared database, but not in my .NET & EF Core project.

What will happen if I attempt to update the database with my migrations?

Given the other migrations don't exist in my .NET & EF Core project attempting to apply my changes won't roll back theirs. But will it remove the records of their migrations from the __EFMigrationsHistory table (thereby causing them problems the next time they attempt to update the database)? Or perhaps crash and burn when I attempt to update the database?

Given the database is shared between 6 dev teams I'm a bit reluctant to experiment, in case I break things for others.

Upvotes: 0

Views: 25

Answers (0)

Related Questions