EF 6 - Migrations does not reflect changes in entities

Asked

Viewed 75 times

0

I changed my entities and I turned the command Update-Database -Verbose -Script only to see in SQL what changes would be made. Generated the legal script with all changes.

I closed the script window Add-Migration, that did not map any of the changes I made to the entities, apparently assuming that I applied the changes in the bank.

There is no Migration other than the old ones in my Migrations, however when I use the command Get-Migrations there is a 201706301953129_AutomaticMigration, a new migration, which is not in the file tree, nor in the directory, nor anywhere on my computer.

I would very much like to delete that file because I believe it made my changes to be ignored, but I haven’t been able to figure out how yet. Could someone give me a light? Has some command to Entity Framework 6 in the Package Manager Console to delete this file?

  • That was the solution.

1 answer

1


Perform a -force for your last Migration before your automatic Migration.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.