Skip to content

Conversation

@nurul3101
Copy link
Member

@nurul3101 nurul3101 commented Dec 3, 2025

Summary by CodeRabbit

  • Documentation
    • Updated shadow database configuration guide with clear, version-specific instructions for Prisma 7 and earlier versions.
    • Added comprehensive code examples demonstrating how to configure shadow databases for both Prisma 7 and earlier releases.
    • Enhanced with detailed best practices and clarifications regarding environment variable usage and configuration across scenarios.

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

@nurul3101 nurul3101 self-assigned this Dec 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Dangerous URL check

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

This PR updates the shadow database documentation to instruct Prisma 7 users to configure shadowDatabaseUrl in prisma.config.ts instead of the Prisma schema file, while maintaining backward compatibility with Prisma 6 and below. Tabbed code examples show both approaches side-by-side.

Changes

Cohort / File(s) Summary
Shadow database configuration documentation
content/200-orm/300-prisma-migrate/200-understanding-prisma-migrate/200-shadow-database.mdx
Adds TabbedContent sections showing Prisma 7 configuration in prisma.config.ts alongside Prisma 6 and below schema-based configuration. Updates multiple sections covering manual setup and cloud-hosted variants with environment variable examples and clarification notes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Single documentation file with consistent pattern applied across multiple sections
  • Tabbed content additions follow uniform structure
  • No logic changes; primarily documentation and example updates
  • Pay attention to: Ensure environment variable usage examples and the clarifying note about not reusing identical URL values are clear and technically accurate across all updated sections

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 clearly and accurately summarizes the main change—updating documentation for shadow database configuration across Prisma versions.
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 539bc83 and e7eec80.

📒 Files selected for processing (1)
  • content/200-orm/300-prisma-migrate/200-understanding-prisma-migrate/200-shadow-database.mdx (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.587Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.
Learnt from: ankur-arch
Repo: prisma/docs PR: 7066
File: content/200-orm/200-prisma-client/700-debugging-and-troubleshooting/245-troubleshooting-binary-size-issues.mdx:8-22
Timestamp: 2025-08-11T09:40:55.237Z
Learning: When the queryCompiler preview feature is enabled in Prisma ORM (v6.7.0+), it does not require Rust engines for CLI tools like `prisma migrate` or `prisma db pull`. The previous understanding that CLI tools would still need Rust binaries even with queryCompiler enabled is incorrect.
📚 Learning: 2025-11-20T21:00:02.587Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.587Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.

Applied to files:

  • content/200-orm/300-prisma-migrate/200-understanding-prisma-migrate/200-shadow-database.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.

Applied to files:

  • content/200-orm/300-prisma-migrate/200-understanding-prisma-migrate/200-shadow-database.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 (2)
content/200-orm/300-prisma-migrate/200-understanding-prisma-migrate/200-shadow-database.mdx (2)

84-118: Clear, well-structured documentation update for both Prisma versions.

The new instruction text and tabbed examples effectively guide users to the appropriate configuration approach based on their Prisma version. The side-by-side comparison makes it easy to understand the difference between Prisma 7 (prisma.config.ts) and Prisma 6/below (schema.prisma), and the highlighted lines help draw attention to the key configuration fields.


128-162: Consistent guidance across scenarios.

The parallel structure for the cloud-hosted shadow databases section maintains consistency with the manual setup section above. Users encountering this cloud-hosted scenario will see the same Prisma 7 vs 6 split, reducing confusion and supporting a coherent mental model.


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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

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.

@cloudflare-workers-and-pages
Copy link

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e7eec80
Status:🚫  Build failed.

View logs

@nurul3101 nurul3101 merged commit 2076e5a into main Dec 3, 2025
6 of 8 checks passed
@nurul3101 nurul3101 deleted the feat/update-shadow-database-instructions branch December 3, 2025 14:20
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