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
Upgrade guide: a derived SQLite generator replaced unkeyed is refused too; the sentence says only a non-derived one is #153
area/migrationsThe differs, snapshot format, EnsureCreated and design-time wiringdocumentationImprovements or additions to documentationpackage/coreAffects EFCore.ComplexIndexes
migrations add still refuses when UseComplexIndexes() is called before UseSqlite(), or when another package replaces IMigrationsSqlGenerator with a generator that does not derive from SQLite's, since EF Core keeps only one replacement.
Whether the generator derives from SQLite's does not decide it. What decides it is whether the ReplaceService call is keyed on SQLite's generator.
Reproduction
SqliteTableRebuildTests.Replaced_generator_is_refused already shows it. AuditingGenerator derives from SqliteMigrationsSqlGenerator, and both of these are refused, naming AuditingGenerator:
The keyed form ReplaceService<IMigrationsSqlGenerator, SqliteMigrationsSqlGenerator, AuditingGenerator>() is wrapped and works.
A reader whose generator derives from SQLite's concludes from the sentence that they are fine, then meets the refusal.
Proposed fix
Reword the sentence to something like: "…or when another package replaces IMigrationsSqlGenerator without naming SQLite's generator as the one it replaces (an unkeyed ReplaceService<IMigrationsSqlGenerator, T>()), since EF Core keeps only one replacement."
Optionally, have the refusal message suggest the keyed ReplaceService<IMigrationsSqlGenerator, SqliteMigrationsSqlGenerator, T>().
area/migrationsThe differs, snapshot format, EnsureCreated and design-time wiringdocumentationImprovements or additions to documentationpackage/coreAffects EFCore.ComplexIndexes
Activity