-
Notifications
You must be signed in to change notification settings - Fork 871
DR-6807 Documented { schema } object for Postgres adapters in v7
#7438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
WalkthroughThis PR updates documentation for Prisma 7's database adapters (PostgreSQL, MariaDB, SQL Server, and Neon) to reflect schema configuration changes. The schema is now configured via constructor options rather than URL parameters, with migration guidance provided for Prisma 6 users. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes The changes span four distinct database adapter documentation files with heterogeneous updates: two files (PostgreSQL and Neon) receive substantial structural reorganization with new subsections and migration notes, while two files (MariaDB and SQL Server) see simpler constructor signature updates. Reviewers need to verify code example accuracy for each adapter and validate migration guidance between Prisma versions. Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-01-06T22:06:57.725ZApplied to files:
⏰ 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)
🔇 Additional comments (6)
✏️ Tip: You can disable this entire section by setting Comment |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
content/200-orm/050-overview/500-databases/800-sql-server/index.mdx (1)
51-51: Typo: "SQLite" should be "SQL Server".Line 51 incorrectly states "For SQLite,
node-mssqlis one of the most popular drivers..." This appears to be a copy-paste error from another database documentation page. It should read "For SQL Server" to match the context of this document.✏️ Suggested fix
-For SQLite, [`node-mssql`](https://github.com/tediousjs/node-mssql) is one of the most popular drivers in the JavaScript ecosystem. +For SQL Server, [`node-mssql`](https://github.com/tediousjs/node-mssql) is one of the most popular drivers in the JavaScript ecosystem.content/200-orm/050-overview/500-databases/300-postgresql.mdx (1)
162-186: Inconsistency: Arguments table and example contradict the new guidance.The prose at lines 119-123 states that the
schemaURL parameter is "no longer supported" in Prisma 7. However:
- Line 164: The Arguments table still lists
schemaas Required: Yes with defaultpublic- Lines 182-186: The example URL still uses
?schema=myschemaThis creates confusion for users who will see conflicting information on the same page. The table and example should be updated to:
- Mark
schemaas deprecated/removed for Prisma 7 (or note it's only for v6)- Update the example to use
optionsfor search_path instead, or remove theschemaparameter✏️ Suggested fix for the arguments table (line 164)
-| `schema` | **Yes** | `public` | Name of the [schema](https://www.postgresql.org/docs/12/ddl-schemas.html) you want to use, e.g. `myschema` | +| `schema` | No | `public` | **Prisma 6 only.** Name of the [schema](https://www.postgresql.org/docs/12/ddl-schemas.html) you want to use. In Prisma 7, use the `schema` option on the adapter instead. |✏️ Suggested fix for the example (lines 182-186)
-As an example, if you want to connect to a schema called `myschema`, set the connection pool size to `5` and configure a timeout for queries of `3` seconds. You can use the following arguments: +As an example, if you want to set the connection pool size to `5` and configure a timeout for queries of `3` seconds, you can use the following arguments: -``` -postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=myschema&connection_limit=5&socket_timeout=3 -``` +``` +postgresql://USER:PASSWORD@HOST:PORT/DATABASE?connection_limit=5&socket_timeout=3 +``` + +To specify a schema in Prisma 7, use the `schema` option when creating your adapter instance (see [Configuring the schema for Prisma queries](`#configuring-the-schema-for-prisma-queries-most-common-case`) above).content/200-orm/050-overview/500-databases/890-neon.mdx (1)
132-132: Typo: "istall" should be "install".Minor typo in the instruction text.
✏️ Suggested fix
-To get started, istall the Prisma ORM adapter for Neon: +To get started, install the Prisma ORM adapter for Neon:
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
content/200-orm/050-overview/500-databases/300-postgresql.mdxcontent/200-orm/050-overview/500-databases/400-mysql.mdxcontent/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/200-orm/050-overview/500-databases/890-neon.mdx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-06T22:06:57.725Z
Learnt from: newclarityex
Repo: prisma/docs PR: 7425
File: content/200-orm/050-overview/500-databases/400-mysql.mdx:80-80
Timestamp: 2026-01-06T22:06:57.725Z
Learning: In Prisma docs, when showing examples of instantiating driver adapters with connection strings from environment variables, use the template literal pattern `const connectionString = `${process.env.DATABASE_URL}`` for consistency across all database adapter examples (PostgreSQL, MySQL/MariaDB, etc.).
Applied to files:
content/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/200-orm/050-overview/500-databases/400-mysql.mdxcontent/200-orm/050-overview/500-databases/300-postgresql.mdxcontent/200-orm/050-overview/500-databases/890-neon.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). (1)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (6)
content/200-orm/050-overview/500-databases/400-mysql.mdx (1)
65-72: Clear and consistent documentation update.The updated
PrismaMariaDbinstantiation correctly demonstrates the new two-parameter pattern for Prisma 7. The comment appropriately notes "schema/database" since MySQL/MariaDB treats these as synonymous concepts, which helps users understand the terminology difference from PostgreSQL.content/200-orm/050-overview/500-databases/800-sql-server/index.mdx (1)
84-87: LGTM on the adapter instantiation update.The
PrismaMssqlconstructor now correctly demonstrates the optional second parameter for schema configuration, consistent with the other adapter documentation in this PR.content/200-orm/050-overview/500-databases/300-postgresql.mdx (2)
84-97: Well-structured migration guidance.The new section clearly explains the Prisma 7 approach with a helpful note for Prisma 6 users. The distinction between configuring schema for Prisma queries versus raw SQL queries (in the following section) is a thoughtful organization that will help users understand when to use each approach.
99-113: Excellent addition for raw SQL use cases.Providing both syntax variants (
-c search_path=and--search_path=) with the note that both are supported by thepgdriver is helpful. The clear statement that this is "only needed for raw SQL queries" prevents user confusion.content/200-orm/050-overview/500-databases/890-neon.mdx (2)
156-169: Consistent with PostgreSQL documentation.The schema configuration guidance mirrors the PostgreSQL documentation structure, which provides a consistent experience for users working with Neon (a PostgreSQL-based service). The Prisma 6 migration note is helpful.
171-185: Good parallel structure with PostgreSQL docs.The raw SQL search_path section matches the PostgreSQL documentation, ensuring users get consistent guidance regardless of whether they're reading the general PostgreSQL docs or the Neon-specific docs.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.