prisma · Prisma Docs
Prisma diff (/docs/cli/migrate/diff)
Compares two database schema sources to generate a description or SQL script of the migration required to transform the first source into the second.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Prisma diff (/docs/cli/migrate/diff)
Compares two database schema sources to generate a description or SQL script of the migration required to transform the first source into the second.
When To Use
Use when you need to generate a SQL migration script or a human-readable summary to synchronize differences between two Prisma schemas or migration directories.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/prisma-diff-docs-cli-migrate-workflow-guide.md | Documentation explaining the usage and functionality of the prisma migrate diff command for comparing database schema sources. | Questions about documentation explaining the usage and functionality of the prisma migrate diff command for comparing database schema... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-cli.bash | A bash command example demonstrating the usage of the prisma migrate diff CLI tool to compare two database states. | Exact payloads, commands, or snippets shown in A bash command example demonstrating the usage of the prisma migrate diff CLI tool to compare two database states. |
examples/prisma-diff-docs-cli-migrate-prisma-diff-cli-migrate.prisma | A Prisma schema file demonstrating the usage of the prisma diff command for database migration comparisons. | Exact payloads, commands, or snippets shown in A Prisma schema file demonstrating the usage of the prisma diff command for database migration comparisons. |
examples/prisma-diff-docs-cli-migrate-prisma-diff-typescript-config.typescript | A TypeScript configuration example demonstrating the use of defineConfig for Prisma diff operations. | Exact payloads, commands, or snippets shown in A TypeScript configuration example demonstrating the use of defineConfig for Prisma diff operations. |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a datasource configuration against a schema file and generate a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a datasource configuration agains... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-2.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a datasource configuration against a schema file and output a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a datasource configuration agains... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-command.bash | A bash command demonstrating the use of the prisma migrate diff CLI tool to compare a datasource configuration against a schema file and output a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating the use of the prisma migrate diff CLI tool to compare a datasource configuration agains... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-3.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a datasource configuration against a schema file and output a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a datasource configuration agains... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-4.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a schema file against a datasource configuration and output a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a schema file against a datasourc... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-5.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a schema file against a datasource configuration and output a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a schema file against a datasourc... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-6.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a schema file against a datasource configuration and output a migration script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare a schema file against a datasourc... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-7.bash | A bash command demonstrating how to use the prisma migrate diff command to generate a migration script between a schema file and a datasource configuration. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff command to generate a migration script between a sche... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-command-2.bash | A bash command demonstrating how to use the prisma migrate diff CLI tool to compare migrations against a datasource and generate a SQL script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff CLI tool to compare migrations against a datasource a... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-script-generation.bash | A bash command using pnpm to execute the prisma migrate diff operation to generate a migration script from existing migrations to a datasource configuration. | Exact payloads, commands, or snippets shown in A bash command using pnpm to execute the prisma migrate diff operation to generate a migration script from existing m... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-8.bash | A bash command demonstrating how to use the prisma migrate diff command to compare migrations against a datasource and output a script. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff command to compare migrations against a datasource an... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-9.bash | A bash command demonstrating how to use the prisma migrate diff command to generate a migration script from existing migrations to a datasource configuration. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff command to generate a migration script from existing... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-script-generation-2.bash | A bash command sequence that uses prisma migrate diff to generate a migration script from a datasource configuration to a schema file and executes it. | Exact payloads, commands, or snippets shown in A bash command sequence that uses prisma migrate diff to generate a migration script from a datasource configuration... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-script-generation-3.bash | A bash command sequence using prisma migrate diff to generate a migration script from a datasource configuration to a schema file and execute it. | Exact payloads, commands, or snippets shown in A bash command sequence using prisma migrate diff to generate a migration script from a datasource configuration to a... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-script-generation-4.bash | A bash command sequence using prisma migrate diff to generate a migration script from a datasource configuration to a schema file and executing it via stdin. | Exact payloads, commands, or snippets shown in A bash command sequence using prisma migrate diff to generate a migration script from a datasource configuration to a... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-script-generation-5.bash | A bash command sequence using bunx to generate a migration script by comparing a datasource configuration to a schema file and executing it. | Exact payloads, commands, or snippets shown in A bash command sequence using bunx to generate a migration script by comparing a datasource configuration to a schema... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-10.bash | A bash command demonstrating the use of the npx prisma migrate diff CLI tool with various flags. | Exact payloads, commands, or snippets shown in A bash command demonstrating the use of the npx prisma migrate diff CLI tool with various flags. |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-bash-command-3.bash | A bash command demonstrating the use of the prisma migrate diff CLI tool with exit-code and datasource configuration flags. | Exact payloads, commands, or snippets shown in A bash command demonstrating the use of the prisma migrate diff CLI tool with exit-code and datasource configuration... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-exit.bash | A bash command demonstrating how to use the prisma migrate diff command with the --exit-code flag to compare a datasource configuration against a schema file. | Exact payloads, commands, or snippets shown in A bash command demonstrating how to use the prisma migrate diff command with the --exit-code flag to compare a dataso... |
examples/prisma-diff-docs-cli-migrate-prisma-migrate-diff-exit-2.bash | A bash command demonstrating the use of the prisma migrate diff command with the --exit-code flag and datasource configuration. | Exact payloads, commands, or snippets shown in A bash command demonstrating the use of the prisma migrate diff command with the --exit-code flag and datasource conf... |
What This Skill Covers
- The prisma migrate diff command compares two database schema sources and outputs a description of the migration needed to transform the first into the second.
- Main sections:
npm,pnpm,yarn,bun,npm.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://www.prisma.io/docs/cli/migrate/diff