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

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.

Leave a Reply