docs(studio): add Studio with Prisma Next and the Migrations view#8075
Conversation
Prisma Studio's Migrations view reads the migration ledger Prisma Next writes into the database and renders it as a timeline, with a visual diff, the executed SQL, and a schema diff per applied migration. The Prisma Next docs had no Studio coverage at all, so this adds a page and links it from the places a reader would look. New page: /studio/prisma-next — prerequisites, `npm create prisma@next`, Prisma Postgres, the plan/apply loop, launching Studio, reading the view, where it's available (local + Console), limitations, and troubleshooting. Linked from the Studio landing page and getting-started, the four Prisma Next migration pages, the Prisma Next overview, and the Prisma Postgres "Viewing data" guide. Every command and schema block was run against a fresh `npm create prisma@next` project on Prisma Postgres, and the screenshots come from that database's six applied migrations. Notes for review: - The view shipped in @prisma/studio-core 0.32.0; the Prisma CLI only carries a new enough Studio on its `dev` release today, so the page says `npx prisma@dev studio` explicitly rather than implying `prisma@latest` works. Worth a follow-up once it lands in a stable CLI. - Two scaffold gotchas are documented because a reader hits both: `db.orm` is namespace-keyed (`db.orm.public.User`), and Studio needs DATABASE_URL loaded from .env before `--url` resolves. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a new Prisma Next Studio guide covering project setup, migration history, schema and SQL diffs, and database-backed migration records. Links to the guide are added across Prisma Next, Studio, migration, and data-viewing documentation. ChangesPrisma Next Studio guide
Documentation navigation and cross-links
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
🍈 Lychee Link Check Report116 links: ✅ All links are working!Full Statistics Table
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Removed all em dashes, added verified expected output to the migrate and
seed steps, converted exact prerequisites to a list, and rephrased the
'How it works' and availability headings as questions ('Where does the
history come from?', 'Where does the Migrations view appear?') so they
match how readers ask, following the GEO pattern from the Vercel
deployment guide refresh (#7997).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/content/docs/studio/prisma-next.mdx`:
- Around line 23-25: Change the command-only Markdown fences in the Prisma Next
documentation to use the npm language identifier, including the blocks around
the initial create command, project setup, Prisma commands, and database
seeding. Leave the environment-loading snippet around lines 123-126 fenced as
bash.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e437473f-bf29-40b1-8ddf-76765d9ef6ce
⛔ Files ignored due to path filters (6)
apps/docs/public/img/studio/prisma-next-migrations/studio-migrations-add-model-relation.pngis excluded by!**/*.pngapps/docs/public/img/studio/prisma-next-migrations/studio-migrations-all-models.pngis excluded by!**/*.pngapps/docs/public/img/studio/prisma-next-migrations/studio-migrations-schema-diff.pngis excluded by!**/*.pngapps/docs/public/img/studio/prisma-next-migrations/studio-migrations-sql-panel.pngis excluded by!**/*.pngapps/docs/public/img/studio/prisma-next-migrations/studio-migrations-timeline.pngis excluded by!**/*.pngapps/docs/public/img/studio/prisma-next-migrations/studio-post-table-data.pngis excluded by!**/*.png
📒 Files selected for processing (10)
apps/docs/content/docs/guides/postgres/viewing-data.mdxapps/docs/content/docs/orm/next/index.mdxapps/docs/content/docs/orm/next/migrations/applying-a-migration.mdxapps/docs/content/docs/orm/next/migrations/generating-a-migration.mdxapps/docs/content/docs/orm/next/migrations/how-migrations-work.mdxapps/docs/content/docs/orm/next/migrations/the-migration-graph.mdxapps/docs/content/docs/studio/getting-started.mdxapps/docs/content/docs/studio/index.mdxapps/docs/content/docs/studio/meta.jsonapps/docs/content/docs/studio/prisma-next.mdx
What
Adds a new docs page for Prisma Studio's Migrations view, and links it from the pages where a reader would look for it. The Prisma Next docs previously had zero Studio coverage.
The Migrations view reads the migration ledger Prisma Next writes into the database and renders it as a newest-first timeline, with a visual diff canvas, the executed SQL, and a Prisma-schema diff per applied migration.
New page:
/studio/prisma-next— prerequisites →npm create prisma@next→ Prisma Postgres → plan/apply → launch Studio → read the view → where it's available (local + Console) → limitations → troubleshooting.Linked from (each link helps a reader discover or complete the workflow):
studio/index+studio/getting-startedschema.prisma, so--urlis requiredorm/next/indexorm/next/migrations/{how-migrations-work,the-migration-graph,generating-a-migration,applying-a-migration}guides/postgres/viewing-dataVerification
Every command and schema block was run against a fresh
npm create prisma@nextproject on Prisma Postgres. Screenshots are that database's six applied migrations (models, fields, an enum, a relation, unique constraints, and a destructive drop).pnpm lint:links→ 632 files, 0 errorspnpm lint:images→ all local image references resolvecspell→ cleanReviewed by independent fact/code/reader agents; findings applied. Notably they caught that the walkthrough had been written against an already-patched project — a fresh scaffold was then used to verify, which corrected two real defects (below).
Notes for review
@prisma/studio-core0.32.0 (verified by unpacking the tarballs — 0.31.2 has none of it). The Prisma CLI only carries a new enough Studio on itsdevrelease today;prisma@latest(7.8.0) still bundles 0.27.3. The page therefore saysnpx prisma@dev studioexplicitly rather than implyingprisma@latestworks. Worth a follow-up to drop the@devonce it lands in a stable CLI.create-prisma@nextbugs and may deserve upstream issues rather than docs workarounds:seed.tsusesdb.orm.User, butdb.ormis namespace-keyed —db.orm.public.Useris the working form. As scaffolded,npm run db:seedalways throws.npx prisma studio --url "$DATABASE_URL"fails verbatim:DATABASE_URLlives in.env, not the shell. Everyprisma-nextcommand works anyway becauseprisma-next.config.tsimportsdotenv/config; Studio has no such fallback.pnpm types:checkfails in@prisma/eclipse(codeblock.tsx) andpnpm buildfails on a missingMXBAI_API_KEYfor/api/search. Both reproduce on a cleanmain.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
schema.prismafile.