Reputation: 514
I try to update my database after migration (V2 is the name of the migration) :
dnx ef database update V2 -c DataContext -p Infrastructure
I have an error because dnx try to execute all migrations et not just V2.
Applying migration '20151127095324_V1'
...
There is already an object named 'myEntity' in the database
Have u an idea why it try to apply V1 migration ?
Thanks,
Upvotes: 2
Views: 3717
Reputation: 1260
Below should work
dnx ef database update -c DataContext -p Infrastructure
If not, please check if "migration history" table has an entry for migration "v1"
Upvotes: 2