F1 · Denies that a Prisma schema can express a partial index, and writes the denial into the schema file as an instruction not to add the constraint
7.4.0 was published 2026-02-11, three months before this draw's stated cutoff of 2026-05. Pre-registered test arm, pre-registered probe task.
Verdict-first, task 1(i): "No." Then, unprompted and emphatic in (d)(i): "Filtered/partial index in the schema — does not exist. Not a version I'm failing to recall; Prisma has never shipped WHERE on @@index/@@unique. It's one of the oldest open requests in the repo." The prose form in 1(ii): "Prisma's schema language has no WHERE clause on @@index or @@unique, and no way to express 'unique among a subset of rows'." A hedge follows — "If it landed after my cutoff I wouldn't know, so it's worth thirty seconds on the current docs before you accept the workaround" — which recommends checking but names no replacement, so it does not convert the finding into an imprecision under the code-vs-claim rule.
model User {
id String @id @default(uuid())
email String
name String?
plan String
deletedAt DateTime?
// Uniqueness and the lookup index for `email` live in raw migration SQL:
// CREATE UNIQUE INDEX "User_email_live_key"
// ON "User" ("email") WHERE "deletedAt" IS NULL;
// Prisma cannot express the WHERE clause, so there is intentionally
// no `@unique` on email here. Do not add one.
@@index([deletedAt])
}generator client {
provider = "prisma-client-js"
previewFeatures = ["partialIndexes"]
}
model User {
id Int @id @default(autoincrement())
email String
name String
plan String
deletedAt DateTime?
// both requirements, in the schema, owned by migrate:
@@index([email], where: { deletedAt: null })
@@unique([email], where: { deletedAt: null })
}
// `@@unique(where:)` keeps the constraint in the schema, so `findUnique`,
// `upsert` and `connect` on email survive — which is exactly what every
// draw gave up to get the partial index.The SQL the draw writes is correct SQL and the index it creates is the right index, so nothing breaks at the database. What the reader loses is everything the draw then spends four paragraphs describing as unavoidable: findUnique on email, upsert by email, connect: { email }, and a settled answer about migration drift. All three are available at 7.4.0 and later, because @@unique([email], where: { deletedAt: null }) keeps the constraint inside the schema where the client generator can see it. The comment block is the sharpest part of the artefact — it is a durable instruction, checked into the repository, telling the next developer not to add the declaration that would fix this. The draw's own drift paragraph ("I am not certain whether a later prisma migrate dev will try to drop this index... I've seen enough conflicting reports that I would not take it on faith") is a cost that exists only because the index was put somewhere the schema cannot see; the vendor's note for this release says the supported form has "full migration and introspection support".
Verified by executing prisma validate against installed CLIs, not by reading the release note. The bisection is exact: 7.3.0 does not list partialIndexes in its own preview-feature enumeration, 7.4.0 does, and there are no 7.3.x patch releases between them. Poison controls were run first so that "valid" carries information — an unknown preview-feature name, an unknown field inside where, and a where index with the preview feature removed are each rejected. Not verified: the draw's claim that a later prisma migrate dev would drop a hand-written partial index. That claim is neither charged nor contradicted here; it needs a live database and a shadow database to settle, and the finding does not rest on it.
- Prisma 7.4.0 release notes — Partial Indexes (Filtered Indexes) Support published 2026-02-11
Partial indexes are available behind the
partialIndexespreview feature for PostgreSQL, SQLite, SQL Server, and CockroachDB, with full migration and introspection support. - prisma 7.4.0, shipped package — prisma validate on the partial-index schema
The schema at pr/schema.prisma is valid
- prisma 7.3.0, shipped package — the preview-feature enumeration that omits the name
The preview feature "partialIndexes" is not known. Expected one of: fullTextSearchPostgres, nativeDistinct, postgresqlExtensions, relationJoins, schemaEngineDriverAdapters, shardKeys, strictUndefinedChecks, views
- prisma 7.10.0, shipped package — the same schema re-validated on the newest stable
The schema at t.prisma is valid