Skip to content

docs(studio): add Studio with Prisma Next and the Migrations view#8075

Merged
nurul3101 merged 5 commits into
mainfrom
docs/studio-prisma-next-migrations
Jul 17, 2026
Merged

docs(studio): add Studio with Prisma Next and the Migrations view#8075
nurul3101 merged 5 commits into
mainfrom
docs/studio-prisma-next-migrations

Conversation

@ankur-arch

@ankur-arch ankur-arch commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

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):

Page Why
studio/index + studio/getting-started the section entry points; getting-started also now notes Prisma Next has no schema.prisma, so --url is required
orm/next/index a card in Next steps
orm/next/migrations/{how-migrations-work,the-migration-graph,generating-a-migration,applying-a-migration} "See also" — you just wrote a ledger, here's how to read it
guides/postgres/viewing-data the canonical "view and edit your data" hub

Verification

Every command and schema block was run against a fresh npm create prisma@next project 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 errors
  • pnpm lint:images → all local image references resolve
  • cspell → clean
  • Rendered locally and reviewed: page, callouts, early-access badge, TOC, all 6 images

Reviewed 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

  1. Version. The view shipped in @prisma/studio-core 0.32.0 (verified by unpacking the tarballs — 0.31.2 has none of it). The Prisma CLI only carries a new enough Studio on its dev release today; prisma@latest (7.8.0) still bundles 0.27.3. The page therefore says npx prisma@dev studio explicitly rather than implying prisma@latest works. Worth a follow-up to drop the @dev once it lands in a stable CLI.
  2. Two scaffold gotchas are documented because a reader hits both. These look like create-prisma@next bugs and may deserve upstream issues rather than docs workarounds:
    • the scaffolded seed.ts uses db.orm.User, but db.orm is namespace-keyeddb.orm.public.User is the working form. As scaffolded, npm run db:seed always throws.
    • npx prisma studio --url "$DATABASE_URL" fails verbatim: DATABASE_URL lives in .env, not the shell. Every prisma-next command works anyway because prisma-next.config.ts imports dotenv/config; Studio has no such fallback.
  3. Pre-existing, not from this PR: pnpm types:check fails in @prisma/eclipse (codeblock.tsx) and pnpm build fails on a missing MXBAI_API_KEY for /api/search. Both reproduce on a clean main.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added documentation for using Prisma Studio with Prisma Next projects.
    • Documented the Migrations view, including migration history, schema diffs, executed SQL, and visual timelines.
    • Added guidance for setting up, migrating, seeding, and exploring Prisma Next projects in Studio.
  • Documentation

    • Added “Studio with Prisma Next” to relevant navigation, tutorials, and related-resource sections.
    • Clarified how to launch Studio for projects without a schema.prisma file.
    • Documented PostgreSQL availability, applied-migration requirements, and known limitations.

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>
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 17, 2026 10:56am
docs Ready Ready Preview, Comment Jul 17, 2026 10:56am
eclipse Ready Ready Preview, Comment Jul 17, 2026 10:56am
site Ready Ready Preview, Comment Jul 17, 2026 10:56am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds 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.

Changes

Prisma Next Studio guide

Layer / File(s) Summary
Project and migration setup
apps/docs/content/docs/studio/prisma-next.mdx
Documents creating a PostgreSQL Prisma Next project, applying migrations, updating the contract, and seeding data.
Migration history and Studio views
apps/docs/content/docs/studio/prisma-next.mdx
Explains opening Studio, reading migration records, viewing timeline, schema, SQL, and table data, plus availability and limitations.

Documentation navigation and cross-links

Layer / File(s) Summary
Studio route and entry points
apps/docs/content/docs/studio/meta.json, apps/docs/content/docs/studio/index.mdx, apps/docs/content/docs/studio/getting-started.mdx
Adds the Prisma Next route and links from Studio overview and setup pages.
Prisma Next migration links
apps/docs/content/docs/orm/next/index.mdx, apps/docs/content/docs/orm/next/migrations/*.mdx
Adds cards and related links to the Studio with Prisma Next guide.
Database viewing guidance
apps/docs/content/docs/guides/postgres/viewing-data.mdx
Notes that Prisma Studio provides a Migrations view for Prisma Next-managed databases.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • prisma/web#8076: Covers the Prisma Studio Migrations view for Prisma Next.
  • prisma/web#8025: Updates related Prisma Next migration documentation sections.
  • prisma/web#8043: Reworks the migration graph documentation also linked by this change.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the new Studio with Prisma Next documentation and Migrations view additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

116 links: ✅ 20 OK | 🚫 0 errors | 🔀 4 redirects | 👻 96 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 20
🔀 Redirected 4
👻 Excluded 96
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@argos-ci

argos-ci Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 17, 2026, 11:04 AM

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>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 623159e and 63cb56b.

⛔ Files ignored due to path filters (6)
  • apps/docs/public/img/studio/prisma-next-migrations/studio-migrations-add-model-relation.png is excluded by !**/*.png
  • apps/docs/public/img/studio/prisma-next-migrations/studio-migrations-all-models.png is excluded by !**/*.png
  • apps/docs/public/img/studio/prisma-next-migrations/studio-migrations-schema-diff.png is excluded by !**/*.png
  • apps/docs/public/img/studio/prisma-next-migrations/studio-migrations-sql-panel.png is excluded by !**/*.png
  • apps/docs/public/img/studio/prisma-next-migrations/studio-migrations-timeline.png is excluded by !**/*.png
  • apps/docs/public/img/studio/prisma-next-migrations/studio-post-table-data.png is excluded by !**/*.png
📒 Files selected for processing (10)
  • apps/docs/content/docs/guides/postgres/viewing-data.mdx
  • apps/docs/content/docs/orm/next/index.mdx
  • apps/docs/content/docs/orm/next/migrations/applying-a-migration.mdx
  • apps/docs/content/docs/orm/next/migrations/generating-a-migration.mdx
  • apps/docs/content/docs/orm/next/migrations/how-migrations-work.mdx
  • apps/docs/content/docs/orm/next/migrations/the-migration-graph.mdx
  • apps/docs/content/docs/studio/getting-started.mdx
  • apps/docs/content/docs/studio/index.mdx
  • apps/docs/content/docs/studio/meta.json
  • apps/docs/content/docs/studio/prisma-next.mdx

Comment thread apps/docs/content/docs/studio/prisma-next.mdx
@nurul3101
nurul3101 merged commit ea2474f into main Jul 17, 2026
16 of 17 checks passed
@nurul3101
nurul3101 deleted the docs/studio-prisma-next-migrations branch July 17, 2026 10:55
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.

2 participants