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, second slice: btree_gist is injected where an element needs it #78
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
Second slice of #25, on top of #76. An exclusion constraint with an = element on a scalar column needs btree_gist; today the model has to declare the extension itself, and without it the migration fails at apply ("data type integer has no default operator class for access method gist").
Change
Kernel:SchemaResolver.StoreType(path), a column's store type, alike on a model and its snapshot. The planner acts on Dependency.Extension: one statement per extension that a created object depends on, ahead of everything else, written by the dialect (ISchemaDialect.EnsureExtension). The kernel's own dialect refuses: a provider without a SchemaKit package has no extensions.
PostgreSQL: the constraint lists btree_gist when an element needs it, by 5.x's rule (a column by its store type, an expression by its operator). The dialect writes CREATE EXTENSION IF NOT EXISTS, and nothing when the model declares the extension with HasPostgresExtension or calls modelBuilder.SuppressBtreeGistInjection() (5.x's annotation, CustomTemporal:SuppressAutoExtension).
Done when
On PostgreSQL 16 and 18 a model that declares the scheduling constraint and no extension applies through every path; the statement appears once per migration; a column whose type changes does not rebuild the constraint for it.
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
feat: btree_gist is injected where an exclusion constraint needs it, …