Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Migrations doesn't work with Beta 7 (Only Initial migration is found) #3160
I created a migration with
After that I made some changes to the model and I added a new Migration Second
Now when I try to update the database I get an error.
The error says the table is already created. This because the update tried to load the "Initial" migration again.
What can I do?
I started to create a demo project and I noticed a difference (and the reason why I got the error).
I also used another tutorial:
In there there a line:
But this line doesn't work with beta7 anymore. (the tutorial is behind)
I replaced this with this line:
So, before Migration I already created the database by running the application. And I quess if the database doesn;t have the table __MigrationHistory it will try to install the Initial migration script. This will always and up with an error related the table already exists. It would be nice to have a little bit more information of missing a MigrationTable e.g.
And how can I do "if (context.Database.AsRelational().Exists())" with beta 7?
Ok that explains it,
I want to call
Posted separately: #15846.