Confusing migrations after upgrade from 6 to 7 #28962
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
priority-bug
Issues which requires API breaks and have bigger impact hence should be fixed earlier in the release
regression
type-bug
Milestone
So I've been trying to upgrade ef core to 7 preview to test out the new features
after upgrading the packages I generate a new migration so any changes will be applied
What we're seeing here is multiple problems:
ForeignKeyToAnotherTable
changing toForeignKey1
which is a big no noActivity<User>Id
was renamed toActivityEvent_ActivityId1
FK_Events_UserActivities_Activity<User>Id
was renamed toFK_Events_CompanyActivities_ActivityEvent_ActivityId1
UserActivities
now it points toCompanyActivities
Include your code
No full reproduction, request if needed, it will take at least 3 days before i can provide a trimmed down working reproduction
This is a trimmed down version of the entities so it becomes easier to understand the structure being used
Initial migration that was generated with ef core 6
Migration generated directly after upgrading from ef core 6 to ef core 7-preview
Include provider and version information
EF Core version: 7.0.0-rc.2.22452.1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 7.0
The text was updated successfully, but these errors were encountered: