Skip to content

Conversation

@ankur-arch
Copy link
Contributor

@ankur-arch ankur-arch commented Nov 15, 2025

Summary by CodeRabbit

  • Documentation
    • Updated Prisma v7 configuration guidance: config is shown in the new v7 config location; schema, migrations, and seed locations updated to the v7 layout.
    • Added comprehensive environment-variable loading guidance (including dotenv usage and runtime scenarios).
    • Clarified datasource URL handling and migration notes for v6.19→v7 upgrades; removed deprecated configuration options from docs.
    • Expanded examples for external tables, shadow DB init, and error/CLI guidance.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 15, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 273f3fb
Status: ✅  Deploy successful!
Preview URL: https://7400eb1d.docs-51g.pages.dev
Branch Preview URL: https://prisma-7-adapter.docs-51g.pages.dev

View logs

@ankur-arch ankur-arch self-assigned this Nov 15, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 15, 2025

Walkthrough

Documentation changes to reflect Prisma v7 config: move datasource URL and env loading into prisma.config.ts, update examples to use string paths and dotenv/config with env(...), remove config properties (adapter, studio, engine, datasource.directUrl), add v6.19 migration notes, and update external-tables examples.

Changes

Cohort / File(s) Summary
Prisma Config reference
content/200-orm/500-reference/325-prisma-config-reference.mdx
Rewrote to the v7 config surface: show prisma.config.ts as source of truth (schema, migrations, datasource.url via env(...)), add dotenv/config in examples, replace path-joining with string literals (e.g., prisma/schema.prisma), add seed wiring, remove documented properties (adapter, studio, engine, datasource.directUrl), and add v6.19 and earlier migration/compat notes.
Externally managed tables guide
content/200-orm/100-prisma-schema/20-data-model/65-externally-managed-tables.mdx
Updated examples to v7 prisma.config.ts style: added dotenv/config and env(...), moved schema/migrations/shadow settings into config, enabled experimental.externalTables, and declared tables.external/enums.external consistently across init, shadow DB, and final examples.
Schema reference / anchor updates
content/200-orm/500-reference/100-prisma-schema-reference.mdx
Adjusted datasource.directUrl documentation anchor/description to reference the removal/deprecation note.
Adapter / link target updates
content/200-orm/050-overview/500-databases/900-turso.mdx, content/200-orm/050-overview/500-databases/950-cloudflare-d1.mdx, content/800-guides/070-cloudflare-d1.mdx
Updated documentation hyperlinks to point to the adjusted Prisma Config anchors (e.g., #adapter-removed) without changing functional content.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Mixed documentation and example-code edits across multiple doc files with some repeated patterns.
  • Pay extra attention to:
    • Any remaining references to removed fields (adapter, experimental.adapter, studio, experimental.studio, engine, datasource.directUrl) in prose or examples.
    • Correctness and placement of env(...) usage and dotenv/config import across runtime-example blocks.
    • Accuracy and clarity of the v6.19 migration notes (ensure they correctly state user migration steps).

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 specifically identifies the main change: removal of four configuration properties (adapter, engine, directUrl, studio) from Prisma config, which directly aligns with the file modifications and property removals documented.
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 a891cb0 and 273f3fb.

📒 Files selected for processing (3)
  • content/200-orm/050-overview/500-databases/900-turso.mdx (1 hunks)
  • content/200-orm/050-overview/500-databases/950-cloudflare-d1.mdx (1 hunks)
  • content/800-guides/070-cloudflare-d1.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-08T16:22:57.129Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:50-66
Timestamp: 2025-10-08T16:22:57.129Z
Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.

Applied to files:

  • content/200-orm/050-overview/500-databases/900-turso.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: All headings and titles should use sentence case (e.g., "Getting started with Prisma ORM", "Best practices for authentication"), not title case. Exception: Always preserve exact casing for product names including "Prisma Postgres", "Prisma", "Prisma ORM", and "Prisma Data Platform".

Applied to files:

  • content/200-orm/050-overview/500-databases/900-turso.mdx
  • content/200-orm/050-overview/500-databases/950-cloudflare-d1.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/050-overview/500-databases/900-turso.mdx
  • content/200-orm/050-overview/500-databases/950-cloudflare-d1.mdx
  • content/800-guides/070-cloudflare-d1.mdx
📚 Learning: 2025-10-14T11:41:08.844Z
Learnt from: carlagn
Repo: prisma/docs PR: 7183
File: content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx:561-567
Timestamp: 2025-10-14T11:41:08.844Z
Learning: Ignore the file `content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx` in future reviews as per user request. Issues in this file were addressed in PR #7185.

Applied to files:

  • content/200-orm/050-overview/500-databases/900-turso.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). (4)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check links
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
content/200-orm/050-overview/500-databases/900-turso.mdx (1)

135-135: Anchor update aligns with v7 adapter removal documentation.

The transition to prisma.config.ts in v7 restructures how adapters are configured, making this anchor update appropriate for guiding users to the correct reference documentation about handling removed adapter config properties.

content/800-guides/070-cloudflare-d1.mdx (1)

180-180: Consistent anchor update across database guides.

The same anchor change applied to turso.mdx is reflected here, maintaining consistency in documentation references across D1 and Turso setup guides.

content/200-orm/050-overview/500-databases/950-cloudflare-d1.mdx (1)

87-87: Let me verify the exact heading structure around that section:Now let me check the exact heading structure in the config reference file:

Let me check the exact heading structure around line 379:

#!/bin/bash
# Show context around the adapter-removed section to verify heading structure
sed -n '370,385p' content/200-orm/500-reference/325-prisma-config-reference.mdx

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

@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

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 to avoid unnecessary requests, and speed up consecutive runs.

📊 Results Overview

Status Count
🔍 Total 2400
✅ Successful 2122
⏳ Timeouts 0
🔀 Redirected 256
👻 Excluded 21
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

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

📊 Results Overview

Status Count
🔍 Total 2400
✅ Successful 2119
⏳ Timeouts 0
🔀 Redirected 259
👻 Excluded 21
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 1

@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 2400
✅ Successful 2370
⏳ Timeouts 0
🔀 Redirected 7
👻 Excluded 21
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 200-orm/800-more/300-upgrade-guides/800-upgrade-from-prisma-1/06-upgrading-prisma-binding-to-sdl-first.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: 0

🧹 Nitpick comments (2)
content/200-orm/500-reference/325-prisma-config-reference.mdx (2)

632-638: Inconsistent path style in multi-file schemas example.

The example at line 637 uses path.join("prisma", "schema") while all other v7 examples use string literals (e.g., 'prisma/schema.prisma'). For consistency with the documented v7 convention, consider updating this to:

schema: 'prisma/schema'

Alternatively, if path.join is deliberately shown for educational purposes, adding a comment explaining when each style is preferred would clarify.


641-653: Clarify multi-file schema guidance for v7 datasource relocation.

The explanation at line 641 states that migrations must be "located next to the .prisma file that defines the datasource block." In v7, the datasource is defined in prisma.config.ts, not in schema files. Consider adding a brief clarification:

In that case, your `migrations` directory must be located next to the primary `.prisma` file (the one referenced in prisma.config.ts's `schema` setting). The datasource is now configured in `prisma.config.ts`, not in the schema file.

This prevents users from searching for a datasource block in their schema files.

📜 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 0f1c477 and a891cb0.

📒 Files selected for processing (2)
  • content/200-orm/500-reference/100-prisma-schema-reference.mdx (1 hunks)
  • content/200-orm/500-reference/325-prisma-config-reference.mdx (11 hunks)
✅ Files skipped from review due to trivial changes (1)
  • content/200-orm/500-reference/100-prisma-schema-reference.mdx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-11T09:40:55.237Z
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.

Applied to files:

  • content/200-orm/500-reference/325-prisma-config-reference.mdx
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-84
Timestamp: 2025-10-09T21:32:50.340Z
Learning: The `npx prisma init` command supports the following flags: `--db` (shorthand for `--datasource-provider prisma+postgres`), `--output` (specifies output location for generated client), `--generator-provider` (defines the generator provider), `--datasource-provider`, `--url`, `--preview-feature`, and `--with-model`. These are documented valid CLI options for Prisma init command.

Applied to files:

  • content/200-orm/500-reference/325-prisma-config-reference.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). (3)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages

@ankur-arch ankur-arch merged commit a4cffaf into prisma-7 Nov 15, 2025
5 of 7 checks passed
@ankur-arch ankur-arch deleted the prisma-7-adapter branch November 15, 2025 08:29
@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 2400
✅ Successful 2120
⏳ Timeouts 0
🔀 Redirected 255
👻 Excluded 21
❓ Unknown 0
🚫 Errors 3
⛔ Unsupported 1

Errors per input

Errors in 200-orm/800-more/600-help-and-troubleshooting/050-dataguide/02-introduction-to-data-types.mdx

Errors in 200-orm/800-more/600-help-and-troubleshooting/800-check-constraints.mdx

Errors in 250-postgres/300-database/525-postgres-extensions.mdx

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