Automatic migration was not applied because it would result in data loss.

.NET
October 8, 2013

You might get this error while doing update-database -verbose via Package Manager Console:

This error happens when your data model is not in synch with your database. There are two ways to fix this:

The first approach is by adding/deleting the columns that you added/dropped manually to your table and then re-running update-database again. The second approach is to force the update by issuing:

Doing so will force the update and recreate your columns and tables.

1 thought on “Automatic migration was not applied because it would result in data loss.”

Leave a Reply

Your email address will not be published. Required fields are marked *