Skip to content

Conversation

@ArthurGamby
Copy link
Contributor

@ArthurGamby ArthurGamby commented Dec 3, 2025

Summary by CodeRabbit

  • Documentation
    • Updated Prisma Migrate CLI flags: --from-schema-datamodel is now --from-schema, and --to-schema-datamodel is now --to-schema.
    • Migration guides and CLI reference documentation updated with new flag names.
    • Migration examples across all database framework guides reflect the updated command syntax.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

This PR systematically updates Prisma CLI documentation across multiple guides and reference materials to reflect a flag nomenclature change in the prisma migrate diff command, replacing --from-schema-datamodel and --to-schema-datamodel with --from-schema and --to-schema respectively.

Changes

Cohort / File(s) Summary
Prisma Migrate Getting Started & Workflows
content/200-orm/300-prisma-migrate/050-getting-started.mdx, content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx, content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx, content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx
Updated --to-schema-datamodel flag to --to-schema in migrate diff commands across baseline migration and workflow documentation.
Prisma Migrate Down Migrations
content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx
Updated --from-schema-datamodel flag to --from-schema in two code blocks demonstrating diff generation with --to-migrations and --to-schema-datasource options.
Prisma CLI Reference
content/200-orm/500-reference/200-prisma-cli-reference.mdx
Renamed both --from-schema-datamodel and --to-schema-datamodel options in the migrate diff command reference section.
Migration Guides
content/800-guides/030-migrate-from-typeorm.mdx, content/800-guides/040-migrate-from-sequelize.mdx, content/800-guides/060-migrate-from-drizzle.mdx, content/800-guides/070-cloudflare-d1.mdx
Updated baseline migration commands to use --to-schema instead of --to-schema-datamodel in diff generation steps across all framework migration guides.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Attention points:
    • Verify all instances of the old flags have been replaced (10 files across multiple directories suggest completeness, but spot-check for any stragglers)
    • Confirm the flag renaming is consistent across all documentation files—no mixed usage of old and new names
    • Ensure surrounding command syntax and arguments remain correct after substitutions (file paths, quoted strings, etc.)
    • Check that the reference documentation accurately describes the new flag names without orphaned references to deprecated options

Possibly related issues

Possibly related PRs

  • Update Cloudflare D1 Guides #7273: Updates the Cloudflare D1 guide with identical flag replacements (--to-schema-datamodel--to-schema), suggesting a coordinated effort to normalize CLI flag references across the documentation.

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 accurately and specifically describes the main change: updating deprecated Prisma migrate diff flags throughout the documentation from --to-schema-datamodel and --from-schema-datamodel to their current equivalents.
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 2076e5a and f8ab8bc.

📒 Files selected for processing (10)
  • content/200-orm/300-prisma-migrate/050-getting-started.mdx (1 hunks)
  • content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx (1 hunks)
  • content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx (1 hunks)
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx (2 hunks)
  • content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx (1 hunks)
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx (2 hunks)
  • content/800-guides/030-migrate-from-typeorm.mdx (1 hunks)
  • content/800-guides/040-migrate-from-sequelize.mdx (1 hunks)
  • content/800-guides/060-migrate-from-drizzle.mdx (1 hunks)
  • content/800-guides/070-cloudflare-d1.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.587Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.
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.
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.
📚 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/800-guides/060-migrate-from-drizzle.mdx
  • content/200-orm/300-prisma-migrate/050-getting-started.mdx
  • content/800-guides/070-cloudflare-d1.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx
  • content/800-guides/030-migrate-from-typeorm.mdx
  • content/800-guides/040-migrate-from-sequelize.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx
📚 Learning: 2025-11-20T21:00:02.587Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.587Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.

Applied to files:

  • content/800-guides/060-migrate-from-drizzle.mdx
  • content/200-orm/300-prisma-migrate/050-getting-started.mdx
  • content/800-guides/070-cloudflare-d1.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx
  • content/800-guides/030-migrate-from-typeorm.mdx
  • content/800-guides/040-migrate-from-sequelize.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx
  • content/200-orm/500-reference/200-prisma-cli-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/800-guides/060-migrate-from-drizzle.mdx
  • content/200-orm/300-prisma-migrate/050-getting-started.mdx
  • content/800-guides/070-cloudflare-d1.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx
  • content/800-guides/040-migrate-from-sequelize.mdx
  • content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx
  • content/200-orm/500-reference/200-prisma-cli-reference.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/800-guides/070-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: 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/800-guides/070-cloudflare-d1.mdx
  • content/200-orm/500-reference/200-prisma-cli-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). (4)
  • GitHub Check: Check for dangerous urls
  • GitHub Check: Check internal links
  • GitHub Check: Post files changed comment
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (10)
content/800-guides/070-cloudflare-d1.mdx (1)

225-236: CLI flag update is correctly applied in baseline migration context.

The change from --to-schema-datamodel to --to-schema is consistent with the PR's intended flag renaming. The documentation and command structure remain sound.

content/200-orm/300-prisma-migrate/300-workflows/60-generating-down-migrations.mdx (1)

108-125: Flag renaming consistently applied across both down migration scenarios.

Both occurrences of --from-schema-datamodel have been correctly updated to --from-schema. The two code blocks showing different migration strategies (with --to-migrations vs. --to-schema-datasource) now use the current flag naming.

content/200-orm/300-prisma-migrate/300-workflows/70-patching-and-hotfixing.mdx (1)

225-234: Forward path migration diff correctly updated with new flag name.

The --to-schema flag change in the forward recovery path is appropriately applied. The command generates a diff from the production database's current state to the desired schema, which is accurately documented.

content/200-orm/300-prisma-migrate/300-workflows/30-baselining.mdx (1)

70-77: Baseline migration command correctly updated with new flag.

The --to-schema flag change in the baseline creation step is properly applied. The command correctly generates the initial migration representing the existing database state.

content/800-guides/060-migrate-from-drizzle.mdx (1)

215-223: Migration baseline command correctly uses updated flag name.

The --to-schema flag is properly applied in the baseline migration generation. Documentation accurately describes the flag's purpose for specifying the current database state.

content/200-orm/300-prisma-migrate/050-getting-started.mdx (1)

230-236: Baseline migration generation uses correct updated flag.

The --to-schema flag change in the baseline creation step is properly applied for projects adding Prisma Migrate to existing databases. The command structure and documentation remain clear.

content/800-guides/030-migrate-from-typeorm.mdx (1)

95-102: TypeORM migration guide baseline command correctly updated.

The --to-schema flag change is appropriately applied in the TypeORM to Prisma migration workflow. The baseline generation command and surrounding context remain clear and coherent.

content/800-guides/040-migrate-from-sequelize.mdx (1)

132-141: Sequelize migration guide baseline command correctly uses new flag.

The --to-schema flag update is properly applied in the Sequelize to Prisma migration workflow. Documentation at lines 134–136 accurately describes the flag's purpose for specifying the current database state.

content/200-orm/300-prisma-migrate/300-workflows/50-squashing-migrations.mdx (1)

113-117: Flag update correctly applied.

The change from --to-schema-datamodel to --to-schema at line 115 is accurate and aligns with the PR objective. The command remains syntactically correct and provides users with the current, non-deprecated flag name.

content/200-orm/500-reference/200-prisma-cli-reference.mdx (1)

1620-1639: Flag reference table correctly updated.

The migrate diff command options table now references the current flag names:

  • --from-schema (line 1624) and --to-schema (line 1635) replace their deprecated -datamodel suffixed counterparts
  • Descriptions remain accurate and helpful
  • Related flags like --from-schema-datasource and --to-schema-datasource are properly preserved as separate, distinct options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

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

github-actions bot commented Dec 3, 2025

🍈 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 2268
✅ Successful 2238
⏳ Timeouts 0
🔀 Redirected 4
👻 Excluded 24
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 200-orm/200-prisma-client/500-deployment/101-traditional/325-deploy-to-railway.mdx

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@ArthurGamby
Copy link
Contributor Author

I've updated the deprecated --to-schema-datamodel / --from-schema-datamodel flags to --to-schema / --from-schema in the docs.

I wasn't sure if I was supposed to update only the baselining page or all occurrences, so I went ahead and updated all 10 files that used these deprecated flags (baselining, getting-started, squashing-migrations, patching-and-hotfixing, generating-down-migrations, CLI reference, and the migration guides for Drizzle/Sequelize/TypeORM/Cloudflare D1).

Let me know if you'd prefer I revert some of those and keep it scoped to just the baselining page!

@cloudflare-workers-and-pages
Copy link

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f8ab8bc
Status: ✅  Deploy successful!
Preview URL: https://1ff5669d.docs-51g.pages.dev
Branch Preview URL: https://dc-6336-fix-baseline-databas.docs-51g.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🍈 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 2268
✅ Successful 2234
⏳ Timeouts 0
🔀 Redirected 8
👻 Excluded 24
❓ Unknown 0
🚫 Errors 1
⛔ Unsupported 1

Errors per input

Errors in 200-orm/050-overview/100-introduction/300-data-modeling.mdx

@ArthurGamby ArthurGamby merged commit 66f81e3 into main Dec 4, 2025
7 of 9 checks passed
@ArthurGamby ArthurGamby deleted the DC-6336-fix-baseline-database-migration-command branch December 4, 2025 09:31
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