docs: replace prisma init --db with prisma init in normal docs#7696
docs: replace prisma init --db with prisma init in normal docs#7696AmanVarshney01 merged 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughDocumentation updates across 40+ MDX files that replace the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes The PR exhibits highly homogeneous changes applied consistently across 40+ files. While the scope is large, the pattern is identical throughout: replace 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
apps/docs/content/docs/guides/making-guides.mdx (1)
317-332:⚠️ Potential issue | 🟡 MinorFix the template’s “This will create” list to match the new flow.
After switching to
prisma init+npx create-db, the template still impliesprisma initcreates the Prisma Postgres database (Line 324). That conflicts with the updated step sequence and can mislead guide authors.✏️ Suggested wording fix
This will create: - A `prisma` directory with a `schema.prisma` file -- A Prisma Postgres database -- A `.env` file containing the `DATABASE_URL` +- A `.env` file containing a local `DATABASE_URL` - A `prisma.config.ts` file for configuration + +After you run `npx create-db`, you'll also have a Prisma Postgres database and a `postgres://...` connection string to paste into `.env`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/guides/making-guides.mdx` around lines 317 - 332, Update the "This will create" bulleted list so it matches the new two-step flow: indicate that `prisma init` creates the `prisma` directory with `schema.prisma` and a `.env` containing a local `DATABASE_URL` (and any scaffolding), and that running `npx create-db` creates the Prisma Postgres database (and produces the `postgres://...` connection string you should paste into `.env`); remove or reassign the current claim that `prisma init` creates the Prisma Postgres database and ensure `prisma.config.ts` is attributed to the correct command that now generates it.apps/docs/content/docs/guides/runtimes/bun.mdx (1)
197-198:⚠️ Potential issue | 🟡 MinorSection numbering mismatch
Line 197 shows
### 3.3. Add the seed script to Prisma Configbut this appears within Section 4 ("Setting up database configuration and creating a seed script"). The heading should be### 4.3.to maintain consistent numbering.📝 Suggested fix
-### 3.3. Add the seed script to Prisma Config +### 4.3. Add the seed script to Prisma Config🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/guides/runtimes/bun.mdx` around lines 197 - 198, The heading "### 3.3. Add the seed script to Prisma Config" is misnumbered inside the "Setting up database configuration and creating a seed script" section; update that heading to "### 4.3. Add the seed script to Prisma Config" so the section numbering is consistent—locate the exact heading text "Add the seed script to Prisma Config" in apps/docs/content/docs/guides/runtimes/bun.mdx and change the leading "3.3." to "4.3.".apps/docs/content/docs/ai/prompts/nextjs.mdx (1)
544-544:⚠️ Potential issue | 🟡 MinorSame inconsistency as nuxt.mdx: this "consequence" contradicts the new workflow.
This line treats
npx prisma initwithout--dbas an error case, but that's now the recommended approach. The consequence "NO DATABASE CREATED, ONLY LOCAL FILES" is the expected outcome—users are supposed to runcreate-dbseparately.This line should be removed or rephrased to reflect the new two-step workflow.
,
Suggested fix
-- Using `npx prisma init` without `--db` → **NO DATABASE CREATED, ONLY LOCAL FILES** +- Forgetting to run `npx create-db` after `npx prisma init` → **NO DATABASE CREATED, ONLY LOCAL FILES**🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/ai/prompts/nextjs.mdx` at line 544, The line "Using `npx prisma init` without `--db` → **NO DATABASE CREATED, ONLY LOCAL FILES**" is outdated and contradicts the new two-step workflow; remove or rephrase it so it no longer treats the absence of a created database as an error—either delete the line or change it to a neutral/positive note such as "Running `npx prisma init` without `--db` only initializes local config and schema; create the database separately with the `create-db` step" so the docs reflect the recommended flow.apps/docs/content/docs/ai/prompts/nuxt.mdx (1)
562-562:⚠️ Potential issue | 🟡 MinorInconsistency: This "consequence" now contradicts the recommended workflow.
This line flags
npx prisma initwithout--dbas an error, but the PR changes the recommended workflow to exactly that pattern (init without--db, then separatecreate-db). This statement is now misleading because "NO DATABASE CREATED, ONLY LOCAL FILES" is the intended behavior in the new two-step workflow.Consider removing this line or rephrasing it to clarify that users must run
npx create-dbas a follow-up step.,
Suggested fix
-- Using `npx prisma init` without `--db` → **NO DATABASE CREATED, ONLY LOCAL FILES** +- Forgetting to run `npx create-db` after `npx prisma init` → **NO DATABASE CREATED, ONLY LOCAL FILES**🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/ai/prompts/nuxt.mdx` at line 562, The current sentence "Using `npx prisma init` without `--db` → **NO DATABASE CREATED, ONLY LOCAL FILES**" conflicts with the new two-step workflow; update the copy around that statement (search for the exact phrase) to either remove it or rephrase to clarify that this is expected behavior when following the new pattern and that users must run `npx create-db` as a follow-up to actually create the database. Ensure the revised line explicitly names the follow-up command (`npx create-db`) and states that `npx prisma init` only scaffolds local files in the new workflow.
🧹 Nitpick comments (2)
apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx (1)
125-129: Consider usingpnpm dlxfor consistencyThe guide uses
pnpm dlx prisma initat line 110 but switches tonpx create-dbhere. For consistency within a pnpm-focused guide, consider:-```bash -npx create-db -``` +```bash +pnpm dlx create-db +```This keeps the tooling consistent throughout the pnpm workspaces guide.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx` around lines 125 - 129, Replace the inconsistent npm command in the code block that currently shows `npx create-db` with the pnpm equivalent `pnpm dlx create-db` so the guide consistently uses pnpm tooling (matching the earlier `pnpm dlx prisma init` usage); update the fenced bash block content for the snippet that contains `npx create-db` to use `pnpm dlx create-db`.apps/docs/content/docs/guides/deployment/bun-workspaces.mdx (1)
86-96: Minor style improvement and command consistencyTwo small observations:
Repetitive sentence structure (flagged by static analysis): Lines 87-89 all start with "Creates". Consider varying the phrasing:
- Creates a `prisma` directory containing a `schema.prisma` file for your database models. - Generates a `prisma.config.ts` file for configuring Prisma. - Adds a `.env` file with a local `DATABASE_URL`.Command consistency: The guide uses
bunx --bun prisma initbut thennpx create-db. For a Bun-focused guide, considerbunx --bun create-dbfor consistency.Neither affects functionality—just polish for a more cohesive reading experience.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/guides/deployment/bun-workspaces.mdx` around lines 86 - 96, The checklist sentences are repetitive and the CLI command is inconsistent with the Bun-focused guide; update the three bullet lines so they vary wording (e.g., "Creates a `prisma` directory..." → keep one "Creates", change the others to "Generates a `prisma.config.ts`" and "Adds a `.env` file...") and replace the `npx create-db` invocation with the Bun equivalent `bunx --bun create-db` so the command style matches the earlier `bunx --bun prisma init` usage; edit the bullets and the command in the section containing the `prisma` directory/schema, `prisma.config.ts`, and `.env` mention to apply these changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/content/docs/`(index)/prisma-postgres/from-the-cli.mdx:
- Around line 25-31: The relocation steps currently move .env and the prisma/
folder but omit prisma.config.ts; update the "organize project directory"
instructions to also move prisma.config.ts into the new project directory (same
place as .env and prisma/). Specifically, when describing the mkdir and mv
commands that move .env and prisma, add a step to mv prisma.config.ts
./hello-prisma/ so the generated configuration file isn't left behind.
In `@apps/docs/content/docs/guides/database/multiple-databases.mdx`:
- Around line 165-170: Normalize the database initialization steps by replacing
the interactive/newer command in Section 2.1 (currently using `npx prisma@latest
init --db`) with the explicit two-step pattern used in Section 2.2: run `npx
prisma init` then `npx create-db`, instruct the user to replace the generated
DATABASE_URL in `.env` with the returned connection string and then rename the
generated `prisma` folder to `prisma-post-database`; update any adjacent
guidance (the note about `--db` and the prompt-based project naming) to instead
tell users to create the Prisma Postgres database with `npx create-db` and apply
its URL to the `.env`.
In `@apps/docs/content/docs/guides/runtimes/deno.mdx`:
- Around line 116-118: The command block uses `npx create-db` which requires
npm/Node.js; update the Deno guide around the `npx create-db` snippet by adding
a short inline note saying "This step requires npm/Node.js installed." and
optionally mention the Deno fallback `deno run -A npm:create-db@latest` as
unsupported/experimental so readers know it's not guaranteed to work; ensure the
note appears immediately after the `npx create-db` code block in the deno.mdx
content.
---
Outside diff comments:
In `@apps/docs/content/docs/ai/prompts/nextjs.mdx`:
- Line 544: The line "Using `npx prisma init` without `--db` → **NO DATABASE
CREATED, ONLY LOCAL FILES**" is outdated and contradicts the new two-step
workflow; remove or rephrase it so it no longer treats the absence of a created
database as an error—either delete the line or change it to a neutral/positive
note such as "Running `npx prisma init` without `--db` only initializes local
config and schema; create the database separately with the `create-db` step" so
the docs reflect the recommended flow.
In `@apps/docs/content/docs/ai/prompts/nuxt.mdx`:
- Line 562: The current sentence "Using `npx prisma init` without `--db` → **NO
DATABASE CREATED, ONLY LOCAL FILES**" conflicts with the new two-step workflow;
update the copy around that statement (search for the exact phrase) to either
remove it or rephrase to clarify that this is expected behavior when following
the new pattern and that users must run `npx create-db` as a follow-up to
actually create the database. Ensure the revised line explicitly names the
follow-up command (`npx create-db`) and states that `npx prisma init` only
scaffolds local files in the new workflow.
In `@apps/docs/content/docs/guides/making-guides.mdx`:
- Around line 317-332: Update the "This will create" bulleted list so it matches
the new two-step flow: indicate that `prisma init` creates the `prisma`
directory with `schema.prisma` and a `.env` containing a local `DATABASE_URL`
(and any scaffolding), and that running `npx create-db` creates the Prisma
Postgres database (and produces the `postgres://...` connection string you
should paste into `.env`); remove or reassign the current claim that `prisma
init` creates the Prisma Postgres database and ensure `prisma.config.ts` is
attributed to the correct command that now generates it.
In `@apps/docs/content/docs/guides/runtimes/bun.mdx`:
- Around line 197-198: The heading "### 3.3. Add the seed script to Prisma
Config" is misnumbered inside the "Setting up database configuration and
creating a seed script" section; update that heading to "### 4.3. Add the seed
script to Prisma Config" so the section numbering is consistent—locate the exact
heading text "Add the seed script to Prisma Config" in
apps/docs/content/docs/guides/runtimes/bun.mdx and change the leading "3.3." to
"4.3.".
---
Nitpick comments:
In `@apps/docs/content/docs/guides/deployment/bun-workspaces.mdx`:
- Around line 86-96: The checklist sentences are repetitive and the CLI command
is inconsistent with the Bun-focused guide; update the three bullet lines so
they vary wording (e.g., "Creates a `prisma` directory..." → keep one "Creates",
change the others to "Generates a `prisma.config.ts`" and "Adds a `.env`
file...") and replace the `npx create-db` invocation with the Bun equivalent
`bunx --bun create-db` so the command style matches the earlier `bunx --bun
prisma init` usage; edit the bullets and the command in the section containing
the `prisma` directory/schema, `prisma.config.ts`, and `.env` mention to apply
these changes.
In `@apps/docs/content/docs/guides/deployment/pnpm-workspaces.mdx`:
- Around line 125-129: Replace the inconsistent npm command in the code block
that currently shows `npx create-db` with the pnpm equivalent `pnpm dlx
create-db` so the guide consistently uses pnpm tooling (matching the earlier
`pnpm dlx prisma init` usage); update the fenced bash block content for the
snippet that contains `npx create-db` to use `pnpm dlx create-db`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 59e87223-bf2e-4e9c-aab0-585f775ad54d
📒 Files selected for processing (34)
apps/docs/content/docs/(index)/index.mdxapps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdxapps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdxapps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdxapps/docs/content/docs/ai/prompts/astro.mdxapps/docs/content/docs/ai/prompts/nextjs.mdxapps/docs/content/docs/ai/prompts/nuxt.mdxapps/docs/content/docs/ai/tutorials/typefully-clone.mdxapps/docs/content/docs/guides/authentication/authjs/nextjs.mdxapps/docs/content/docs/guides/authentication/better-auth/astro.mdxapps/docs/content/docs/guides/authentication/better-auth/nextjs.mdxapps/docs/content/docs/guides/authentication/clerk/astro.mdxapps/docs/content/docs/guides/authentication/clerk/nextjs.mdxapps/docs/content/docs/guides/database/multiple-databases.mdxapps/docs/content/docs/guides/deployment/bun-workspaces.mdxapps/docs/content/docs/guides/deployment/cloudflare-workers.mdxapps/docs/content/docs/guides/deployment/pnpm-workspaces.mdxapps/docs/content/docs/guides/deployment/turborepo.mdxapps/docs/content/docs/guides/frameworks/astro.mdxapps/docs/content/docs/guides/frameworks/elysia.mdxapps/docs/content/docs/guides/frameworks/hono.mdxapps/docs/content/docs/guides/frameworks/nestjs.mdxapps/docs/content/docs/guides/frameworks/nextjs.mdxapps/docs/content/docs/guides/frameworks/react-router-7.mdxapps/docs/content/docs/guides/frameworks/solid-start.mdxapps/docs/content/docs/guides/frameworks/sveltekit.mdxapps/docs/content/docs/guides/integrations/ai-sdk.mdxapps/docs/content/docs/guides/integrations/datadog.mdxapps/docs/content/docs/guides/integrations/embed-studio.mdxapps/docs/content/docs/guides/integrations/github-actions.mdxapps/docs/content/docs/guides/integrations/shopify.mdxapps/docs/content/docs/guides/making-guides.mdxapps/docs/content/docs/guides/runtimes/bun.mdxapps/docs/content/docs/guides/runtimes/deno.mdx
Summary
prisma init --dbwithprisma initacross the current docs quickstarts, guides, and AI prompt docsnpx create-dbwhere Prisma Postgres provisioning is still neededpnpm dlx prisma initandyarn dlx prisma initScope
apps/docs/content/docsonlyapps/docs/content/docs.v6unchangedVerification
prisma initvariants in fresh temp folders fornpx,bunx --bun,pnpm dlx,yarn dlx, anddeno run -A npm:prisma initand confirmed they createprisma/schema.prisma,prisma.config.ts, and.envnpx create-dband confirmed it returns apostgres://...connection stringprisma init --output ../generated/prisma->npx create-db-> migrate -> generate -> test queryNotes
prisma init --dbremains only in the explicit flag/reference docs and troubleshooting pages that document that flag directlySummary by CodeRabbit
npx prisma init --dbtonpx prisma initnpx create-dbcommand for Prisma Postgres database provisioningprisma initgenerates local scaffolding,create-dbprovisions the actual databaseDATABASE_URLconfiguration instructions across all guides