You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preview versions of EF7 support Table per Concrete Type inheritance which is currently incompatible with .UseSnakeCaseNamingConvention. Generated indexes use the name of the parent type rather than that of the child type, causing migrations to fail because of duplicate index names.
Note that this was also filed as #185. Until EF-side support is available, I've at least removing the rewriting for 8.0.0 - index names in this case aren't rewritten, but at least they don't cause duplicate name errors. Keeping this issue to track properly rewriting.
Was pointed here from the dotnet/efcore repository.
The preview versions of EF7 support Table per Concrete Type inheritance which is currently incompatible with
.UseSnakeCaseNamingConvention
. Generated indexes use the name of the parent type rather than that of the child type, causing migrations to fail because of duplicate index names.Entity Models:
In EntityContext.cs:
In Startup.cs:
In the generated migration:
When update-database is run the following error is returned:
42P07: relation "ix_base_entity_trackables_created_by_id" already exists
System Info:
EF Core version: 7.0.0-preview.7.22376.2
EFCore.NamingConventions version: 6.0.0
Database provider: Npgsql.EntityFrameworkCore.PostgreSQL:7.0.0-preview.7
Target framework: (e.g. .NET 5.0) .NET 6.0
Operating system: Windows 10
IDE: (e.g. Visual Studio 2019 16.3) Visual Studio 2022 17.3
The text was updated successfully, but these errors were encountered: