-
Notifications
You must be signed in to change notification settings - Fork 856
fix: clarify schema.prisma file location better DC-6209 #7261
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 change updates documentation for Prisma schema file organization, shifting guidance from a single-file approach to a structured multi-file workflow aligned with Prisma ORM v7. The update clarifies that schema files reside in a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks✅ Passed checks (3 passed)
Comment |
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
Deploying docs with
|
| Latest commit: |
4ac932f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4033fb60.docs-51g.pages.dev |
| Branch Preview URL: | https://dc-6209.docs-51g.pages.dev |
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 200-orm/050-overview/500-databases/840-cockroachdb.mdx
|
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 (1)
content/200-orm/100-prisma-schema/10-overview/04-location.mdx (1)
72-72: Fix typo: remove duplicate "the".Line 72 has a duplicate word: "pass the the
--schema" should be "pass the--schema".- pass the the `--schema` option to your Prisma CLI command (e.g. `prisma migrate dev --schema ./prisma`) + pass the `--schema` option to your Prisma CLI command (e.g. `prisma migrate dev --schema ./prisma`)
🧹 Nitpick comments (1)
content/200-orm/100-prisma-schema/10-overview/04-location.mdx (1)
68-97: Clarify directory vs. file path specification in the intro text.The introductory text at line 68 states "you must always explicitly specify the location of the directory that contains your schema files," but the examples show both directory paths (lines 72, 78:
./prisma) and file paths (line 88:prisma/schema.prisma). While both work based on the warning at line 107, this could confuse users about which approach is expected. Consider revising line 68 to clarify that you can specify either the directory or the file path directly.- When using a multi-file Prisma schema, you must always explicitly specify the location of the directory that contains your schema files (including the main `schema.prisma` file with your `generator` block). + When using a multi-file Prisma schema, you must always explicitly specify the location of the schema directory (or file path) to ensure the Prisma CLI can locate the `schema.prisma` file with your `generator` block.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/200-orm/100-prisma-schema/10-overview/04-location.mdx(4 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 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".
📚 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/100-prisma-schema/10-overview/04-location.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/100-prisma-schema/10-overview/04-location.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: Check internal links
- GitHub Check: Check links
- GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
content/200-orm/100-prisma-schema/10-overview/04-location.mdx (2)
105-130: Well-structured clarifications on schema location requirements.The new warning block (lines 105–109) clearly emphasizes that
schema.prismamust be in the configured directory, and the info box (lines 126–130) helpfully notes that the CLI works without additional config when using the default./prisma/schema.prismalocation. These additions significantly improve clarity for users adopting multi-file schemas.
84-96: Theprisma.config.tsexample is correct and current for Prisma v7.The imports (
defineConfig,envfrom"prisma/config"), function signature, and configuration properties (schema,migrations,datasource) all match Prisma v7 documentation. Themigrations.seedproperty is a valid Prisma v7 configuration option for defining the shell command to run after migrations. The optionalengineproperty is correctly omitted here (it defaults to"classic"). String paths like"prisma/schema.prisma"are valid and work because Prisma resolves paths relative to the config file location.No changes needed.
Summary by CodeRabbit