GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(sql)!: remove @noCheck; a list that allows null elements is written T?[] (TML-3595) by wmadden-electric · Pull Request #30741 · prisma/orm

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 15, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

A list column that allows null elements is now written T?[]. @noCheck is gone.

model Post {
  id     Int       @id
  tags   String[]            // string[]; the database rejects null elements
  labels String?[]           // (string | null)[]; no element check
}

Before this PR, a third form existed: tags String[] @noCheck(elementNotNull). It typed tags as string[] while the database accepted null elements, so a query could return a value its own type said was impossible. This PR removes @noCheck (PSL), .noCheck() (TypeScript) and the noCheck key on SQL storage columns. It is a breaking change, so it lands before GA.

Why @noCheck existed, and why it can go

On a table Prisma 8 manages, the contract build adds two kinds of CHECK constraint: "no null elements" on every list column with non-null elements, and "value is a member" on every column typed by a Prisma 8 enum. Databases that Prisma 8 did not create have neither. @noCheck was added on 2026-08-09 so that such databases would verify, at a time when the contract had no way to say that list elements may be null. Nullable list elements landed on 2026-10-01 (#30051). From then on the honest form exists, and @noCheck only let the type and the database disagree.

What each producer writes now

Producer Before After
Prisma 7 schema.prisma read as the contract source T[] plus a waiver on every list T?[] on every list. A Prisma 7 database still needs no migration.
contract infer T[] @noCheck(elementNotNull) when the database has no element check T?[] when the database has no element check, T[] when it has one
contract print printed @noCheck prints T?[] for nullable elements
PSL @noCheck, TS .noCheck() waived the check unknown attribute; no such method

Enums get no opt-out. An enum column on a managed table always gets its membership check. A column that should hold values outside the enum is typed by its codec instead.

A stored contract.json that still has noCheck is refused. The message lists the paths and says to re-emit the contract, or to run the upgrade script on a stored copy such as a migration snapshot.

The Supabase pack's four text[] columns become String?[]. Only those four lines of its contract.prisma changed. Running its generator today rewrites much more, because the committed file already differs from what the generator writes on main; that is TML-3598.

Upgrading

upgrade-instructions/pending/remove-nocheck/ has an entry for apps and one for extensions, and a script. Removing the key changes every stored contract's storage hash. The script therefore does what the earlier contract-rewrite scripts did: it rewrites each stored contract and snapshot, renames snapshot directories and fixes the references to them. Where a column waived its element check, the script also marks its elements nullable. A snapshot then says what the database enforces, and it matches the contract the user re-emits from T?[], so the next migration plan has nothing to do. After the script, the user runs prisma db sign once, because the hash moved. Pre-upgrade migrations then show no applied mark in migration status; see Manual QA. A test follows the instructions word for word on a database signed under the old shape, and ends with db verify passing.

A Prisma 7 project with list columns sees its element types become T | null and its storage hash change. It needs no migration. A database it had already signed needs db sign again.

Docs

ADR 244 and ADR 258 are amended: generated checks cannot be waived, and element nullability alone decides the element check. ADR 258 had rejected reading element nullability from a missing check, because a check could be waived; with the waiver gone it records the opposite decision and the reason. ADR 157, ADR 249, ADR 267, the ADR index, the Data Contract and Adapters subsystem docs, the error reference and the agent skill are updated to match. The domain-enum inference project's path B depended on @noCheck(membership); its spec now says that path must be redesigned.

Verification

  • Executed tests: a Prisma 7 database built by Prisma 7's own SQL passes db sign and db verify with no migration. Infer round trips write String?[] without the check and String[] with it, and both verify clean. The upgrade script has 24 tests over before and after fixtures built by the real emitter.
  • pnpm build, pnpm typecheck, lint and tests in every touched package, pnpm fixtures:check, the planner golden test, check:upgrade-coverage, and, after merging main, the 55 integration files that run infer, print, the Prisma 7 reader and the upgrade script.
  • Coverage: contract-ts branch coverage is 92.86% here and 93.03% on main, both below its 94% per-package figure. The difference is the 28 branches that only the deleted noCheck code had.

Manual QA

The branch's CLI was run against a real Postgres (PGlite) in scratch projects. All seven scenarios passed:

  1. A new project with tags String[] and labels String?[] gets an element check on tags only. The database rejects a null in tags and accepts one in labels, and the ORM returns it.
  2. @noCheck is reported as an unsupported attribute. .noCheck() does not typecheck.
  3. contract infer writes String?[] for a hand-made text[] column and String[] for one Prisma 8 created, and both verify.
  4. A Prisma 7 schema over tables built by Prisma 7.10.0's own SQL signs and verifies with no migration.
  5. An old contract.json with noCheck is refused. Both fixes the message gives work.
  6. The upgrade instructions, followed word for word on a signed database: migration plan reports no changes and db verify passes.
  7. A removed @noCheck(membership): the next migration adds the check, fails cleanly on a non-member row, and succeeds once the row is fixed.

QA also found that after the upgrade script, migration status stops marking the migrations applied before the upgrade. The script gives each rewritten migration a new hash, and the database's migration history keeps the old ones. db migrate re-runs nothing and db verify passes. The rc.15 upgrade has the same gap. The upgrade instructions now say so, and TML-3601 covers fixing migration status. Two older CLI messages QA flagged are TML-3600.

Alternatives considered

  • Read a Prisma 7 String[] as non-null elements and let the first migration add the check. This would keep Prisma 7's client types. Rejected: a Prisma 7 schema must pass db verify under Prisma 8 with no migration.
  • Have contract infer keep writing T[] and let the next plan add the check. Rejected: infer describes the database, and that database accepts null elements.
  • Keep @noCheck(membership) for enums. Rejected: it has the same flaw as the list waiver. Prisma 8 adds the membership check, and a column that needs other values is not typed by the enum.
  • Ignore a stored noCheck key instead of refusing it. Rejected: silently reading an old contract with a different meaning is worse than a clear refusal with a fix.

Refs: TML-3595

Agent: cyrus-90
🤖 Generated with Claude Code

Summary by CodeRabbit

  • Breaking Changes
    • Removed support for opting out of derived enum membership and list-element checks through @noCheck or .noCheck(). Enum membership checks are always derived for managed tables.
  • Behavior Changes
    • Lists without a database check enforcing non-null elements are now inferred with nullable elements (T?[]). Prisma 7 lists and affected Supabase fields use this representation.
  • Upgrade Guidance
    • Added instructions and scripts to update stored contracts, hashes, and signed databases for this change. Removing a membership waiver may add a check during migration and fail if existing values violate it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
wmadden-electric and others added 23 commits October 15, 2026 21:45
@wmadden-electric @claude
docs: generated checks cannot be waived; lists that allow nulls are w…
8d5628d
…ritten T?[]

ADR 244 and ADR 258 drop the per-column noCheck opt-out. contract infer
and the Prisma 7 reader write nullable-element lists when the database
has no element check.

Refs: TML-3595

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Remove noCheck from the SQL contract and the TS builder
3aa2fa8
A stored column no longer carries noCheck, and the TS field builder has
no noCheck() method. A list whose elements may be null says so with
many({ elementsNullable: true }). A stored contract that still has the
key fails validation, and the message tells the reader to re-emit the
contract from its source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Remove the PSL @nocheck attribute
1ae4fe5
The SQL namespace no longer registers @nocheck, so writing it reports
the ordinary unknown-attribute diagnostic, and the language server no
longer offers it. A list whose elements may be null is written T?[].

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Read Prisma 7 list columns as lists whose elements may be null
9e04da4
Prisma 7 creates no check on a list column, so the database accepts null
elements. The reader now says so with elementNullable: true instead of a
non-null element type plus a waived check. The client type gains
| null for each element, and a Prisma 7 database still passes db verify
with no migration. The Prisma 7 source journey now asserts the list
column's shape.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
contract infer writes T?[] for a list with no element check
3b6ddff
infer writes T[] when the live table has the derived element-not-null
check and T?[] when it does not, instead of T[] @nocheck(elementNotNull).
contract print no longer prints @nocheck. It still refuses a managed
table that lacks a check the PSL source would derive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Describe test list columns without a check as nullable-element lists
ecf8fbe
Tests that built a list column with no element check waived the check
on the column. They now declare that the elements may be null, which is
what the database allows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Journeys expect T?[] where a list column has no element check
9b51bd5
contract infer now writes T?[] for a list whose database allows null
elements. The infer journeys assert that form, the enforced-check
journey changes T?[] to T[] to have db update install the check, and
the ORM include test stores null elements through a String?[] column.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Supabase pack: the four text[] columns are String?[]
ba77d7d
The database allows null elements in these columns, so the contract now
says so, and the client types each element as string | null.

The four lines are edited to what scripts/generate-contract.ts writes
for them. A full regeneration also changes unrelated lines: the
generator has drifted from the committed file since earlier infer
changes (date columns and foreign-key index names), and those changes
are left out of this commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Refresh the planner golden manifest
9d858c0
Stored snapshots in an old contract format are unreadable, and the
recorded refusal now tells the reader to re-emit the contract for each
key this version does not read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Upgrade instructions for the removal of noCheck
b2379fe
The app and extension fragments say how to rewrite @nocheck and
.noCheck(): a list that allows null elements becomes T?[] or
many({ elementsNullable: true }), and a membership waiver is deleted.
A Prisma 7 source now types list elements as T | null.

Stored contracts that carry the key no longer load, so the fragments
ship remove-nocheck.ts. It removes the key from every stored SQL
contract without changing its checks, renames the snapshot directories
and rewrites the migrations, refs, migration.ts and contract.d.ts that
name an old storage hash. Its tests build the before and after
fixtures from live framework code and run the script on them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
remove-nocheck fixtures: write migration.ts as the formatter leaves it
3ad3602
The formatter reordered and wrapped the snapshot imports, so the
generated fixtures no longer matched the committed ones. migration.ts
in the fixtures now names its hashes as short string literals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
docs: ADR 244 and 258 say what infer and the Prisma 7 reader do now
5066750
Refs: TML-3595

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
docs(projects): domain-enum inference path B needs redesign without @…
b33ca81
…nocheck

Refs: TML-3595

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
A stored check waiver gets its own refusal, like nativeType
49f0f8c
The generic suffix on every unknown key is gone. A stored column that
still has noCheck is refused by a dedicated check that names the first
five paths, counts the rest, and says to re-emit the contract or run
the upgrade script on a stored contract. Other unknown keys get the
plain message again. Also rejoins doc blocks that were half re-wrapped
and drops a comment that repeated the code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
remove-nocheck makes waived lists element-nullable and stops on hash …
c628930
…mismatch

Where a column's noCheck waived the element check, the script now also
sets many.elementNullable to true on the storage column and on the
domain field that maps it, and flips the same entries in contract.d.ts.
The stored contract then says what the database enforces, and the
latest snapshot equals what the rewritten source emits, so migration
plan has nothing to do afterwards. A membership waiver is only deleted.

A contract whose stored hash does not match its content now stops the
script before it writes anything, naming the file and both hashes. The
CLI ignores such a snapshot, so rehashing it would hide the problem.

The fixtures are now emitted by the real emitter and their migration.ts
files import the snapshots as the CLI writes them. The tests check the
imports point at the renamed directories.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Upgrade fragments say when to sign, and cover Supabase pack users
9a42e12
The app fragment now orders the steps: run the script, sign every
database, then change the source and re-emit. Each entry whose re-emit
changes the storage hash says to run prisma db sign, and the Prisma 7
entry no longer claims db verify passes with no other step. A new app
entry tells Supabase pack users that four text[] element types become
string | null and the space's hash changes, with both hashes.

A journey signs a Prisma 7 database under the previous release's
stored contract, then follows the fragment step by step and checks
that db verify passes with no migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Refresh the planner golden manifest
2407bb9
Old-format snapshots record the plain refusal again, now that the
generic unknown-key suffix is gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Refuse a contract for its stored type names before its check waivers
32d73de
A contract old enough to store nativeType also stores noCheck, and the
nativeType rewrite comes first in the upgrade. Reporting both at once
told the reader to run a script that cannot read the contract yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Journey: what the remove-nocheck upgrade leaves in a migrated database
b6d54df
The database holds the previous release's ledger, marker and stored
contracts for the remove-nocheck fixture's migrations. After following
the fragment, db migrate applies nothing and db verify passes, but
migration status no longer marks the two pre-upgrade migrations as
applied: the script gave them new migration hashes and the ledger keeps
the old ones. The test records that behaviour until it is decided.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
The check-waiver refusal is one sentence and a list of columns
6011ac7
It no longer repeats the advice once per column, and it names the
script a user can find: remove-nocheck.ts in the remove-nocheck scripts
of the Prisma 8 upgrade guide.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric @claude
Upgrade instructions say migration status stops marking earlier migra…
1885f69
…tions applied

Refs: TML-3595

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
Merge main into tml-3595-remove-nocheck
2a31ca1
@wmadden-electric @claude
infer-column-types test: a list column with no element check prints T?[]
abf976a
The test came in from main, where infer printed such a column as
T[] @nocheck(elementNotNull). On this branch infer writes T?[].

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner October 15, 2026 22:43
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: prisma/orm/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 77c4ca57-7139-446a-8f22-6032f1868f99
📥 Commits

Reviewing files that changed from the base of the PR and between 55dba88 and b146e07.

⛔ Files ignored due to path filters: 2
  • projects/domain-enum-inference/plan.md is excluded by !projects/**
  • projects/domain-enum-inference/spec.md is excluded by !projects/**
📒 Files selected for processing: 119
  • docs/architecture docs/ADR-INDEX.md
  • docs/architecture docs/adrs/ADR 157 - Execution enums.md
  • docs/architecture docs/adrs/ADR 244 - Check constraints are opaque wire-named expressions.md
  • docs/architecture docs/adrs/ADR 249 - Central attribute-spec registry.md
  • docs/architecture docs/adrs/ADR 258 - List cardinality has independent container and element nullability.md
  • docs/architecture docs/adrs/ADR 267 - A table may hold columns its model does not map.md
  • docs/architecture docs/subsystems/1. Data Contract.md
  • docs/architecture docs/subsystems/5. Adapters & Targets.md
  • docs/reference/error-reference.md
  • packages/1-framework/3-tooling/language-server/test/completion-provider.test.ts
  • packages/2-sql/1-core/contract/src/ir/storage-column.ts
  • packages/2-sql/1-core/contract/src/ir/storage-entry-schemas.ts
  • packages/2-sql/1-core/contract/src/validators.ts
  • packages/2-sql/1-core/contract/test/validators.test.ts
  • packages/2-sql/2-authoring/contract-prisma7/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-prisma7/test/defaults.test.ts
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/dbgenerated-without-expression-optional/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/defaults/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/enum-native/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/ignored-field-defaults/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/list-defaults/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/native-types-accepted/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/number-default-spellings/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/number-defaults/expected-contract.json
  • packages/2-sql/2-authoring/contract-prisma7/test/fixtures/scalars/expected-contract.json
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-psl/src/psl-field-resolution.ts
  • packages/2-sql/2-authoring/contract-psl/src/sql-attribute-specs.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.list-field-equals-single-field.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.no-check.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.nullable-list-shapes.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.unknown-attributes.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/sql-attribute-specs.test.ts
  • packages/2-sql/2-authoring/contract-ts/schemas/data-contract-sql-v1.json
  • packages/2-sql/2-authoring/contract-ts/src/contract-definition.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-dsl.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-errors.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-lowering.ts
  • packages/2-sql/2-authoring/contract-ts/src/describe-column.ts
  • packages/2-sql/2-authoring/contract-ts/src/exports/contract-builder.ts
  • packages/2-sql/2-authoring/contract-ts/src/lower-column.ts
  • packages/2-sql/2-authoring/contract-ts/src/storage-description.ts
  • packages/2-sql/2-authoring/contract-ts/test/check-constraint.authoring.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/column-node.equation.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/merge-tables.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/no-check-declared-types.test-d.ts
  • packages/2-sql/2-authoring/contract-ts/test/scalar-list-output-types.test-d.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.storage-column-types.test.ts
  • packages/3-extensions/pgvector/test/migrations/vector-list-default.integration.test.ts
  • packages/3-extensions/supabase/src/contract/CONTRACT-FIDELITY.md
  • packages/3-extensions/supabase/src/contract/contract.d.ts
  • packages/3-extensions/supabase/src/contract/contract.json
  • packages/3-extensions/supabase/src/contract/contract.prisma
  • packages/3-extensions/supabase/test/contract-completeness.test.ts
  • packages/3-targets/3-targets/postgres/src/core/psl-infer/infer-model-blocks.ts
  • packages/3-targets/3-targets/postgres/src/core/psl-print/model-attributes.ts
  • packages/3-targets/3-targets/postgres/src/core/psl-print/refusals.ts
  • packages/3-targets/3-targets/postgres/src/core/psl-print/scalar-fields.ts
  • packages/3-targets/3-targets/postgres/test/psl-infer/infer-column-types.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-infer/inferred-psl/inferred-psl.check.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-infer/inferred-psl/inferred-psl.enums.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-infer/inferred-psl/inferred-psl.list-element-nullability.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-infer/inferred-psl/inferred-psl.literal-defaults.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-infer/inferred-psl/inferred-psl.nullable-list.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-print/column-defaults.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-print/refusals-fields.test.ts
  • packages/3-targets/6-adapters/postgres/test/migrations/bytea-sql-defaults.integration.test.ts
  • packages/3-targets/6-adapters/postgres/test/migrations/check-lifecycle-e2e.integration.test.ts
  • packages/3-targets/6-adapters/postgres/test/migrations/codec-literal-defaults.integration.test.ts
  • packages/3-targets/6-adapters/postgres/test/migrations/planner.list-literal-defaults.integration.test.ts
  • packages/3-targets/6-adapters/postgres/test/migrations/schema-verify.cast-literal-defaults.integration.test.ts
  • skills/prisma-8/references/contract.md
  • skills/prisma-8/references/quickstart.md
  • test/integration/test/authoring/attribute-specs.lsp-consumability.test.ts
  • test/integration/test/cli-journeys/bytea-defaults.e2e.test.ts
  • test/integration/test/cli-journeys/infer-roundtrip-fidelity.brace-array-defaults.e2e.test.ts
  • test/integration/test/cli-journeys/infer-roundtrip-fidelity.e2e.test.ts
  • test/integration/test/cli-journeys/infer-roundtrip-fidelity.enforced-element-check.e2e.test.ts
  • test/integration/test/cli-journeys/infer-roundtrip-fidelity.hand-written-check.e2e.test.ts
  • test/integration/test/cli-journeys/infer-roundtrip-fidelity.prisma7-defaults.e2e.test.ts
  • test/integration/test/cli-journeys/infer-roundtrip-fidelity/harness.ts
  • test/integration/test/cli-journeys/prisma7-source.e2e.test.ts
  • test/integration/test/cli-journeys/prisma7-source.remove-nocheck-upgrade.e2e.test.ts
  • test/integration/test/cli-journeys/remove-nocheck-upgrade-ledger.e2e.test.ts
  • test/integration/test/psl-print/authored-contract-roundtrip.integration.test.ts
  • test/integration/test/scalar-lists/orm-list-include-nulls.integration.test.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixture-generator.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/20260101T0000_initial/migration.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/20260101T0000_initial/migration.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/20260101T0000_initial/ops.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/20260201T0000_add_labels/migration.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/20260201T0000_add_labels/migration.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/20260201T0000_add_labels/ops.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/app/refs/head.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/snapshots/43d3880fa8b128e29f8a96c203566329c0ed35a2884901cbad49e2633b812f54/contract.d.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/snapshots/43d3880fa8b128e29f8a96c203566329c0ed35a2884901cbad49e2633b812f54/contract.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/snapshots/d52545171b2ee43107e1a619867dde006d83c7ab8d23bc2f4797524c76c3a662/contract.d.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/migrations/snapshots/d52545171b2ee43107e1a619867dde006d83c7ab8d23bc2f4797524c76c3a662/contract.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/prisma/contract.d.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/after/prisma/contract.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/20260101T0000_initial/migration.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/20260101T0000_initial/migration.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/20260101T0000_initial/ops.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/20260201T0000_add_labels/migration.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/20260201T0000_add_labels/migration.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/20260201T0000_add_labels/ops.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/app/refs/head.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/snapshots/0afd7bad7a1e491be0530915cb0a910ce38a75e6195e0cf37fd752329d2bb9ab/contract.d.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/snapshots/0afd7bad7a1e491be0530915cb0a910ce38a75e6195e0cf37fd752329d2bb9ab/contract.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/snapshots/1cc4868e51782f6a87585b26cbfdd83c44f89b973de022f42bfdddf93bce72cb/contract.d.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/migrations/snapshots/1cc4868e51782f6a87585b26cbfdd83c44f89b973de022f42bfdddf93bce72cb/contract.json
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/prisma/contract.d.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/fixtures/before/prisma/contract.json
  • test/integration/test/upgrade-instructions/remove-nocheck/remove-nocheck.test.ts
  • test/integration/test/upgrade-instructions/remove-nocheck/test-helpers.ts
  • upgrade-instructions/pending/remove-nocheck/app/instructions.md
  • upgrade-instructions/pending/remove-nocheck/app/scripts/remove-nocheck/remove-nocheck.ts
  • upgrade-instructions/pending/remove-nocheck/extension/instructions.md
  • upgrade-instructions/pending/remove-nocheck/extension/scripts/remove-nocheck/remove-nocheck.ts
💤 Files with no reviewable changes: 24
  • packages/2-sql/2-authoring/contract-psl/test/sql-attribute-specs.test.ts
  • packages/2-sql/2-authoring/contract-ts/schemas/data-contract-sql-v1.json
  • packages/2-sql/2-authoring/contract-ts/src/contract-lowering.ts
  • packages/2-sql/2-authoring/contract-ts/test/no-check-declared-types.test-d.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.no-check.test.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-errors.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.nullable-list-shapes.test.ts
  • packages/3-targets/3-targets/postgres/src/core/psl-print/scalar-fields.ts
  • packages/2-sql/2-authoring/contract-ts/src/exports/contract-builder.ts
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-ts/test/merge-tables.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/scalar-list-output-types.test-d.ts
  • docs/reference/error-reference.md
  • test/integration/test/psl-print/authored-contract-roundtrip.integration.test.ts
  • packages/3-targets/3-targets/postgres/test/psl-print/column-defaults.test.ts
  • packages/2-sql/2-authoring/contract-ts/src/describe-column.ts
  • packages/2-sql/2-authoring/contract-ts/src/storage-description.ts
  • packages/2-sql/2-authoring/contract-psl/src/sql-attribute-specs.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-definition.ts
  • packages/2-sql/1-core/contract/src/ir/storage-entry-schemas.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.storage-column-types.test.ts
  • packages/2-sql/1-core/contract/src/ir/storage-column.ts
  • packages/2-sql/2-authoring/contract-psl/src/psl-field-resolution.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-dsl.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

Changes

Check opt-out removal and migration

Layer / File(s) Summary
Contract and authoring surfaces
packages/2-sql/..., docs/...
Removes noCheck from SQL contract schemas, PSL attributes, TypeScript builders, validation, completion, and documentation.
Nullability-based inference
packages/3-targets/..., packages/2-sql/..., packages/3-extensions/...
Uses list element nullability and exact derived check names to determine inferred list types. Prisma 7 and affected fixtures now use nullable elements.
Stored-contract upgrade tooling
upgrade-instructions/...
Adds scripts that remove legacy keys, update nullability, recalculate hashes, rename snapshots, and update migration references.
Upgrade validation
test/integration/test/...
Adds generated fixtures and integration journeys for contract rewriting, migration ledgers, verification, conflict handling, and recovery.

Priority: ➖ Normal

Estimated code review effort: 5 (Critical) | ~120 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Project as Project files
  participant Script as remove-nocheck script
  participant Contract as Stored contract
  participant Snapshots as Snapshots and migrations
  Project->>Script: Scan contracts and references
  Script->>Contract: Remove noCheck and update element nullability
  Script->>Script: Recalculate storage hashes
  Script->>Snapshots: Update directories and hash references
  Script->>Project: Write validated changes
Loading

Suggested reviewers: wmadden

Merge Risk: ⚪ Minimal · up to b146e

This change removes the check opt-out and expresses nullable list elements directly as T?[], with an upgrade script for existing stored contracts. The documented consequences, such as storage-hash changes, re-signing, and migration-status effects, are intentional and covered by the upgrade instructions. No blocking defects were found.

Security architecture risk: 🔵 Low · up to b146e

The change makes nullable-list types better reflect what the database permits and removes check waivers. The main risk is operational: upgrading rewrites historical migration identities and requires coordinated database signing. Concurrent upgrade runs can interfere with recovery.

Retained concerns

  • Low · reliability · inferred: The new upgrader uses deterministic temporary paths and deletes discovered temporary leftovers without invocation ownership or locking. Concurrent runs can remove each other's staging state or collide during replacement, interrupting the contract, snapshot, and reference transition. Sequential recovery and a committed backup mitigate this, but do not provide concurrent failure containment.
Security review details

Security Blast Radius

  • observed — The rewrite operates with the invoking user's filesystem authority and follows directory and file symlinks. Its effective scope therefore includes linked destinations, rather than being a strict root-directory sandbox. Database signing is a separate operator step; the rewrite itself needs no database connection.

Security Findings and Attack Paths

  • inferred — An actor with table-altering authority could supply an exact expected constraint name with an ineffective expression, or an unvalidated constraint over pre-existing invalid rows, and inference would still select strict element types. The full PR comparison shows that this name-only trust assumption predates the change; no newly expanded exposure was established. Ordinary row-write authority alone does not establish this attack path.

Trust Boundaries and Controls

  • observed — Live checks are queried within the selected PostgreSQL namespace and grouped by table before inference. Derived-name matching is then performed for that table's columns. This bounds matching to the selected schema and table, but does not validate the live predicate or convalidated state.

Resilience and Maintainability Implications

  • observed — Hash-identity and destination-content checks guard against rewriting inconsistent inputs. The instructions require a committed backup and describe stale database markers as blocking verification and migration until signing. These controls support recoverability, but are separate from atomicity or exclusive ownership of the filesystem transition.

Hardening Proposals

  • proposed — Make trusted linked destinations and single-writer, quiescent execution explicit upgrade preconditions. A root-scoped lock and invocation-owned staging would strengthen recovery isolation without changing the contract semantics.
Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 50 functions across 50 files. (45 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: removing @noCheck and representing nullable list elements as T?[].
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 50 functions across 50 files. (45 skipped: 40 unsupported, 5 over the file limit.)

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

npm i https://pkg.pr.new/@prisma/orm-extension-arktype-json@30741

@prisma/orm-extension-middleware-cache

npm i https://pkg.pr.new/@prisma/orm-extension-middleware-cache@30741

@prisma/orm-extension-paradedb

npm i https://pkg.pr.new/@prisma/orm-extension-paradedb@30741

@prisma/orm-extension-pgvector

npm i https://pkg.pr.new/@prisma/orm-extension-pgvector@30741

@prisma/orm-extension-postgis

npm i https://pkg.pr.new/@prisma/orm-extension-postgis@30741

@prisma/orm-extension-supabase

npm i https://pkg.pr.new/@prisma/orm-extension-supabase@30741

@prisma/orm-family-mongo

npm i https://pkg.pr.new/@prisma/orm-family-mongo@30741

@prisma/orm-family-sql

npm i https://pkg.pr.new/@prisma/orm-family-sql@30741

@prisma/orm-framework

npm i https://pkg.pr.new/@prisma/orm-framework@30741

@prisma/orm-mongo

npm i https://pkg.pr.new/@prisma/orm-mongo@30741

@prisma/orm-postgres

npm i https://pkg.pr.new/@prisma/orm-postgres@30741

@prisma/orm-sqlite

npm i https://pkg.pr.new/@prisma/orm-sqlite@30741

@prisma/orm-target-mongo

npm i https://pkg.pr.new/@prisma/orm-target-mongo@30741

@prisma/orm-target-postgres

npm i https://pkg.pr.new/@prisma/orm-target-postgres@30741

@prisma/orm-target-sqlite

npm i https://pkg.pr.new/@prisma/orm-target-sqlite@30741

@prisma/orm-toolchain

npm i https://pkg.pr.new/@prisma/orm-toolchain@30741

commit: b146e07

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 247.91 KB (-0.25% 🔽)
postgres / emit 219.39 KB (-0.12% 🔽)
mongo / no-emit 200.55 KB (0%)
mongo / emit 177.68 KB (0%)
cf-worker / no-emit 308.75 KB (-0.2% 🔽)
cf-worker / emit 276.82 KB (-0.08% 🔽)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@wmadden-electric @claude
Each remove-nocheck test names one import root
b146e07
The Prisma 7 upgrade journey lives with the published-only journeys, so
it now takes the storage hash function and the Postgres serializer from
@prisma/orm-postgres. The fixture generator writes migration.ts files
that import @internal/postgres/migration, the workspace name of the
same module, so the integration package no longer names the published
root.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
wmadden
wmadden approved these changes Oct 16, 2026
View reviewed changes
@wmadden
wmadden added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026

Uh oh!

There was an error while loading. Please reload this page.

@wmadden
wmadden added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026

Uh oh!

There was an error while loading. Please reload this page.

@wmadden
wmadden added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit f66a491 Oct 16, 2026
24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@wmadden
wmadden deleted the tml-3595-remove-nocheck branch October 16, 2026 06:30
@wmadden-electric wmadden-electric mentioned this pull request Oct 19, 2026
blog(orm8): enums no longer offer @noCheck(membership) prisma/web#8520
Merged
ankur-arch added a commit to prisma/web that referenced this pull request Oct 19, 2026
@wmadden-electric @claude @ankur-arch
blog(orm8): enums no longer offer @nocheck(membership) (#8520)
24a60bc
* blog(orm8): enums no longer offer @nocheck(membership)

Prisma ORM 8 removed @nocheck (prisma/orm#30741). An enum column always
gets its CHECK constraint, so changing its values is a migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

* blog(orm8): scope the enum CHECK claim to managed tables, link the enums section

Prisma ORM 8 generates the membership check only on tables it manages,
so both enum entries now say so. The PSL link points at the Enums
section, which has no @nocheck guidance.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Ankur Datta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@wmadden wmadden wmadden approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@wmadden-electric @wmadden
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.