EF Code First doesn't see all migrations

entity-framework entity-framework-6

Question

In my project I have dozen+ migrations. http://screencast.com/t/CA2kZk3WCFj But when I try to create database from scratch EF only starts from the marked migration to the bottom.

if I enter command: update-database -targetMigration InitialCreate this is the response: he specified target migration 'InitialCreate' does not exist. Ensure that target migration refers to an existing migration id.

How can I resolve this issue and make EF see all of the migrations?

1
4
7/11/2014 4:41:58 PM

Popular Answer

This can often happen if you use the Update-Database command in Release mode. Running in Debug mode seems to work ok.

0
10/26/2016 8:51:58 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow