← Back to Pull requests

docs(orm): close seven small gaps on the migration and CLI pages #8855

Closed
unknown closed this pull request without merging on Nov 17, 2026 12:00 UTC
View on GitHub
unknown unknown commented on Nov 17, 2026 07:56 UTC
Author

A rollback in production was described three ways on three pages, and none said what to do with the ref a pipeline migrates to. The rollback steps now say it:

npx prisma migration ref set prod 20260707T1010_rollback_display_name
git add migrations/app/refs/prod.json
npx prisma db migrate --to prod

A pipeline that runs plain npx prisma db migrate needs no ref: it applies migrations up to the contract you reverted.

This pull request closes seven small items from the Prisma ORM 8 docs audit. Each is a few lines, so they travel together.

What changes for a reader

1. Rollback in production (orm/migrations/rollbacks-and-recovery.mdx). Step 3 now says to point the pipeline's ref at the rollback and commit its file. Step 4 says what each form of db migrate applies.
2. Which migration to roll back from (same page). --from <newest-migration-dir> was unclear once a history has two branches. The page now says to take the migration below the state that migration status labels @db, and shows that row.
3. One edited migration, two error codes (orm/migrations/applying-a-migration.mdx). migration check reports MIGRATION.CHECK_HASH_MISMATCH, while db migrate and migration status report MIGRATION.CONTRACT_SPACE_VIOLATION for the same edit. The page now names both and gives the one fix.
4. The table of contract references each command accepts moves from the concept page orm/migrations/the-migration-graph.mdx to cli/migration-ref.mdx, because apps/docs/CLAUDE.md puts reference material under cli/. The anchor #contract-reference-forms is the same, and the 15 links that pointed at it now point at the new page.
5. db update signs the database (cli/db-update.mdx). Other pages said so; the command's own page did not.
6. Quickstart browser titles. The two "Create a new app" pages still had "Quickstart: ..." as metaTitle.
7. prisma/prisma is now prisma/orm in the npx skills add command on ai/tools/skills.mdx, the GitHub star count URL, and one code comment. The star button's label now names the repository it links to.

How it was checked

On prisma 8.0.0-rc.34 with @prisma/orm-postgres 8.0.0-rc.24, in a scratch project against PostgreSQL 15:

  • A hand-edited ops.json gives MIGRATION.CHECK_HASH_MISMATCH (exit 4) from migration check, and MIGRATION.CONTRACT_SPACE_VIOLATION (exit 2) from db migrate and migration status.

  • migration ref set prod <rollback directory> writes migrations/app/refs/prod.json, and db migrate --to prod then applies the rollback migration.

  • db update writes the marker and advances the db ref.

  • prisma/orm has a skills/prisma-8 directory.
  • Two cold reader rounds ran with the docs-reader-review skill on the changed passages, and its three prose checks pass on every changed line. pnpm lint:links and pnpm lint:versions pass. The second round's remaining marks are on text this pull request does not change.

    Not in this pull request

    Audit item E17 (the Baselines paragraph) needed no change: main already says what the next migration plan writes after db sign. Item E19, about 50 older reader marks on the migration pages, is a separate reader pass.

    Agent: gagarin-12
    🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Documentation
    Updated MongoDB and PostgreSQL quickstart titles to emphasize creating a new app.
    Consolidated migration contract-reference guidance in the CLI documentation, including accepted formats and hash-prefix rules.
    Clarified migration hash-mismatch errors, recovery and rollback steps, and how to identify the correct migration.
    Updated migration command guidance and links, including how database updates record the matching contract.
    Corrected the Prisma ORM skill installation fallback command.

    Bug Fixes
    GitHub star counts now reference the Prisma ORM repository, and ecosystem card labels name the repository displayed.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 524 lines (+393 / -131) across 6 files Reviewer: wmadden-electric Review duration: 244m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.71) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 524 lines diff across 6 files
    0.71
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.375
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #8855"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 71.0% (HIGH) · Higher = larger blast radius
    71.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28% · Safe to merge
    28%
    Repository