Skip to content

Feature candidates beyond the horizon table: typed SQL where EF Core takes a string, and what the planner knows offered to the user #121

Open

Description

@CaffeinatedCoder

From the final round of the review of 2026-11-14: what neither the open issues nor the horizon table of design section 15 hold. Two lists made apart, one by GPT and one by Claude, merged here. Candidates, not plans: each becomes an issue of its own when the maintainer picks it. Scores are uniqueness in the ecosystem / fit with the kernel / provider neutrality, 1 to 3.

Why these, and not more schema objects

The ecosystem on 2026-11-14, from primary sources: EF Core 11 and Npgsql 11 took over indexes on complex-type and JSON paths and temporal keys. Expression indexes, lambda filters and exclusion constraints have no native form; triggers, views, functions and policies in migrations are in EF Core's backlog since 2022 (dotnet/efcore#10770, #22953). No package and no EF Core mechanism offers one owner of the differ and the generator that several packages contribute through. The two packages near this ground with wide use are EfCore.SchemaCompare (3.5M downloads: a model compared with a live database) and EFCore.CheckConstraints (1.6M: check constraints from annotations). Their numbers say where the demand is: trust in what the database holds, and constraints without SQL strings. 5.x's own headline, indexes on complex types, is the platform's now.

Typed SQL wherever EF Core takes a string

Candidate What the consumer writes Closest today Score
Typed check constraints Check(x => x.End > x.Start, name: "ck_period"), on every provider, with a check's own null rule (it passes on unknown) HasCheckConstraint(name, "sql"); EFCore.CheckConstraints derives a fixed set from annotations 2/3/3
Typed computed columns and defaults Property(x => x.Total).ComputedFrom(x => x.Net + x.Tax, stored: true) HasComputedColumnSql("sql"), HasDefaultValueSql("sql") 2/2/3
A lambda filter on EF Core's own index HasIndex(x => x.Email).HasFilter(x => x.DeletedAt == null) HasFilter("sql") 2/2/3

One translator, the parity sweep as its oracle, and the first declarations that are the same on PostgreSQL, SQL Server, SQLite and MySQL: the test of the kernel's neutrality, and the audience 5.x had.

What the planner, the claims and the verifier know, offered to the user

Candidate What it does Closest today Score
Explain a migration For each statement, why it is there: which declaration, which impact answer, which dependency. At migrations add or as a command Reading the script 2/3/3
A lock and rewrite report Which statements take the table exclusively, rewrite it or scan it to validate, with the way around where there is one (CONCURRENTLY, NOT VALID, ONLINE) Nothing for EF Core; strong_migrations and squawk elsewhere 3/2/2
Staged validation A constraint added NOT VALID or WITH NOCHECK in one migration and validated in the next, declared, not hand-written Hand-written SQL 3/2/2
A check before the constraint Before a unique index or an exclusion constraint is created, a query that lists the rows that would break it, and a migration that fails with them named The server's first violation only 3/2/3
Check a Down A structural change in Up with nothing in Down that reverses it Nothing 2/3/3
Check a replay A migration in the history whose SQL depends on the model present when it is applied, which is what plan 3.3 keeps SchemaKit's own statements out of Nothing 3/2/3
The verifier as a product (#30, wider) An exit code for CI, a health check for start-up, and EF Core's own indexes and constraints beside SchemaKit's EfCore.SchemaCompare 2/3/2

At run time and in tests

Candidate What it does Closest today Score
A violation, as its declaration 23P01 on ex_role_grant_active_period reaches the application as the declaration it broke, by the name the claims already hold EntityFrameworkCore.Exceptions maps by error class, not to a declaration 2/3/3
Does this query use this index A test helper: the query's SQL holds the index's expression, and on a live server the plan uses it Nothing 3/2/2
Declarations from a database dbcontext scaffold writes DeclarePostgres for the exclusion constraints and expression indexes it finds Scaffolding leaves them out 2/2/2
The oracles as a package #120 Nothing 3/3/3

More objects, by provider

Candidate Provider Score
Expression and partial indexes on SQLite, which a test database then has like the real one SQLite 2/2/2
A typed vector index for pgvector (EF Core 11 has HasVectorIndex on SQL Server) PostgreSQL 2/2/1
A named ICU collation, a text search configuration, created before what uses them PostgreSQL 2/2/1
Invisible and ignored indexes, to try the optimizer without a drop MySQL, MariaDB 2/2/1
Sequence cache and options on EF Core's own sequences PostgreSQL, SQL Server 2/2/2
A comment on a declared object all 1/3/3
STRICT tables SQLite 2/1/1
Synonyms SQL Server 2/1/1

Order, as the two lists agree and differ

  • Both: explain a migration first after preview.2. It needs only what The plan as ordered actions with a name ledger, not two lists around EF Core's operations #115 builds, and it is how a consumer comes to trust a planner that rebuilds things.
  • Claude: typed check constraints next. They are the one feature that every provider renders, that reuses the translator whole, and that a package with 1.6M downloads shows a demand for. They would change who uses the package most.
  • GPT: the replay check and staged validation next.

What the same round would drop

Activity

  1. added
    enhancement
    package/core
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpackage/core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions