Repository navigation
Closed
Labels
area/constraintsExclusion constraints, row guards and other constraint-like objectsarea/indexesTyped indexes: access methods, options, unique and filteredarea/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQLpackage/sqlserverAffects CodoMetis.EFCore.SchemaKit.SqlServer
Milestone
Description
Accepted 2026-11-11. The surface of design/schemakit-api.md (sections 1 to 8) stands: names as drafted, the staged exclusion chain, column-only keys kept. Its open questions are answered in the plan, section 7; the analyzer ships in 11.0.0. The engines of its section 9 are superseded by the plan.
Goal
Decided 2026-10-19 by the maintainer: SchemaKit gets an entirely new public API. It is not the 5.x API under new ids.
The rule is the one the CodoMetis.ValueRanges range types follow: a declaration PostgreSQL or SQL Server would reject must not compile. The design makes full use of what .NET 11 and C# 15 offer for that, closed hierarchies first of all.
The first SchemaKit preview carries this API. No preview ships the old API under the new ids (#2).
The design must answer
- Principles, each with an example of a declaration that no longer compiles. For example:
- index methods as a closed hierarchy with method-specific options, so
NULLS FIRST/LASTandINCLUDEexist only where the method allows them - builders that encode their stage in the type, so an exclusion constraint with no overlap element can't be built
- predicates and operators typed by the column types
- index methods as a closed hierarchy with method-specific options, so
- Exhaustiveness. Declarations are
closedunions, so a missing arm in the differ is a compile error. The ValueRanges ranges can only guarantee that at runtime. - Closed inside, open at the seam. The kernel dispatches over contributors through an open interface (SchemaKit: the contributor contract, so packages add schema objects instead of replacing EF services #7, so other CodoMetis packages can plug in). Each contributor owns its declarations as a closed union. The kernel never switches over another contributor's types.
- The ownership check (SchemaKit: the wiring guards, so a missing or displaced UseSchemaKit() fails loudly #8) and the snapshot format v2 (SchemaKit: snapshot format v2 and CodoMetis: annotation keys ship in 11.0.0; the 5.x format is read forever (D11) #9) in this design.
- What is left out because EF Core 11 and Npgsql 11 do it natively (SchemaKit: leave out what EF Core 11 and Npgsql 11 do natively; keep what stays unique #3: complex-type indexes, temporal keys).
- A table mapping every 5.x API call to its new form, or to "native" or "dropped". This is the input for the migration guide and for SchemaKit: moving from EFCore.ComplexIndexes 5.x adds no migration, or exactly the one the guide documents #10. The DDL and the snapshot annotations stay compatible; the API doesn't.
- The first slice that
11.0.0-preview.1ships (SchemaKit 11.0.0-preview.1: the first slice of the new API, on EF Core 11 / Npgsql 11 under the new ids #2): the kernel plus at least one feature end to end.
Done when
design/schemakit-api.mdis merged after the maintainer's review.- Compile probes on the .NET 11 SDK show every "does not compile" claim of the doc: a test that compiles each forbidden declaration with Roslyn and asserts the diagnostic.
- SchemaKit 11.0.0-preview.1: the first slice of the new API, on EF Core 11 / Npgsql 11 under the new ids #2, SchemaKit: the contributor contract, so packages add schema objects instead of replacing EF services #7, SchemaKit: the wiring guards, so a missing or displaced UseSchemaKit() fails loudly #8 and SchemaKit: snapshot format v2 and CodoMetis: annotation keys ship in 11.0.0; the 5.x format is read forever (D11) #9 are rewritten against the design.
- The
ROADMAP.mdheader says that section 5 is input to this design, no longer the plan.
Metadata
Metadata
Assignees
Labels
area/constraintsExclusion constraints, row guards and other constraint-like objectsarea/indexesTyped indexes: access methods, options, unique and filteredarea/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringenhancementNew feature or requestpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)package/postgresqlAffects CodoMetis.EFCore.SchemaKit.PostgreSQLpackage/sqlserverAffects CodoMetis.EFCore.SchemaKit.SqlServer
Activity
docs: widen the SchemaKit design to the type model and the engines
docs: align the delete guard's SchemaKit side with #61 (#64)
docs: carry the column-rename rule into the SchemaKit design (#182)
CaffeinatedCoder commentedon Nov 11, 2026
The design is on
mainas design/schemakit-api.md with its 30 compile probes (72 of 72 tests green on SDK 11.0.100 in the first CI run), and the maintainer accepted its surface on 2026-11-11. The open questions of its section 16 are answered in the plan, section 7. What is left of the document, bringing its sections 9 and 10 in line with the decided core, is #36.