Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/prisma-diff-docs-cli-migrate-workflow-guide.mdDocumentation 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.bashA 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.prismaA 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.typescriptA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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.bashA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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