Skip to content

docs: show the config file that prisma init actually writes on the v7 quickstarts - #8301

Open
ankur-arch wants to merge 3 commits into
mainfrom
docs/v7-init-generated-config
Open

ankur-arch wants to merge 3 commits into
mainfrom
docs/v7-init-generated-config

Conversation

@ankur-arch

@ankur-arch ankur-arch commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #7818.

The Prisma ORM 7 quickstart and add-to-existing-project pages said prisma init creates prisma.config.ts with env("DATABASE_URL") imported from prisma/config. Running npx prisma@prev init (prisma 7.10.0) in a clean directory writes prisma7.config.ts with the generator comment, no env import, and url: process.env["DATABASE_URL"]. Prisma 7.9 still wrote prisma.config.ts.

The fifteen pages pinned to prisma@prev now show the file as generated, rename it in the bullet and the code block title, and carry a short note about the rename and that the Prisma 7 CLI discovers either name. The two MongoDB pages are pinned to prisma 6.19.3 and are left alone.

Validation
  • npx -y prisma@prev init --datasource-provider postgresql --output ../generated/prisma in an empty directory: writes prisma7.config.ts with the content now shown; the CLI's next-steps text says "Configure your DATABASE_URL in prisma7.config.ts".
  • npx -y prisma@7.9 init ...: writes prisma.config.ts.
  • check-ai-signs.sh clean on all fifteen pages.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated Prisma ORM 7 quickstarts and setup guides to use prisma7.config.ts.
    • Clarified filename compatibility for Prisma ORM 7.10+ and the Prisma 7 CLI.
    • Updated configuration examples to read DATABASE_URL directly from environment variables.
    • Updated Prisma Studio instructions to reference the new configuration filename.

… quickstarts

The Prisma ORM 7 quickstart and add-to-existing-project pages said
`prisma init` creates `prisma.config.ts` with `env("DATABASE_URL")` from
`prisma/config`. Running `npx prisma@prev init` (prisma 7.10.0) in a
clean directory writes `prisma7.config.ts` with the generator comment,
no `env` import, and `url: process.env["DATABASE_URL"]`. Prisma 7.9
still wrote `prisma.config.ts`.

The fifteen pages pinned to `prisma@prev` now show the file as generated
and carry a note about the rename. The two MongoDB pages are pinned to
prisma 6.19.3 and are left as they are.

Closes #7818

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
blog Ready Ready Preview Sep 17, 2026 3:26pm UTC
docs Ready Ready Preview Sep 17, 2026 3:26pm UTC
eclipse Ready Ready Preview Sep 17, 2026 3:26pm UTC
site Ready Ready Preview Sep 17, 2026 3:26pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Essentials

Run ID: 78b6951e-0036-4c3b-aba2-5e9c458cd556

📥 Commits

Reviewing files that changed from the base of the PR and between d5027b7 and 31ffd06.

📒 Files selected for processing (16)
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/cockroachdb.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/mysql.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/planetscale.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/postgresql.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/prisma-postgres.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/sql-server.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/sqlite.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/cockroachdb.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/mysql.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/planetscale.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/postgresql.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/prisma-postgres.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/sql-server.mdx
  • apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/sqlite.mdx
  • apps/docs/content/docs/(index)/v7/prisma-postgres/from-the-cli.mdx
  • apps/docs/content/docs/(index)/v7/prisma-postgres/quickstart/prisma-orm.mdx

Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

The documentation now reflects prisma7.config.ts, direct process.env["DATABASE_URL"] access, Prisma 7.10+ filename behavior, and Prisma 7 CLI compatibility with existing prisma.config.ts files.

Changes

Prisma configuration documentation

Layer / File(s) Summary
Existing-project initialization guides
apps/docs/content/docs/(index)/v7/prisma-orm/add-to-existing-project/*.mdx
The guides now document prisma7.config.ts, remove the env helper, use process.env["DATABASE_URL"], and describe filename compatibility.
Quickstart initialization guides
apps/docs/content/docs/(index)/v7/prisma-orm/quickstart/*.mdx
The quickstarts now show the generated prisma7.config.ts content and document Prisma 7.10+ and CLI filename behavior.
Prisma Postgres configuration flow
apps/docs/content/docs/(index)/v7/prisma-postgres/from-the-cli.mdx, apps/docs/content/docs/(index)/v7/prisma-postgres/quickstart/prisma-orm.mdx
The guides update configuration examples and change the Prisma Studio command to load ./prisma7.config.ts.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 31ffd

The documentation changes consistently update Prisma 7 configuration examples and the Studio config path; no concrete merge-blocking risk is identified.

🚥 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 clearly describes the main change: updating v7 quickstart documentation to show the configuration file generated by prisma init.
Linked Issues check ✅ Passed The PostgreSQL quickstart now documents prisma7.config.ts, the generated Prisma comment, defineConfig without env, and url: process.env["DATABASE_URL"]. The note documents that the Prisma 7 CL…
Out of Scope Changes check ✅ Passed The other changed pages document the same Prisma ORM 7 initialization output for database variants and Prisma Postgres. The Studio command also uses the renamed generated config file. These changes su…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

229 links: ✅ 47 OK | 🚫 0 errors | 🔀 7 redirects | 👻 182 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 47
🔀 Redirected 7
👻 Excluded 182
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

reviewer (Program) added 2 commits September 17, 2026 15:23
… too

The page is pinned to prisma@prev like the other fifteen v7 quickstart pages
but still showed prisma init writing prisma.config.ts with env(), and its
Studio command passed --config ./prisma.config.ts, a file init no longer
writes. Now shows the generated prisma7.config.ts, the rename note, and
points --config at it.
@prisma-robot

prisma-robot Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Reviewed 99ffc68 and pushed one fix.

Verified

  • Ran npx -y prisma@prev init --datasource-provider postgresql --output ../generated/prisma (prisma 7.10.0) in an empty directory: it writes prisma7.config.ts with exactly the content the fifteen pages now show.
  • prisma validate on 7.10.0 prints Loaded Prisma config from prisma7.config.ts. and, after renaming, Loaded Prisma config from prisma.config.ts., so the note's "discovers either name" holds. The 7.10.0 release notes confirm the lookup order (prisma7.config.*, .config/prisma7.*, then prisma.config.* as fallback) and the wording matches what guides/upgrade-prisma-orm/postgresql.mdx already says.
  • lint:links clean, cspell clean on the changed pages, check-ai-signs.sh clean on all pages. lint:code reports 6735 violations on both main and this head, so nothing new.

Found and fixed

  • (index)/v7/prisma-postgres/from-the-cli.mdx is pinned to prisma@prev too but still said prisma init created prisma.config.ts (bullet in Prerequisites, section 2.4 with the old env() block) and its Studio command passed --config ./prisma.config.ts, a file 7.10 no longer writes. Updated it to match the other fifteen: generated file, rename note, --config ./prisma7.config.ts. Commit 9cb33f9.
  • Merged origin/main into the branch so the diff is against current code (one unrelated blog commit). Head is now 31ffd06.

Not this PR's to fix (will propose as a follow-up task): cli/v7/init.mdx ("Generated files" section and metaDescription), orm/v7/reference/prisma-config-reference.mdx (line 9 says prisma init creates prisma.config.ts; example still imports env), and guides/v7/runtimes/deno.mdx ("Open the generated prisma.config.ts") describe the pre-7.10 output. The reference pages should also document the config lookup order.

Re-reviewing the new head cold in a couple of minutes.

— reviewer

@prisma-robot

prisma-robot Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Review clean at 31ffd06

What it does. On the sixteen v7 getting-started pages that install prisma@prev (quickstart and add-to-existing-project for cockroachdb, mysql, planetscale, postgresql, prisma-postgres, sql-server, sqlite; Prisma Postgres quickstart and from-the-cli), the "prisma init creates …" bullet, the code block, and the Studio --config flag now show the file the 7.10 CLI actually writes: prisma7.config.ts, with the generator comment, no env import, and process.env["DATABASE_URL"]. Each page carries the same note explaining the rename and that the Prisma 7 CLI still discovers prisma.config.ts. The two MongoDB pages are pinned to prisma@6.19.3, which still writes prisma.config.ts, and are correctly untouched. Fixes #7818.

Verified on this head, from scratch

  • npx -y prisma@prev init --datasource-provider postgresql --output ../generated/prisma (prisma 7.10.0) in an empty directory writes prisma7.config.ts byte-for-byte as shown.
  • prisma validate loads prisma7.config.ts alone, prisma.config.ts alone, and prefers prisma7.config.ts when both exist, so the note's "discovers either name" is accurate.
  • All 16 pages carry the identical bullet, block title, and note; no stray prisma.config.ts left in the changed files.
  • Gates: lint:links 0 errors, cspell 0 issues on the changed pages, check-ai-signs.sh clean 16/16, lint:code 6735 on both main and head (pre-existing, nothing new).

Risk: low. Prose and code samples only, on pages whose command output I reproduced; no code, redirects, or nav touched.

Follow-up proposed as a separate task (not this PR's scope): five other pages that install prisma@prev still describe prisma init writing prisma.config.tscli/v7/init.mdx (metaDescription and "Generated files"), orm/v7/reference/prisma-config-reference.mdx (line 9, example still imports env, no lookup-order section), guides/v7/runtimes/deno.mdx, guides/v7/deployment/bun-workspaces.mdx, guides/postgres/netlify.mdx.

— reviewer

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.

prisma init ... command generates different output, than what is shown in the docs

1 participant