-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
EF Core generates the same migration even though nothing has changed in the model #23792
Milestone
Comments
@AndriySvyryd This repros for me, even when using the 6.0.0-alpha.1.21055.6 daily build. Could be related to model data diffing. |
AndriySvyryd
added a commit
that referenced
this issue
Jan 12, 2021
AndriySvyryd
added a commit
that referenced
this issue
Jan 13, 2021
AndriySvyryd
added a commit
that referenced
this issue
Jan 13, 2021
AndriySvyryd
added a commit
that referenced
this issue
Jan 14, 2021
AndriySvyryd
added a commit
to dotnet-maestro-bot/EntityFrameworkCore
that referenced
this issue
Jan 14, 2021
This was referenced Mar 6, 2021
This was referenced Mar 15, 2021
Closed
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue seems to happen when the model combines owned entities with data seeding. I am sending a sample project reproducing the issue attached. I am using EF Core is 5.0.1.
The project contains a barebones
ApplicationDbContext
and a class implementingIEntityTypeConfiguration
for an ApplicationUser class and another, almost empty, entity. For some reason, apparently the presence of a Guid field serving as an alternate key was also necessary to trigger the issue, but I could have been mistaken.To reproduce the problem, run
add-migration a
add-migration b
and inspect the generated migrations. They are exactly the same, dropping and adding exactly the same tables and the same data (i.e. so in reality, both migrations should have been empty since nothing had changed in the model).
Include provider and version information
EF Core version: 5.0.1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 5.0
Operating system: Windows 10
IDE: 16.9 preview 1
repro-migrations.zip
The text was updated successfully, but these errors were encountered: