Skip to content

Conversation

@AmanVarshney01
Copy link
Member

@AmanVarshney01 AmanVarshney01 commented Dec 19, 2025

Summary by CodeRabbit

  • Documentation
    • Updated CLI docs: removed --schema/--url flags; DB connection is read from repository config (prisma.config).
    • Added explicit Prisma 6 vs Prisma 7 before/after examples and upgrade guidance.
    • Revised migrate/db-execute and migrate-diff examples to use config-based datasource flow, including production-config variants and expanded patching/migration scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions
Copy link
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

Walkthrough

Documentation across Prisma migrate and CLI reference was updated to remove --schema/--url usage in examples and to source datasource configuration from prisma.config.ts (with Prisma 6 vs Prisma 7 variants and breaking-change notes added); some examples add --config prisma.config.prod.ts for production runs.

Changes

Cohort / File(s) Summary
Migration workflow updates
content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx, content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx
Removed --schema/--url from prisma db execute examples; added explicit Prisma 6 and Prisma 7 variants; added --config prisma.config.prod.ts production-config examples and notes referencing datasource in prisma.config.ts.
CLI reference
content/200-orm/500-reference/200-prisma-cli-reference.mdx
Rewrote db execute and migrate diff sections to read datasource from prisma.config.ts; removed --schema/--url options; updated prerequisites, options tables, examples, and added Prisma 7 breaking-change notes.
Upgrade guide (Prisma 7)
content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx
Added Before/After (v6/v7) examples showing removal of --schema/--url; added prisma.config.ts snippets and migrated migrate-diff guidance to config-datasource options; note: new sections appear duplicated within the document.
AI prompts / docs guidance
content/900-ai/prompts/prisma-7.mdx
Added "CLI Flag Changes" section documenting removal of --schema/--url, before/after examples, migrate-diff option changes, and notes to update scripts/CI to use prisma.config.ts (with --config where applicable).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Mostly consistent documentation edits across a handful of files.
  • Areas needing extra attention:
    • The duplicated section in the Prisma 7 upgrade guide should be checked and deduplicated if unintended.
    • Verify --config examples are only present where Prisma 7 supports that flag and the referenced config filenames match project conventions.
    • Confirm all Prisma 6/7 example commands are accurate and the narrative correctly indicates where the DB URL is read from prisma.config.ts.

Possibly related issues

Possibly related PRs

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: documenting CLI flag removals (--schema and --url) for prisma db execute and migrate diff in Prisma v7, which aligns with all modified documentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d83ba7 and 26fe072.

📒 Files selected for processing (2)
  • content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx
  • content/900-ai/prompts/prisma-7.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • content/900-ai/prompts/prisma-7.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx (3)

467-501: Well-documented breaking change with clear migration path.

The removal of --schema and --url flags is clearly explained with concrete Before/After examples. The migration guidance directs users to configure their database connection in prisma.config.ts, which aligns with the broader v7 configuration strategy documented earlier in the guide.


503-533: No changes needed—flag names are correct.

The documentation correctly shows that --[from/to]-url and --[from/to]-schema-datasource are now replaced with --[from/to]-config-datasource, matching the official Prisma 7.0.0 implementation.


467-533: No action needed. The sections mentioned in the upgrade guide are not duplicated—each appears only once in the document. Multiple occurrences of key phrases like "prisma db execute --file" (3 times) and "from-config-datasource" (4 times) are expected and represent different parts of the before/after examples and command variations within those sections, not duplicate content.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2276
✅ Successful 2245
⏳ Timeouts 0
🔀 Redirected 2
👻 Excluded 24
❓ Unknown 0
🚫 Errors 4
⛔ Unsupported 1

Errors per input

Errors in 200-orm/800-more/350-ai-tools/100-cursor.mdx

Errors in 800-guides/380-vercel-app-deployment.mdx

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 19, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 26fe072
Status: ✅  Deploy successful!
Preview URL: https://3d9f7fec.docs-51g.pages.dev
Branch Preview URL: https://dr-6653-cli-prisma-db-execut.docs-51g.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx (2)

126-131: Consider consolidating the production config guidance.

The Prisma 7 note about production configuration is helpful. However, this same guidance (along with the Prisma 6 vs Prisma 7 command variants) is repeated at lines 209-214 and lines 248-253, creating potential maintenance challenges.

Consider one of these approaches:

  1. Place the info block earlier in the document (before the "Example of a failed migration" section) and reference it from both workflow sections
  2. Create a shared callout that both sections reference
  3. If the duplication is intentional for workflow completeness, add a comment noting that both sections should be kept in sync

This would reduce the risk of the sections drifting apart during future updates.


209-214: Duplicated command examples increase maintenance burden.

The Prisma 6 vs Prisma 7 command variants appear identically in both the "Moving backwards" (lines 209-214) and "Moving forwards" (lines 248-253) sections. While this provides completeness in each workflow, it creates a maintenance concern.

Suggested consolidation approach

Consider extracting the command variants into a reusable admonition block placed once before both workflow sections, then reference it from each section with a brief note like:

:::note
See the [Prisma 7 command variants](#prisma-7-commands) for the updated syntax.
:::

This maintains the information flow while ensuring consistency.

Also applies to: 248-253

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 414da5c and d4b071f.

📒 Files selected for processing (5)
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx (1 hunks)
  • content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx (3 hunks)
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx (3 hunks)
  • content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx (1 hunks)
  • content/900-ai/prompts/prisma-7.mdx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (6)
content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx (1)

143-147: LGTM - Clear documentation of the new behavior.

The updated guidance correctly reflects that db execute now reads the database URL from prisma.config.ts, and the simplified command syntax (removing --schema) aligns with the Prisma 7 breaking changes.

content/900-ai/prompts/prisma-7.mdx (1)

297-325: Well-documented breaking change with clear migration path.

The new CLI Flag Changes section provides:

  • Clear before/after examples
  • Explicit migration actions for scripts/CI
  • Accurate technical guidance

This will help AI assistants guide users through the migration effectively.

content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx (1)

384-419: Excellent upgrade documentation with practical examples.

This breaking change section effectively guides users through:

  1. Understanding what changed (flags removed)
  2. The new approach (prisma.config.ts)
  3. Concrete before/after examples

The inclusion of the TypeScript config snippet is particularly helpful for users migrating their workflows.

content/200-orm/500-reference/200-prisma-cli-reference.mdx (3)

1269-1309: Comprehensive update to db execute documentation.

The updated description, prerequisites, and configuration examples accurately reflect the Prisma 7 behavior. The inclusion of both schema.prisma and prisma.config.ts examples provides users with the complete context they need.


1312-1326: Clear documentation of breaking changes in the options section.

The updated options table effectively communicates:

  1. The either/or requirement for --file or --stdin (with asterisk notation explained)
  2. The removal of --schema and --url via a prominent breaking change note
  3. The alternative configuration approach

The breaking change note is well-placed within an info block, making it immediately visible to users consulting the reference.


1329-1339: Examples correctly demonstrate the new command syntax.

Both the file and stdin examples have been properly updated to:

  • Remove the removed --schema and --url flags
  • Show the simplified command structure
  • Accurately reflect the new behavior

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 19, 2025
@AmanVarshney01 AmanVarshney01 changed the title docs: document --schema and --url removal from prisma db execute docs: document CLI flag changes for prisma db execute and migrate diff in v7 Dec 19, 2025
@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2275
✅ Successful 2242
⏳ Timeouts 0
🔀 Redirected 4
👻 Excluded 24
❓ Unknown 0
🚫 Errors 4
⛔ Unsupported 1

Errors per input

Errors in 200-orm/800-more/350-ai-tools/100-cursor.mdx

Errors in 800-guides/380-vercel-app-deployment.mdx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
content/200-orm/500-reference/200-prisma-cli-reference.mdx (1)

1650-1714: Comprehensive migrate diff documentation updates.

The prerequisites section, options tables, and breaking change notes are all accurate and well-structured. The replacement of --from-url/--to-url with --from-config-datasource/--to-config-datasource is clearly documented. The tables effectively communicate which options are available and their purposes.

Optional: Address minor style issue

Static analysis suggests using "whether" instead of "if" in formal documentation on line 1712:

-| `--exit-code` | No       | Change the exit code behavior to signal if the diff is empty or not (Empty: 0, Error: 1, Not empty: 2). Default behavior is Success: 0, Error: 1. |
+| `--exit-code` | No       | Change the exit code behavior to signal whether the diff is empty or not (Empty: 0, Error: 1, Not empty: 2). Default behavior is Success: 0, Error: 1. |

Based on learnings, this is a minor stylistic improvement for formal documentation.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4b071f and 2d83ba7.

📒 Files selected for processing (5)
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx (2 hunks)
  • content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx (3 hunks)
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx (5 hunks)
  • content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx (1 hunks)
  • content/900-ai/prompts/prisma-7.mdx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx
  • content/900-ai/prompts/prisma-7.mdx
🧰 Additional context used
🪛 LanguageTool
content/200-orm/500-reference/200-prisma-cli-reference.mdx

[style] ~1712-~1712: In contexts where ‘if’ is followed by ‘or’, using ‘whether’ may be more appropriate (and formal).
Context: ...Change the exit code behavior to signal if the diff is empty or not (Empty: 0, Err...

(IF_WHETHER)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Check internal links
🔇 Additional comments (10)
content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx (4)

196-209: Excellent before/after comparison for migrate diff.

The side-by-side Prisma 6 and Prisma 7 examples clearly demonstrate the migration path. The Prisma 7 example correctly uses --from-config-datasource with --config prisma.config.prod.ts to specify the production database configuration.


216-221: Correct documentation of db execute flag changes.

The examples accurately show the removal of --url flag in Prisma 7 and its replacement with the --config approach. This aligns with the documented breaking change.


245-250: Consistent documentation pattern maintained.

This example continues the consistent pattern of showing Prisma 6 vs Prisma 7 commands, demonstrating the migration for forward-moving scenarios. The --from-config-datasource usage is correct.


257-262: Comprehensive coverage of the migration scenarios.

All migration scenarios (backward and forward, for both migrate diff and db execute) are now documented with Prisma 6 and Prisma 7 variants. This thorough approach will help users understand the changes regardless of their use case.

content/200-orm/800-more/300-upgrade-guides/200-upgrading-versions/400-upgrading-to-prisma-7.mdx (2)

384-419: Well-structured breaking change documentation.

This section effectively documents the removal of --schema and --url flags from prisma db execute. The before/after examples are clear, and the TypeScript configuration example is correct and consistent with the new Prisma 7 approach. The explanation clearly guides users on the migration path.


420-451: Comprehensive migrate diff CLI changes documentation.

The replacement table clearly maps removed options to their new equivalents, making migration straightforward. The before/after examples demonstrate the practical application of these changes. The note about configuring shadowDatabaseUrl in prisma.config.ts is an important detail that prevents user confusion.

content/200-orm/500-reference/200-prisma-cli-reference.mdx (4)

1269-1309: Good addition of prerequisites section.

The updated description clearly states that datasource configuration is read from the Prisma config file. The prerequisites section with schema and config examples helps users ensure proper setup before running the command. The configuration examples are accurate and consistent with the rest of the documentation.


1311-1325: Options table correctly updated for Prisma 7.

The options table accurately reflects the available flags, correctly noting that either --file or --stdin is required for script input. The info block clearly communicates the Prisma 7 breaking change, directing users to configure database connections in prisma.config.ts instead.


1327-1339: Examples correctly demonstrate the new command structure.

Both examples properly show the simplified Prisma 7 command structure without --url or --schema flags. The stdin piping example is particularly helpful for users who want to chain commands. Both correctly rely on the datasource configured in prisma.config.ts.


1717-1762: Excellent examples covering various migrate diff scenarios.

The examples comprehensively cover different use cases:

  • Comparing config datasource to schema
  • Comparing schema to config datasource
  • Comparing migrations directory to config datasource
  • Piping to db execute
  • Using exit codes for CI/CD

All examples correctly use the new --from-config-datasource and --to-config-datasource options. The piping example at line 1751 is particularly valuable as it shows how to chain migrate diff with db execute using --stdin.

mhartington
mhartington previously approved these changes Dec 19, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 19, 2025
@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2276
✅ Successful 2243
⏳ Timeouts 0
🔀 Redirected 4
👻 Excluded 24
❓ Unknown 0
🚫 Errors 4
⛔ Unsupported 1

Errors per input

Errors in 200-orm/800-more/350-ai-tools/100-cursor.mdx

Errors in 800-guides/380-vercel-app-deployment.mdx

@AmanVarshney01 AmanVarshney01 merged commit e16b5c3 into main Dec 22, 2025
7 of 8 checks passed
@AmanVarshney01 AmanVarshney01 deleted the dr-6653-cli-prisma-db-execute-does-not-accept-schema-anymore branch December 22, 2025 07:12
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.

3 participants