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
A column type change that begins the need for btree_gist fails to apply, and a test pins it as right #81
area/constraintsExclusion constraints, row guards and other constraint-like objectsarea/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringbugSomething isn't workingpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQLseverity/mediumInconsistency or failure in a narrow scenario
Found by the analysis of #77 and #79, reproduced on PostgreSQL 16.15 and 18.6.
What happens
The planner ensures an extension for what a migration creates (#78). A column whose type changes creates nothing, since the contributor answers Unaffected, but PostgreSQL rebuilds the constraint's index under the new type, and that needs the operator class.
Reproduction
A constraint with = on a string column mapped to ltree, on a database without btree_gist. The target maps the column to text. The migration is EF Core's operations alone and fails at apply: 42704: data type text has no default operator class for access method "gist".
A_type_change_that_ends_the_need_for_the_extension_leaves_the_constraint_alone asserts no statement of SchemaKit's in that direction too, so it pins a migration that cannot apply. No live test runs the pair.
Loud, not silent.
Fix
Ensure the extensions of a target object that one of EF Core's changes touches, not only of those created.
Tests
Live, in both directions, on a database without the extension. The offline test expects the statement in the direction that begins the need.
area/constraintsExclusion constraints, row guards and other constraint-like objectsarea/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringbugSomething isn't workingpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQLseverity/mediumInconsistency or failure in a narrow scenario
Activity