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
{{ message }}
Repository navigation
Index names that differ only in case pass the name checks and fail at apply on SQL Server and SQLite #116
area/indexesComplex-property, composite, unique and filtered indexesbreakingChanges an answer or a signature — needs a majorbugSomething isn't workingpackage/coreAffects EFCore.ComplexIndexespackage/sqlserverAffects EFCore.ComplexIndexes.SqlServerseverity/lowCosmetic, message or documentation-level difference
The core's index-name checks (ValidateUniqueIndexNames, ValidateNoNativeIndexNameCollision) compare names ordinally. SQL Server, under its default case-insensitive collation, and SQLite, whose identifiers are case-insensitive even when quoted, treat ix_case and IX_CASE as one name. Two complex indexes on one table named that way pass migrations add:
and the migration fails at apply on SQL Server 2022:
The operation failed because an index or statistics with name 'IX_CASE' already exists on table 'customers'.
Confirmed by a probe test on the SQL Server integration lane (#100), run on a throwaway branch. A complex index named like a native HasIndex in another case has the same shape, through ValidateNoNativeIndexNameCollision. Loud: it fails at apply, never silently.
The key-name check added for #90 already compares without regard to case. PostgreSQL is unaffected: EF quotes identifiers, and quoted identifiers are case-sensitive there.
Fix
Make case sensitivity part of the provider's name rule beside IndexNameScope. Compare case-insensitively on SQL Server and in the core default (SQLite), and keep ordinal comparison on PostgreSQL. Add a lane row on SQL Server.
Found while building the SQL Server lane for #100 (stream C of 5.5.0).
area/indexesComplex-property, composite, unique and filtered indexesbreakingChanges an answer or a signature — needs a majorbugSomething isn't workingpackage/coreAffects EFCore.ComplexIndexespackage/sqlserverAffects EFCore.ComplexIndexes.SqlServerseverity/lowCosmetic, message or documentation-level difference
Activity
Merge pull request #127 from CaffeinatedCoder/fix/116-index-name-case