Skip to content

Release 8.0.0-rc.37: Prisma ORM 8.0.0-rc.26, Composer 0.41.0, and adds prisma migration ref policy - #420

Merged
wmadden-electric merged 8 commits into
mainfrom
claude/follow-orm-composer-main
Dec 2, 2026
Merged

wmadden-electric merged 8 commits into
mainfrom
claude/follow-orm-composer-main

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

Merging this pull request publishes prisma and @prisma/cli 8.0.0-rc.37 under the next dist-tag. It pins Prisma ORM 8.0.0-rc.26 and Composer 0.41.0 exactly. npm install prisma keeps getting rc.36 until a maintainer promotes rc.37 to latest with promote.yml.

The release adds three commands from ORM rc.26: prisma migration ref policy set, show and delete. They record how an environment's database may change:

$ prisma migration ref policy set production --change migrate --data-loss forbidden
✔ Updated the policies ref production declares (migrations/app/refs/production.json)

change:                   migrate, reconcile (default)  →  migrate  tightens
dataProtection.dataLoss:  data-loss-with-consent (default)  →  data-loss-forbidden  tightens

$ prisma migration ref policy show production
change:                         migrate
dataProtection.dataLoss:        data-loss-forbidden
dataProtection.accessWidening:  not declared

A ref is a named environment, such as production. It points to the contract (the schema description) that its database should be at. The ref's policies say how that database may change:

  • through migrations (migrate), through db update (reconcile), or both;
  • whether a change may lose data;
  • whether a change may widen who can read or write data.

tightens means the new policy allows less than the old one. The commands only edit the ref's file.

Why the commands and the pins land together

The ORM and Composer ship their commands as packages, and the CLI mounts each command: it adds the command to prisma's command tree by its path. The commands come from the ORM, so they exist only from rc.26.

The two halves cannot land apart:

Dev builds of the CLI use the ORM's dev build, which already has the commands, so every dev publish from main has failed at check:grammar since 2026-11-27. This merge removes that failure.

ORM rc.26 also changes @prisma/orm-postgres: it now names @prisma/orm-family-sql and @prisma/orm-target-postgres as peer dependencies, where it used to install them itself. The CLI installs @prisma/orm-postgres for Composer's Prisma Cloud deploy target (@prisma/composer-prisma-cloud). So the CLI now lists those two packages itself, pinned to the same version as the rest of the ORM. Otherwise the package manager would choose their versions.

What changes

  • packages/cli/src/cli.ts mounts the three commands and gives the migration ref policy group its help text. The tests that list every mounted command name them. e2e-coverage.test.ts excludes them from the rule that every command needs a real-API test, for the reason every ORM command has: they never call the management API.
  • Both packages/cli and packages/prisma pin every @prisma/orm-* package at 8.0.0-rc.26, including the two new ones, and the three Composer packages at 0.41.0. pnpm bump-version set every package to 8.0.0-rc.37.
  • scripts/update-product-versions.mjs opens the CLI's release pull request when a product publishes. It now sets the two new packages to the version of @prisma/orm-toolchain, like the other ORM packages. pnpm-workspace.yaml exempts them from pnpm's minimum release age, so a release less than a day old installs. New tests check that every ORM and Composer package the CLI pins is covered by both.
  • docs/oss/release-automation.md explains how a product's new command reaches the CLI. This pull request follows that procedure.

How it was checked

  • On the released packages:
    • All @prisma/orm-* packages are on npm at 8.0.0-rc.26, and all @prisma/composer* packages at 0.41.0.
    • @prisma/composer-prisma-cloud@0.41.0 requires ORM 8.0.0-rc.26, so its pins match these.
    • The lockfile has no rc.25 or 0.40.0 left.
    • Typecheck, lint and the CLI's mount tests pass (mount-coverage, orm-mount, composer-mount, e2e-coverage and cli-command).
  • On the ORM's and Composer's dev builds (8.0.1-dev.37 and 0.40.0-dev.4, before they released): the packed CLI ran in a new project on a local Postgres. It ran orm init, contract emit, migration plan, migration ref set, the three policy commands, db migrate --to production, db update, db verify, db sign, db schema, contract infer and migration status.
  • Not yet repeated on the released packages. That run is the next step after this merges. It installs rc.37 from npm by exact version, before anyone promotes it, and covers two cases: a fresh deploy, and an upgrade from rc.36 with Composer 0.40.0. rc.37 stays off latest unless both pass.

Alternatives considered

  • Mount the new commands only when the installed ORM has them, so this could have merged before the ORM released. Rejected: product code should not detect which build of a product it was built with.
  • Push these commits onto the workflow's own release pull request. Rejected: each product release closes that pull request and opens a new one, so the commits would have been lost between the ORM's release and Composer's.

Agent: cobain-55

🤖 Generated with Claude Code

…-postgres's new peers

ORM main adds 'migration ref policy set|show|delete' and makes
@prisma/orm-postgres name @prisma/orm-family-sql and
@prisma/orm-target-postgres as peers. Mount the three commands with a
group description, list the two peers in both manifests at the
toolchain's version, follow them in update-product-versions, and exempt
them from the install-age quarantine like the other ORM packages.

Needs the ORM release after 8.0.0-rc.25: on rc.25 the three commands
do not exist. The release pull request moves the pins in the same change.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…clean lockfile

- The policy group card matches the ORM's: no deploy claim. The parent
  'migration ref' card now says refs name environments and declare
  policies.
- Tests cover every ORM package that follows the toolchain, and check
  that every product package the shell pins is watched and exempt from
  the install-age quarantine.
- release-automation.md describes how a product's new command lands.
- pnpm-lock.yaml regenerated from main's, without unrelated
  re-resolution.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
- The quarantine test reads minimumReleaseAgeExclude's own entries, so a
  commented-out exemption fails it.
- The doc's procedure says to rebuild the lockfile from main's and to
  check the Composer release's ORM peers; its table names which package
  names which peer.
- Comments state the real condition for sharing the toolchain's version:
  the ORM publishes these packages together.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary by CodeRabbit

  • New Features
    • Added migration ref policy set, show, and delete commands for managing database-change policies on named environments.
    • Updated command help to describe supported change modes, safety protections, and defaults when a policy isn’t specified.
  • Documentation
    • Expanded release-automation guidance with steps for adding and validating product commands and their version pins.
  • Release Updates
    • Updated Prisma and related package versions to the latest release candidates.

Walkthrough

The CLI now mounts migration ref policy delete, set, and show, with updated help text and mount coverage. Release automation assigns additional ORM packages the toolchain version. Product manifests, workspace exclusions, tests, and documentation reflect the package set and updated release versions.

Merge Risk: Minimal · up to 07180 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the release version, the bundled Prisma ORM and Composer pins, and the new prisma migration ref policy command. The changeset bumps all package versions to 8.0.0-rc.37, pins ORM 8.0.…
Description check Passed The description explains the release, the new migration ref policy commands, why the pins and mounts land together, the workflow and minimum-release-age changes, and how the change was validated. It…
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: Title check

Explanation

The title names the release version, the bundled Prisma ORM and Composer pins, and the new prisma migration ref policy command. The changeset bumps all package versions to 8.0.0-rc.37, pins ORM 8.0.0-rc.26 and Composer 0.41.0, and mounts the three policy commands. The title is specific and matches the main changes, though it is long (100 characters).

Full details: Description check

Explanation

The description explains the release, the new migration ref policy commands, why the pins and mounts land together, the workflow and minimum-release-age changes, and how the change was validated. It matches the changeset closely.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6789a8e0-8747-45dd-adff-f5c409eb6e40
Commits

Reviewing files that changed from the base of the PR and between 7372b9a and 07180a8.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 18

  • docs/oss/release-automation.md
  • package.json
  • packages/cli-conformance/package.json
  • packages/cli-engine/package.json
  • packages/cli-telemetry/package.json
  • packages/cli/package.json
  • packages/cli/scripts/shell-conformance-inputs.ts
  • packages/cli/src/cli.ts
  • packages/cli/tests/e2e-coverage.test.ts
  • packages/cli/tests/mount-coverage.test.ts
  • packages/cli/tests/orm-mount.test.ts
  • packages/compute/package.json
  • packages/prisma/package.json
  • packages/tsconfig/package.json
  • pnpm-workspace.yaml
  • scripts/update-product-versions.mjs
  • scripts/update-product-versions.test.mjs
  • skills/prisma-platform-core-concepts/SKILL.md

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

wmadden-electric added a commit to prisma/orm that referenced this pull request Dec 2, 2026
…m a level promotion

The docs and the publish.yml comment no longer cite prisma/prisma-cli#420:
Composer and the CLI each have their own publish-then-promote change,
prisma/composer#473 and a CLI pull request still to be opened. ADR 330
calls the tag step moving latest, so promotion keeps meaning a move up a
level; the other docs and the skills say promotion to latest. ADR 330
records the token alternatives and no longer says releases before 8.0
went under latest, and its index row names the decision. supply-chain.md
says only the token job runs from main, "Who can publish" gives the
first-publish exception, and the shipped upgrade references say latest
is the newest release promoted to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
wmadden-electric and others added 2 commits December 2, 2026 16:58
…de/follow-orm-composer-main

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

# Conflicts:
#	docs/oss/release-automation.md
Pin the ORM packages to 8.0.0-rc.26 and the Composer packages to 0.41.0
exactly, and bump the release to 8.0.0-rc.37.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@pkg-pr-new

pkg-pr-new Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@420
npx https://pkg.pr.new/@prisma/cli-engine@420

commit: 07180a8

… only reads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric wmadden-electric changed the title feat(cli): add prisma migration ref policy from the next ORM release, and restore dev publishing Release 8.0.0-rc.37: Prisma ORM 8.0.0-rc.26, Composer 0.41.0, and adds prisma migration ref policy Dec 2, 2026
@wmadden-electric
wmadden-electric marked this pull request as ready for review December 2, 2026 08:38
@wmadden-electric
wmadden-electric merged commit a067110 into main Dec 2, 2026
16 checks passed
@wmadden-electric
wmadden-electric deleted the claude/follow-orm-composer-main branch December 2, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant