-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dotnet EF Core Failed when add a second migration with Data #21576
Comments
Please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate. |
You need a SQL SERVER database Named EFCoreSample (empty).
Now you can see on your EFCoreSample database created and seed on your sql server.
If you clean everything (database and migrations) it will work.
The table Role is there with the new columns (CreatedOn) and no errors. If you change anything and try to do a new migration after this one, the errors popup again. |
@leandrofagundes Thanks. I was able to reproduce this on 3.1.5, but the issue is fixed in the latest 5.0 preview. I believe it has the same root cause as #13507. |
I have one migration with the default data seed on a few tables.
Now, everytime I have a change to my schema, I have to drop, delete the migrations and recreate everything because if I tried to
add migrations, it gives me the error:
Steps to reproduce
Example:
For
dotnet ef
and PMC, share the --verbose outputFurther technical details
EF Core version: 3.1.5
Database provider: Sql Server
Target framework: ASP.NET Core 3.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.3
The text was updated successfully, but these errors were encountered: