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
PgExclusion: the 5.x reader, and a 5.x snapshot with exclusion constraints hands over with no operations #92
area/constraintsExclusion constraints, row guards and other constraint-like objectsenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
A project that comes from EFCore.ComplexIndexes 5.x has a model snapshot that holds its exclusion constraints as 5.x wrote them: one annotation CustomExclusion:Constraints per entity type, a JSON list. SchemaKit's planner reads only its own annotations. So the first migrations add after the move sees no constraint in the snapshot and every constraint in the model, and writes an ADD CONSTRAINT for each one. Without 5.x's DROP CONSTRAINT IF EXISTS in front that fails at apply (42P07); a consumer who deletes the statements by hand to get past it has a snapshot nothing checked.
Change
The kernel gets the seam: a reader for an annotation of another format, registered like a contributor, asked for the source side of a diff only. A model that still carries such an annotation where the migration leads is refused.
The PostgreSQL package reads CustomExclusion:Constraints into PgExclusion declarations, which are then resolved like any other. What 5.x could store and PgExclusion cannot say is refused by name, never dropped.
A fixture scaffolded by the published 5.6.0 packages on net10.0 (snapshot and migration, checked in with the script that makes them), and the same model declared with SchemaKit.
Done when
The 5.x snapshot against the SchemaKit model is no operations, offline.
On PostgreSQL 16 and 18: the 5.x migration is applied as scaffolded, the diff is still empty, and the catalog holds what EnsureCreated() builds for the SchemaKit model.
A difference between the two (a filter, a name) is a rebuild or a rename, shown by a test, not an empty diff.
Each refusal has a test, and each guard is shown to fail without what it guards.
The temporal half of #18 (a constraint moved to WithoutOverlaps(), the handover matcher) stays with #18.
area/constraintsExclusion constraints, row guards and other constraint-like objectsenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQL
Activity