Skip to content

Conversation

@ankur-arch
Copy link
Contributor

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

Summary by CodeRabbit

  • Documentation
    • Restructured Prisma schema setup guidance to clarify multi-file organization and directory structure
    • Updated examples to reflect Prisma ORM v7 configuration patterns with explicit migrations and datasource settings
    • Added visual directory illustrations and documented default CLI behavior for schema file discovery

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

coderabbitai bot commented Nov 16, 2025

Walkthrough

This 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 prisma/ directory, emphasizes that the main schema.prisma containing generator blocks must be in the configured location, and updates examples accordingly.

Changes

Cohort / File(s) Summary
Prisma schema location documentation
content/200-orm/100-prisma-schema/10-overview/04-location.mdx
Reworked guidance on multi-file schema organization to reflect Prisma ORM v7 config-based setup; updated examples to show explicit migrations and datasource settings with dotenv configuration; replaced single-file references with directory-structured workflow; added info block clarifying default CLI behavior; adjusted narrative to emphasize main schema location within configured prisma/ directory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify accuracy of Prisma ORM v7 configuration examples against current documentation standards
  • Confirm directory structure illustrations align with Prisma CLI conventions
  • Validate that migration path guidance matches actual CLI behavior in v7

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 describes the main change: clarifying schema.prisma file location guidance in the documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@cloudflare-workers-and-pages
Copy link

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4ac932f
Status: ✅  Deploy successful!
Preview URL: https://4033fb60.docs-51g.pages.dev
Branch Preview URL: https://dc-6209.docs-51g.pages.dev

View logs

@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 2269
✅ Successful 2241
⏳ Timeouts 0
🔀 Redirected 4
👻 Excluded 22
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 200-orm/050-overview/500-databases/840-cockroachdb.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

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

📥 Commits

Reviewing files that changed from the base of the PR and between c2671d7 and 4ac932f.

📒 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.prisma must 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.prisma location. These additions significantly improve clarity for users adopting multi-file schemas.


84-96: The prisma.config.ts example is correct and current for Prisma v7.

The imports (defineConfig, env from "prisma/config"), function signature, and configuration properties (schema, migrations, datasource) all match Prisma v7 documentation. The migrations.seed property is a valid Prisma v7 configuration option for defining the shell command to run after migrations. The optional engine property 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.

@ankur-arch ankur-arch merged commit 1db29fe into prisma-7 Nov 17, 2025
5 of 6 checks passed
@ankur-arch ankur-arch deleted the DC-6209 branch November 17, 2025 09:12
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