Skip to content

Conversation

@mhartington
Copy link
Member

@mhartington mhartington commented Oct 22, 2025

Summary by CodeRabbit

  • Documentation
    • Updated Prisma configuration reference to document a new optional datasource object with required url and optional directUrl and shadowDatabaseUrl fields.
    • Revised example usage in the reference to reflect the updated datasource options and clarify configuration patterns.

@github-actions
Copy link
Contributor

Dangerous URL check

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

@github-actions
Copy link
Contributor

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Walkthrough

Adds an optional datasource property to the PrismaConfig documentation, defining url (required), and optional directUrl and shadowDatabaseUrl; updates example and descriptive blocks in the PrismaConfig reference page accordingly.

Changes

Cohort / File(s) Summary
PrismaConfig type documentation
content/200-orm/500-reference/325-prisma-config-reference.mdx
Adds an optional datasource object to the PrismaConfig public signature with fields: url: string (required), directUrl?: string, shadowDatabaseUrl?: string. Replaces/updates example blocks and descriptive documentation for these datasource fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • docs(): update for new release #7204 — Modifies the same PrismaConfig reference file and adds an engine field while referencing datasource requirements; closely related to the schema/type adjustments in this PR.

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 pull request title "docs(config): add missing datasource reference" directly and clearly describes the primary change in the changeset. The raw summary confirms that the modification adds documentation for a datasource object (with url, directUrl, and shadowDatabaseUrl fields) to the PrismaConfig reference documentation in the markdown file. The title is specific, uses clear terminology ("missing datasource reference"), and is concise enough for a developer scanning commit history to understand the intent without ambiguity. The scope indicator "docs(config)" appropriately categorizes this as a documentation update related to configuration.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 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 6268a72 and 7d6dbc8.

📒 Files selected for processing (1)
  • content/200-orm/500-reference/325-prisma-config-reference.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). (3)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
content/200-orm/500-reference/325-prisma-config-reference.mdx (4)

31-33: ✓ Examples correctly demonstrate datasource usage.

Both examples properly illustrate how to configure datasource with the url property in your Prisma config.

Also applies to: 54-56


101-102: Clarify datasource requirement semantics in comment.

The type definition shows datasource as optional (line 105), but line 101 states "you must provide either a datasource object or driver adapter." This is potentially confusing since the requirement depends on the engine choice:

  • 'classic' engine: datasource in prisma.config.ts is required by the CLI
  • 'js' engine: datasource may be optional if using driver adapters configured in application code

The comment should clarify this conditional nature or align with the actual type definition. Consider updating line 101 to reflect when datasource is truly mandatory.


358-371: ✓ Engine description accurately reflects datasource requirement for classic engine.

The documentation correctly states that the classic engine requires datasource to be set, and the example demonstrates proper configuration.


373-401: ✓ Datasource property documentation is well-structured and accurate.

The new sections clearly document all three datasource properties with appropriate Required/Optional designations and helpful context:

  • datasource.url: Required field with reference to connection URL formats
  • datasource.shadowDatabaseUrl: Optional field with migration-specific use case explanation
  • datasource.directUrl: Optional field with connection pooler scenario and version compatibility notes

The typo in the directUrl section header has been correctly fixed.


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

🍈 Lychee Link Check Report

Note: Links are cached for 3 hours to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2416
✅ Successful 2324
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 91
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1
Full Github Actions output

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 22, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d6dbc8
Status: ✅  Deploy successful!
Preview URL: https://3274496d.docs-51g.pages.dev
Branch Preview URL: https://update-config-docs.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: 3

📜 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 4afe5e1 and 6268a72.

📒 Files selected for processing (1)
  • content/200-orm/500-reference/325-prisma-config-reference.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: runner / linkspector
  • GitHub Check: Check internal links
🔇 Additional comments (2)
content/200-orm/500-reference/325-prisma-config-reference.mdx (2)

31-33: LGTM.

The examples correctly demonstrate the datasource configuration with the required url property. Examples are consistent between the two approaches (defineConfig and satisfies).

Also applies to: 54-56


373-401: Approve new datasource property documentation sections.

The three new subsections (datasource.url, datasource.shadowDatabaseUrl, datasource.directUrl) are well-structured with clear descriptions, property metadata (type, required status), and practical context (e.g., connection pooler use cases for directUrl).

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 3 hours to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2416
✅ Successful 2323
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 91
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 800-guides/320-permit-io-access-control.mdx

@mhartington mhartington merged commit 2619584 into main Oct 22, 2025
8 of 9 checks passed
@mhartington mhartington deleted the update-config-docs branch October 22, 2025 16:32
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