← Back to Pull requests

docs(guides): framework guides plan a migration for schema changes, and match create-prisma 0.14.8 #8888

Closed
unknown closed this pull request without merging on Nov 20, 2026 14:04 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 12:05 UTC
Author

Five framework guides told readers to change the schema of a scaffolded app like this:

npm run contract:emit
npm run db:update

That changes the local database and writes no migration. But npm create prisma commits a first migration when it scaffolds, and a deploy applies only committed migrations. After those two commands, the project is in a state the next step cannot leave:

$ npm run migration:status
MIGRATION.MARKER_NOT_IN_HISTORY

npm run dev:composer, which runs the same code a deploy runs, stops with MIGRATION_PATH_NOT_FOUND. So the schema change would never reach the hosted database.

Every guide whose scaffold ships migrations now has a "Change the schema" section with the flow that works:

npm run contract:emit
npm run migration:plan -- --name <name>
npm run migrate -- --advance-ref db

and then commit migrations/, including refs/db.json. A reader who applies migrations by restarting npm run dev:composer, with no database in DATABASE_URL, sets the db ref by hand afterwards with npx prisma migration ref set db <new migration directory name>, because dev:composer does not write it. The section also covers a checkout where db:init never ran, and recovery after a db:update.

This is one of 21 findings on the framework and runtime guides from a full audit of the Prisma ORM 8 docs against prisma 8.0.0-rc.34 and create-prisma 0.14.8. This pull request fixes them.

What changed

  • Change the schema, as above, on Next.js, Astro, Nuxt, SvelteKit, TanStack Start, NestJS, Hono, Elysia and the Bun runtime guide. The flow was run twice in a row on a fresh scaffold for each kind of reader. It matches the flow on the create-prisma page.

  • db:init output. Ten pages showed a "summary": ... line, which is the --json field. They now show what the terminal prints, and the real message for a second run (Database already matches contract).

  • SolidStart. The starter contract, the generated db.ts and the sample output were from an older version. They are now what orm init writes at rc.34.

  • React Router. The minimum on the Node.js 22 line is 22.22, which React Router 8 requires.

  • Elysia and Bun. The minimum Bun version is 1.3.

  • Next.js. The standalone warning is corrected from the Composer source: a deploy stops with an error asking for output: "standalone".

  • Vite plugin. Astro, Nuxt, SvelteKit and TanStack Start say how to add it. Nuxt needs the path ../prisma.config.ts.

  • Agent prompts no longer tell the agent to install the skills a second time; the scaffold already installs them.

  • MongoDB. Eight pages say what a MongoDB project needs for dev:composer and a deploy.

  • Hono uses Bun commands throughout, matching its scaffold.
  • Not changed

    The SvelteKit guide stays a local-only guide. create-prisma 0.14.8 generates deploy files for SvelteKit and accepts --deploy for it, and the app runs in the local Compute emulator, but no real deploy was run, so the page makes no claim about deploying.

    How it was checked

    An implementer verified each finding before changing a page, by scaffolding with create-prisma 0.14.8 and running the steps against PostgreSQL. A separate reviewer then followed one guide exactly as written for both kinds of reader, in two rounds; all of its findings are fixed. pnpm lint:links, pnpm lint:versions and pnpm lint:spellcheck pass.

    Not verified: the npm run build step of the Next.js guide. The Next.js version the template pins (16.4.2) stopped the build in the test environment with a security error.

    Agent: gagarin-12
    🤖 Generated with Claude Code

    Diff: 461 lines (+345 / -116) across 5 files Reviewer: ankur-arch Review duration: 119m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.69) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.69 · 461 lines diff across 5 files
    0.69
    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.367
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.069
    Real PR Conversation Timeline
    1 comments
    "Review active on #8888"
    general weight: 0.35
    Reviewers
    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: 68.7% (HIGH) · Higher = larger blast radius
    68.7%
    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: 27.2% · Safe to merge
    27.2%
    Repository