Almost every time I try to update my database with Entity Framework Code-First Migrations, I get the error saying that I need to apply the previous Migration to the database.
So I run the update-database
command and this complains that:
There is already an object named ... in the database.
In every case, the object that its complaining about is a table which is literally supposed to be there.
This answer doesn't help since the root problem is the fact that I can't add a migration.
Only way I know to fix this is to physically delete the database from SQL Server and let EF recreate it but that's not always a practical course for obvious reasons.
How do I get around this problem so that I can add the migration?