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
SQLite: a NULLS-ordered complex index scaffolds the PostgreSQL sentinel, and applies without its ordering where SQLite accepts double-quoted strings #134
area/indexesComplex-property, composite, unique and filtered indexesbugSomething isn't workingpackage/coreAffects EFCore.ComplexIndexesseverity/lowCosmetic, message or documentation-level differencesilentAnswers wrongly without throwing — fixes go in the next major, never deferred
On SQLite, a complex index with a NULLS-ordered part (DbOrder.NullsFirst / DbOrder.NullsLast) is diffed by the core differ, which routes it through the IndexParts annotation and appends CustomMigrationsModelDiffer.RuntimeWiringSentinel (__requires_UseNpgsqlComplexIndexes__) to Columns. SQLite has no satellite and no generator that reads the annotation, and its CREATE INDEX has no NULLS clause.
CREATEUNIQUE INDEX "ux_nulls" ON"M" ("Email_V", "__requires_UseNpgsqlComplexIndexes__");
Applied for real (in-memory, Microsoft.Data.Sqlite, SQLite 3.53.3):
Double-quoted string literals off (the e_sqlite3 bundle, built with SQLITE_DQS=0): no such column: "__requires_UseNpgsqlComplexIndexes__". Loud, but the message names a PostgreSQL wiring a SQLite consumer cannot add.
Double-quoted string literals on (SQLITE_DBCONFIG_DQS_DDL, on in a default SQLite build, e.g. a system libsqlite3 or another SQLitePCLRaw bundle): applied. The index is created with the sentinel as a constant string column and no NULLS ordering. Uniqueness is unaffected (the constant is the same on every row); the declared ordering is lost without a word.
Found while measuring #95, where the same misfeature ruled out a column sentinel for the SQLite rebuild re-create (#95 puts its marker in the filter instead: an unknown function fails with DQS on or off).
Fix
Refuse a NULLS-ordered part at migrations add on providers the core serves without a satellite, as the SQL Server satellite already does, naming the provider. Same for any other part that sets RequiresPartsAnnotation there.
area/indexesComplex-property, composite, unique and filtered indexesbugSomething isn't workingpackage/coreAffects EFCore.ComplexIndexesseverity/lowCosmetic, message or documentation-level differencesilentAnswers wrongly without throwing — fixes go in the next major, never deferred
Activity
Merge pull request #140 from CaffeinatedCoder/fix/134-sqlite-parts-re…