-
Notifications
You must be signed in to change notification settings - Fork 855
feat: update prisma init related changes in other parts #7267
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
WalkthroughThis PR updates Prisma docs to add database driver typings (e.g., Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas requiring extra attention:
Possibly related PRs
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-10-08T16:23:00.388ZApplied to files:
📚 Learning: 2025-10-08T16:23:00.388ZApplied 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). (2)
🔇 Additional comments (1)
Comment |
Deploying docs with
|
| Latest commit: |
96b202e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d8db8a24.docs-51g.pages.dev |
| Branch Preview URL: | https://dc-6236-init-command-change.docs-51g.pages.dev |
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: 1
🧹 Nitpick comments (3)
content/100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.mdx (1)
5-5: Minor: metaDescription could be more descriptive.The metaDescription is quite minimal. Consider expanding slightly to highlight the connection flow (e.g., "Get started with Drizzle ORM and Prisma Postgres by connecting your TypeScript ORM to a managed database.") for better SEO and user clarity.
Also applies to: 8-8
content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx (1)
61-61: Import paths use different relative path patterns—verify they match actual directory structure.Line 61 uses
import { PrismaClient } from "./generated/prisma/client"(relative to root), while line 285 usesimport { PrismaClient } from '../generated/prisma/client'(relative tolib/subdirectory). Both are correct for their respective file locations, but users may find the inconsistency confusing.Consider adding a brief comment in the code examples clarifying that the import path changes based on file location, or add a note in the guide explaining this convention.
Also applies to: 285-285
content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx (1)
28-37: Add description for the@types/nodepackage.The install command includes
@types/nodeat line 28, but the package descriptions (lines 34-37) only cover four packages, missing an explanation for@types/node. Add:- **`@types/node`** - TypeScript type definitions for Node.js built-in APIsThis ensures completeness and clarity for developers unfamiliar with why TypeScript type packages are needed.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (30)
content/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdx(2 hunks)content/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdx(4 hunks)content/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdx(2 hunks)content/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdx(2 hunks)content/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdx(2 hunks)content/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdx(1 hunks)content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx(1 hunks)content/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdx(1 hunks)content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdx(1 hunks)content/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdx(1 hunks)content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx(1 hunks)content/100-getting-started/03-prisma-postgres/100-quickstart/100-kysely.mdx(2 hunks)content/100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.mdx(1 hunks)content/100-getting-started/03-prisma-postgres/100-quickstart/300-typeorm.mdx(1 hunks)content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx(8 hunks)content/100-getting-started/03-prisma-postgres/115-import-from-existing-database-mysql.mdx(0 hunks)content/200-orm/050-overview/500-databases/200-database-drivers.mdx(3 hunks)content/200-orm/050-overview/500-databases/300-postgresql.mdx(2 hunks)content/200-orm/050-overview/500-databases/400-mysql.mdx(2 hunks)content/200-orm/050-overview/500-databases/500-sqlite.mdx(4 hunks)content/200-orm/050-overview/500-databases/800-sql-server/index.mdx(2 hunks)content/200-orm/050-overview/500-databases/840-cockroachdb.mdx(1 hunks)content/200-orm/050-overview/500-databases/850-planetscale.mdx(1 hunks)content/200-orm/500-reference/200-prisma-cli-reference.mdx(13 hunks)content/250-postgres/100-introduction/225-import-from-existing-database.mdx(0 hunks)content/250-postgres/350-integrations/100-netlify.mdx(1 hunks)content/250-postgres/50-getting-started/200-import-from-existing-database.mdx(1 hunks)content/600-about/30-docs-components/01-mdx-examples.mdx(4 hunks)sidebars.ts(0 hunks)static/_redirects(1 hunks)
💤 Files with no reviewable changes (3)
- content/250-postgres/100-introduction/225-import-from-existing-database.mdx
- sidebars.ts
- content/100-getting-started/03-prisma-postgres/115-import-from-existing-database-mysql.mdx
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
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".
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.
📚 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/250-postgres/50-getting-started/200-import-from-existing-database.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdxcontent/600-about/30-docs-components/01-mdx-examples.mdxcontent/100-getting-started/03-prisma-postgres/100-from-the-cli.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/300-typeorm.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/100-kysely.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdxcontent/200-orm/050-overview/500-databases/300-postgresql.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdxcontent/200-orm/050-overview/500-databases/850-planetscale.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.mdxcontent/200-orm/050-overview/500-databases/200-database-drivers.mdxcontent/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/250-postgres/350-integrations/100-netlify.mdxcontent/200-orm/050-overview/500-databases/400-mysql.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/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdxcontent/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdxcontent/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdxcontent/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdxcontent/600-about/30-docs-components/01-mdx-examples.mdxcontent/100-getting-started/03-prisma-postgres/100-from-the-cli.mdxcontent/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdxcontent/200-orm/050-overview/500-databases/300-postgresql.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdxcontent/200-orm/050-overview/500-databases/500-sqlite.mdxcontent/200-orm/050-overview/500-databases/850-planetscale.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdxcontent/200-orm/500-reference/200-prisma-cli-reference.mdxcontent/200-orm/050-overview/500-databases/200-database-drivers.mdxcontent/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/250-postgres/350-integrations/100-netlify.mdxcontent/200-orm/050-overview/500-databases/400-mysql.mdxcontent/200-orm/050-overview/500-databases/840-cockroachdb.mdx
📚 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/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdxcontent/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdxcontent/200-orm/050-overview/500-databases/850-planetscale.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.mdxcontent/200-orm/500-reference/200-prisma-cli-reference.mdxcontent/200-orm/050-overview/500-databases/200-database-drivers.mdxcontent/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/250-postgres/350-integrations/100-netlify.mdxcontent/200-orm/050-overview/500-databases/400-mysql.mdxcontent/200-orm/050-overview/500-databases/840-cockroachdb.mdx
📚 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/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdxcontent/600-about/30-docs-components/01-mdx-examples.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/100-kysely.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdxcontent/200-orm/050-overview/500-databases/200-database-drivers.mdxcontent/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/250-postgres/350-integrations/100-netlify.mdxcontent/200-orm/050-overview/500-databases/400-mysql.mdx
📚 Learning: 2025-10-15T06:36:42.423Z
Learnt from: jy-joung-bitor
Repo: prisma/docs PR: 0
File: :0-0
Timestamp: 2025-10-15T06:36:42.423Z
Learning: The `tsc --init` command requires the `--types node` flag to properly include Node.js type definitions from `types/node` in the generated tsconfig.json, even when types/node is already installed. Without this flag, TypeScript may not automatically pick up Node.js typings.
Applied to files:
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.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/600-about/30-docs-components/01-mdx-examples.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/100-kysely.mdxcontent/200-orm/050-overview/500-databases/300-postgresql.mdxcontent/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdxcontent/200-orm/050-overview/500-databases/500-sqlite.mdxcontent/200-orm/050-overview/500-databases/850-planetscale.mdxcontent/100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.mdxcontent/200-orm/500-reference/200-prisma-cli-reference.mdxcontent/200-orm/050-overview/500-databases/200-database-drivers.mdxcontent/200-orm/050-overview/500-databases/800-sql-server/index.mdxcontent/250-postgres/350-integrations/100-netlify.mdxcontent/200-orm/050-overview/500-databases/400-mysql.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 (63)
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx (4)
24-25: Type definitions addition is well‑placed.Adding
@types/better-sqlite3alongsideprismaand@types/nodeensures developers have proper TypeScript support for the SQLite adapter used in this guide. This aligns with the adapter being instantiated on line 167 and strengthens type safety throughout the setup. The package installation sequence is logical and follows the pattern described in later sections.
40-41: Init command correctly specifies custom output path.The
--datasource-provider sqlite --output ../generated/prismaflags align with the new Prisma init command capabilities. The output path is properly mirrored in the schema.prisma generator configuration (line 89) and the PrismaClient import statement (line 168), creating consistent project layout documentation.
49-82: Configuration migration to prisma.config.ts is correctly documented.The documentation clearly shows the new configuration‑driven approach where datasource URLs are managed in
prisma.config.tsrather than hardcoded in schema.prisma. The integration ofdotenv/config(lines 68–71) enables proper environment variable loading, and the use ofenv('DATABASE_URL')demonstrates the intended pattern. This aligns well with the PR objectives around datasource URL migration.
86-95: Schema and import paths are consistent with output configuration.The schema.prisma generator specifies
output = "../generated/prisma", and the PrismaClient import on line 168 (from "../generated/prisma/client") correctly reflects this structure. There's no mismatch between declared output and actual imports—developers following this guide will import from the correct location.Also applies to: 168-168
content/100-getting-started/02-prisma-orm/100-quickstart/200-sqlite.mdx (5)
30-42: Solid addition of TypeScript types for better-sqlite3.The new
@types/better-sqlite3package and its description are clear and accurate. Users now have proper TypeScript support from the start of the quickstart.
78-82: Correct use of prisma init flags.The command appropriately uses
--datasource-provider sqliteand--output ../generated/prismato configure the initial setup. This aligns with the generated client import path at line 201.
104-123: Well-structured configuration progression.The tutorial clearly demonstrates the initial generated config and then shows the necessary additions:
dotenv/configimport for environment variables and the migrations path configuration. This helps users understand what's auto-generated versus what they need to customize.
198-209: Consistent import paths and proper setup.The PrismaClient import correctly references
../generated/prisma/client, which aligns with the--output ../generated/prismaflag specified in the init command. The dotenv import ensures environment variables are loaded before accessing the database URL.
1-273: Excellent documentation structure and consistency.The entire guide maintains sentence case for headings (e.g., "Install required dependencies", "Define your data model"), preserves product name casing correctly, and presents a clear progression from project setup through querying. All code examples are syntactically sound and the configuration steps align logically.
content/100-getting-started/02-prisma-orm/100-quickstart/500-sql-server.mdx (1)
36-36:@types/mssqladdition is comprehensive and well-documented.Both the npm install command (line 36) and the package description (line 45) are updated together, keeping the documentation consistent. This mirrors the pattern used for other database-specific type definitions across the quickstart docs.
Also applies to: 45-45
content/100-getting-started/02-prisma-orm/100-quickstart/100-prisma-postgres.mdx (3)
29-29: Good: @types/pg addition aligns with type-safety improvements.Adding
@types/pgto devDependencies ensures TypeScript definitions are available for the node-postgres driver, supporting the type-safe patterns shown in the PrismaPg instantiation code. The description is clear and helpful.Also applies to: 38-38
79-79: Strong: Clear documentation of init command behavior and generated files.The
--dband--outputflags are valid CLI options, and the documentation correctly describes the three generated files (schema, config, env) plus the generated Prisma Client. This aligns with the new prisma.config.ts-based configuration approach. Based on learnings.Also applies to: 88-94
200-200: Excellent: Import path matches specified output directory.The import path
../generated/prisma/clientcorrectly corresponds to the output directory specified in the init command, maintaining consistency throughout the guide.Also applies to: 204-205
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/100-prisma-postgres.mdx (1)
24-24: Consistent: @types/pg addition maintains pattern across guides.Aligns perfectly with the parallel change in the quickstart version, ensuring consistent TypeScript support across both new-project and add-to-existing-project paths.
content/250-postgres/350-integrations/100-netlify.mdx (1)
123-123: Good: Updated documentation reflects new prisma.config.ts generation.The text now accurately describes that
npx prisma initgenerates three files (schema, config, and env), which correctly reflects the expanded scope of the init command in this version.content/100-getting-started/03-prisma-postgres/100-quickstart/200-drizzle-orm.mdx (2)
46-101: Strong: create-db workflow appropriate for managed Prisma Postgres.The CLI tool introduction and environment setup are well-documented. The security warning about not committing
.envfiles is crucial and appropriately placed. This pattern is consistent with other Prisma Postgres guides.
112-118: Good: Package breakdown includes @types/pg documentation.The distinction between runtime and development dependencies is clear, and the @types/pg description correctly identifies it as TypeScript definitions for the driver.
content/100-getting-started/03-prisma-postgres/100-quickstart/300-typeorm.mdx (2)
118-139: Excellent: Connection string parsing is robust and SSL properly configured.The parseConnectionString function correctly uses the URL API to extract connection parameters and removes the leading slash from the database path. The
ssl: trueconfiguration is appropriate for managed Prisma Postgres connections. The spread operator usage is clean and readable.Also applies to: 151-152
172-177: Good: Expected output accurately represents TypeORM behavior.The shown output correctly demonstrates user creation and retrieval, providing clear verification that the setup worked.
content/100-getting-started/03-prisma-postgres/100-quickstart/100-kysely.mdx (4)
35-55: Strong: TypeScript strict mode requirement clearly emphasized.The configuration section correctly highlights that strict mode is required for Kysely's type safety, which is a critical setup requirement. The version recommendations for improved type inference are helpful.
71-128: Consistent: create-db workflow pattern applied uniformly across Prisma Postgres guides.The environment setup follows the established pattern with appropriate security warnings about not committing
.envfiles.
146-203: Excellent: Database types and connection setup follow best practices.The typed Database interface and parseConnectionString function correctly establish type-safe configuration. The SSL configuration is appropriate, and the inline comments (though verbose) help readers understand the configuration layers.
209-265: Good: Query example demonstrates complete lifecycle.The create-table, insert, and select operations provide a thorough walkthrough of Kysely usage. The error handling and connection cleanup are properly implemented.
content/100-getting-started/02-prisma-orm/100-quickstart/700-cockroachdb.mdx (1)
34-34: Good: @types/pg addition is appropriate and well-documented for CockroachDB.The addition correctly recognizes that CockroachDB's PostgreSQL compatibility means it uses the same node-postgres adapter and type definitions, maintaining consistency with other PostgreSQL-based guides.
Also applies to: 42-43
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/300-postgresql.mdx (1)
24-24: Consistent: @types/pg addition maintains alignment with other PostgreSQL guides.Completes the uniform pattern of adding TypeScript definitions across all PostgreSQL-based quickstart and add-to-existing-project guides.
content/200-orm/050-overview/500-databases/840-cockroachdb.mdx (1)
105-121: Prisma ORM 7 configuration migration is well-documented.The section correctly explains the shift to
prisma.config.tsfor database URL configuration. The example is accurate and includes the necessarydotenv/configimport for environment variable loading.content/100-getting-started/02-prisma-orm/200-add-to-existing-project/700-cockroachdb.mdx (1)
24-24: Correct addition of TypeScript type definitions for node-postgres.Adding
@types/pgis the right choice here since the guide uses the@prisma/adapter-pgdriver adapter for CockroachDB, which is PostgreSQL-compatible.content/100-getting-started/02-prisma-orm/100-quickstart/300-postgresql.mdx (1)
40-40: Appropriate inclusion of node-postgres TypeScript definitions.The
@types/pgpackage and its description are correctly added. This aligns with the driver adapter pattern used in the guide.Also applies to: 49-49
content/200-orm/050-overview/500-databases/850-planetscale.mdx (1)
77-91: Prisma 7 configuration correctly migrated for PlanetScale.The transition to
prisma.config.tsis properly explained and positioned within the relation mode setup. The example correctly demonstrates environment-based URL configuration.content/200-orm/050-overview/500-databases/400-mysql.mdx (2)
22-38: MySQL configuration correctly migrated to Prisma 7 pattern.The shift to
prisma.config.tsis properly implemented with appropriate examples and explanation.
61-70: Import paths and driver adapter setup correctly updated.The addition of
import 'dotenv/config'and the updated PrismaClient import path (../generated/prisma/client) align with the Prisma 7 generator output structure. The adapter instantiation is properly formatted.content/200-orm/050-overview/500-databases/800-sql-server/index.mdx (2)
21-37: SQL Server configuration correctly migrated to Prisma ORM 7.The
prisma.config.tsexample properly demonstrates environment-based URL configuration consistent with the broader PR changes.
61-63: Driver adapter section correctly updated with new import paths.The dotenv/config import and updated PrismaClient import path reflect the Prisma 7 output structure changes.
content/600-about/30-docs-components/01-mdx-examples.mdx (2)
344-362: Prisma init output example correctly reflects Prisma 7 changes.The updated output demonstrates the new workflow guidance with separate "CONNECT EXISTING DATABASE" and "CREATE NEW DATABASE" sections, which properly aligns with the Prisma 7 init command changes mentioned in the PR objectives.
437-456: Consistent update in custom output example.The second CodeWithResult example is similarly updated to match the first, maintaining documentation consistency.
content/200-orm/050-overview/500-databases/300-postgresql.mdx (2)
31-47: PostgreSQL configuration successfully migrated to Prisma ORM 7.The explanation and prisma.config.ts example clearly demonstrate the new approach to URL configuration, consistent across all database guides in this PR.
70-77: Node-postgres driver section correctly updated for Prisma 7.The import path changes and dotenv/config addition properly reflect the Prisma 7 generator output structure and environment variable handling pattern.
content/200-orm/050-overview/500-databases/500-sqlite.mdx (3)
22-24: Verify that the narrative aligns with schema structure for clarity.Line 22 should clarify that in Prisma ORM 7, the datasource block in the schema now only specifies the
provider, while the actual URL is configured inprisma.config.ts. The current text could be misleading since it doesn't explicitly state this separation. Consider revising to: "Thedatasourceblock specifies thesqlitedata source connector (provider), while the database URL is configured inprisma.config.ts."
26-35: Configuration structure looks good for Prisma ORM 7.The
prisma.config.tsexample correctly usesdefineConfigandenv()to configure the SQLite connection URL. This aligns with Prisma 7 patterns and the web-based Prisma Config reference documentation.
60-61: Import paths are consistently updated to Prisma 7 conventions.Both adapter examples correctly import
PrismaClientfrom'../generated/prisma/client', which is the updated path for Prisma ORM 7. This is consistent across the file and aligns with the generator output path configuration.Also applies to: 78-79
content/200-orm/500-reference/200-prisma-cli-reference.mdx (8)
138-139: Default output path correctly documented.The default value for
--outputis now correctly shown as../generated/prisma, which aligns with Prisma 7's recommended output structure for generated client code.
158-182: Init command output accurately reflects Prisma 7 structure.The example output correctly shows the creation of
prisma.config.tsfile, replacing the old inline datasource configuration approach. The instructions guide users to "Configure your DATABASE_URL inprisma.config.ts", which is the Prisma 7 pattern.
197-265:prisma init --dbexample demonstrates modern Postgres setup well.The updated output shows the Prisma Postgres initialization flow with proper adapter setup patterns. Line 237 correctly imports from
"./generated/prisma/client"and lines 240-243 show the modern adapter instantiation pattern withconnectionStringfrom environment.
296-302: Generator provider consistently updated to "prisma-client" across all examples.All code examples now use
provider = "prisma-client"instead of the previous"prisma-client-js", and the output paths are updated to../generated/prisma. This is consistent across the entire document and aligns with Prisma 7 conventions.Also applies to: 343-351, 421-425
353-371: Excellent addition of prisma.config.ts documentation section.The new section clearly explains the purpose and structure of
prisma.config.ts, with a complete example showing how to usedefineConfig,env(), and the schema/migrations configuration. The reference link to the prisma-config-reference is helpful for users needing more details.
427-443: prisma.config.ts example for--urloption is well-structured.The example correctly shows how
prisma init --url mysql://...generates both the schema and the prisma.config.ts file with the custom URL handled via environment variables and theenv()function.
944-971: Multiple sections correctly document prisma.config.ts as prerequisite for CLI commands.The
db pull,db push,db execute,migrate diff, andstudiocommands all include updated prerequisites sections showing the properprisma.config.tsconfiguration. This consistency across commands is excellent and helps users understand the Prisma 7 pattern.Also applies to: 1107-1134, 1219-1248, 1587-1614, 1712-1739
464-478: Generator documentation updated appropriately for the new provider naming.Line 464 states "The
generatecommand is most often used to generate Prisma Client with theprisma-clientgenerator", which correctly refers to the new provider name. Line 472 in the Prerequisites section also correctly shows the new provider name.content/200-orm/050-overview/500-databases/200-database-drivers.mdx (4)
15-30: Excellent explanation of Prisma ORM 7's query compiler default.This note correctly explains that as of v6.16.0, Prisma ORM usage without Rust engine binaries is Generally Available, and the default generator configuration shown is accurate for Prisma 7. The callout that "driver adapters are required when using the query compiler" is crucial context that helps users understand the architecture.
122-122: Import paths correctly align with Prisma 7 output structure.Both examples import from
'../generated/prisma/client', which matches the new default output path configuration. This is consistent and correct.Also applies to: 140-140
132-147: New section provides critical clarification for driver adapter users.The section "Driver adapters and database connection configuration" now clearly explains that while
prisma.config.tshandles the CLI datasource URL, driver adapters require the connection string to be provided in application code. The example withimport 'dotenv/config'andprocess.env.DATABASE_URLis accurate and demonstrates the proper pattern.
151-170: Clear guidance on custom output paths with practical examples.The section explains that the default output path is
../generated/prismaand provides both direct import examples and a linked dependency approach using npm/pnpm/yarn. This gives users flexibility in how they want to reference the generated client.static/_redirects (1)
824-824: LGTM!The redirect rule is correctly formatted and placed in the dynamic redirects section. The wildcard pattern appropriately captures any URL variations, and the target path follows the convention used throughout this file.
content/250-postgres/50-getting-started/200-import-from-existing-database.mdx (1)
11-11: The redirect target is correct—no inconsistency here.The concern in the original review comment conflates two unrelated redirects. The React Redirect at line 11 uses
/getting-started/prisma-postgres/import-from-existing-database-postgresql, which:
- Matches the consistent pattern across all other React Redirect components in the codebase (all omit
/docs)- Aligns with the target in
static/_redirectsline 697 (which redirects to this exact path)The
/docs/prefix discrepancy you noted is in line 824 ofstatic/_redirects, but that rule redirects from a different source path (/postgres/introduction/import-from-existing-database*), making it a separate redirect chain—not a contradiction with this React Redirect.The code is sound as written.
Likely an incorrect or invalid review comment.
content/100-getting-started/03-prisma-postgres/100-from-the-cli.mdx (5)
186-221: prisma.config.ts setup is correct and follows current best practices.The introduction of
prisma.config.tswith properdotenv/configimport and environment variable handling via theenv()helper is solid. When using prisma.config.ts, environment variables from .env files are not automatically loaded, and your guide correctly addresses this by importingdotenv/configat line 208.Verify that this represents a breaking change from prior documentation and that migration guidance is in place for existing users moving from the traditional schema-embedded datasource pattern to the config-file pattern.
573-573: Prisma Studio command correctly uses new prisma.config.ts pattern.The explicit
--config ./prisma.config.tsflag is appropriate and consistent with how Prisma CLI discovers the config file. Since other commands in the guide (likenpx prisma migrate devandnpx prisma generate) omit this flag and rely on default discovery, the behavior is consistent.
2-2: Heading case follows sentence case convention correctly."From the CLI" is appropriately formatted in sentence case. No concerns.
Also applies to: 3-3
11-15: Documentation structure and step numbering is clear, though intro overview differs from main section numbering.The introductory overview (lines 11-15) mentions three high-level outcomes, but the detailed sections begin with "1. Organize your project directory" (line 98). This is structurally sound—the intro is a conceptual overview while the main content has its own step progression—so no changes are necessary, but consider this structure when cross-referencing or in table of contents generation.
Also applies to: 98-124
71-71: Resolve migration command inconsistency across tutorial stepsYour guide teaches two different migration command patterns that serve the same purpose:
- Line 71 (
npx prisma migrate dev): During initial setup, uses automatic naming- Line 265 (
npx prisma migrate dev --name init): After adding models, uses explicit--name initBoth are functionally valid—Prisma will create a migration either way. However, inconsistent instruction undermines the learning flow. Users won't know which pattern to adopt in their own work.
Choose one approach and apply it consistently:
- Prefer explicit naming (
--name initat both locations): Reinforces best practice of intentional, discoverable migration names. Better for users building production systems.- Prefer automatic naming (remove
--name initfrom line 265): Simpler mental model for beginners, fewer flags to remember. Works well if your guide emphasizes "let Prisma handle the details."The explicit naming approach aligns with how migration teams typically manage schema evolution, so that's worth considering when making your choice.
⛔ Skipped due to learnings
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: 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".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.content/100-getting-started/03-prisma-postgres/100-quickstart/50-prisma-orm.mdx (4)
174-174: Clarify the redundancy ofdotenv/configimports in both files.Line 92 imports
dotenv/configinprisma.config.ts, and line 174 also imports it inlib/prisma.ts. Sinceprisma.config.tsis loaded by Prisma CLI (and dotenv is already initialized there), the import inlib/prisma.tsmay be redundant. However, iflib/prisma.tsis used in a Node.js context outside of Prisma CLI, it might be necessary.Clarify whether:
- Both imports are needed, or if one can be removed
- The dotenv load order matters for Prisma operations
- There's a reason for defensive dotenv loading in both locations
This is a minor point but worth documenting if intentional, as it could confuse developers about when/where env vars are loaded.
88-105: Code is correct — no changes needed.The
env()function from "prisma/config" is the recommended way to referenceDATABASE_URLinprisma.config.ts, and theimport 'dotenv/config'at the top is necessary to load environment variables from your.envfile. The code snippet follows Prisma's documented best practices exactly.
71-78: ---The
--output ../generated/prismaapproach has known issues—verify this pattern works as intended.While
npx prisma init --outputdoes support relative paths, multiple GitHub reports document cases where custom/relative output paths can produce surprising filesystem locations, with the client generated one directory higher than expected in some cases. Generating clients with certain relative outputs has also caused runtime issues such as SQLite relative-path errors and altered internal relativePath values.Before publishing this pattern in documentation, either:
- Test this specific layout end-to-end to confirm it generates at
../generated/prisma/clientreliably- Switch to an absolute or project-root-relative path (the recommended approach per Prisma guidance)
- Add explicit testing guidance and warnings for users following this pattern
The relative path structure works in theory, but the documented caveats suggest users should validate it matches their actual filesystem structure.
71-71: The original review was based on a misunderstanding—no changes needed.Here's why the paths are correct:
When you run
npx prisma init --db --output ../generated/prismafrom the project root, the--outputflag doesn't immediately create a file at that path. Instead, it writes that value into the schema.prisma generator configuration. Later, when Prisma generates the client, it resolves that path relative to the schema file's location (prisma/schema.prisma), not the current working directory.So
../generated/prismafromprisma/correctly resolves togenerated/prisma/at the project root—not outside the project as the original review suggested. The import fromlib/prisma.tsusing../generated/prisma/clientalso resolves correctly: up one level fromlib/to the project root, then into the generated directory.The documentation accurately describes this behavior and matches Prisma's official pattern for custom output paths.
content/100-getting-started/02-prisma-orm/200-add-to-existing-project/500-sql-server.mdx
Show resolved
Hide resolved
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
🍈 Lychee Link Check Report
📊 Results Overview
|
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 800-guides/180-solid-start.mdx
|
Summary by CodeRabbit