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
Tests: nothing pins that FKs on tables created in the same migration are no SQLite rebuild #157
area/migrationsThe differs, snapshot format, EnsureCreated and design-time wiringpackage/coreAffects EFCore.ComplexIndexestestsAdds or changes tests only (harnesses, parity suites); no library code
Found in the 5.5.0 pre-tag review (#36) by seeding defects into 934ec55. The code is right today, but nothing pins it.
Seed: in the SQLite rebuild detection (src/EFCore.ComplexIndexes/CustomMigrationsModelDiffer.cs:380), replace AddForeignKeyOperation foreignKey => !created.Contains((foreignKey.Table, foreignKey.Schema)) with => true.
Result: the unit suite still passes, 569/569.
The exception for "a foreign key added to a table created in this same migration" is what keeps new tables with circular foreign keys scaffoldable on SQLite. EF Core emits those as AddForeignKeyOperations, but the tables are not rebuilt. Without the exception, migrations add refuses such a model when UseComplexIndexes() is not wired. The refusal is loud, but it is wrong.
Test to add: create two tables with circular foreign keys plus a complex index, on SQLite, unwired; assert migrations add scaffolds with no refusal. Prove it by re-applying the seed.
area/migrationsThe differs, snapshot format, EnsureCreated and design-time wiringpackage/coreAffects EFCore.ComplexIndexestestsAdds or changes tests only (harnesses, parity suites); no library code
Activity
Pin three 5.5.0 behaviours the pre-tag seeds survived
Merge pull request #160 from CaffeinatedCoder/tests/155-157-surviving…