Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
prisma avatar

Prisma Cli Migrate Diff

  • 13 installs
  • 8 repo stars
  • Updated February 9, 2026
  • prisma/cursor-plugin

prisma-cli-migrate-diff compares database sources and outputs SQL diffs.

About

The prisma-cli-migrate-diff skill explains prisma migrate diff comparing --from and --to sources including empty, schema files, migrations directories, URLs, or config datasource. Default output is human-readable summary while --script prints SQL and --exit-code returns 2 when drift exists for CI gates. Examples generate prod-to-schema SQL, review pending migrations against live DB, baseline empty-to-schema init migrations, and debug what migrate dev would apply. Pairs with db execute --stdin to apply generated scripts when appropriate. Compares schema, migrations, URL, or config datasource pairs. --script outputs executable SQL diffs. --exit-code supports CI drift detection. Baselines existing databases to initial migrations. Debug tool for migrate dev expectations. SQL script or summary showing schema differences. User runs migrate diff for baselines, drift checks, or SQL export. DBAs generating forward SQL or detecting drift in CI.

  • Compares schema, migrations, URL, or config datasource pairs.
  • --script outputs executable SQL diffs.
  • --exit-code supports CI drift detection.
  • Baselines existing databases to initial migrations.
  • Debug tool for migrate dev expectations.

Prisma Cli Migrate Diff by the numbers

  • 13 all-time installs (skills.sh)
  • Ranked #627 of 911 Databases skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

prisma-cli-migrate-diff capabilities & compatibility

Capabilities
source from and to options table · use cases forward generating and drift
Use cases
database · devops
From the docs

What prisma-cli-migrate-diff says it does

Compares two sources
SKILL.md
--exit-code
SKILL.md
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-cli-migrate-diff

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs13
repo stars8
Last updatedFebruary 9, 2026
Repositoryprisma/cursor-plugin

How do I diff Prisma schema against production?

Compare Prisma schema, migrations, or database URLs and emit human summaries or SQL scripts.

Who is it for?

DBAs generating forward SQL or detecting drift in CI.

Skip if: Skip when migrate dev already applied changes locally.

When should I use this skill?

User runs migrate diff for baselines, drift checks, or SQL export.

What you get

SQL script or summary showing schema differences.

Files

SKILL.mdMarkdownGitHub ↗

prisma migrate diff

Compares database schemas and generates diffs (SQL or summary).

Command

prisma migrate diff [options]

What It Does

  • Compares two sources (--from-... and --to-...)
  • Sources can be:
  • Empty (empty)
  • Schema file (schema)
  • Migrations directory (migrations)
  • Database URL (url) or Configured Datasource (config-datasource)
  • Outputs the difference:
  • Human-readable summary (default)
  • SQL script (--script)

Options

OptionDescription
--scriptRender SQL script to stdout
--exit-codeExit 2 if changes detected, 0 if empty, 1 if error
--configCustom path to your Prisma config file

Sources (Must provide one from and one to)

  • --from-empty, --to-empty
  • --from-schema <path>, --to-schema <path>
  • --from-migrations <path>, --to-migrations <path>
  • --from-url <url>, --to-url <url>
  • --from-config-datasource, --to-config-datasource (uses prisma.config.ts)

Examples

Generate SQL for a schema change

Compare current production DB to your local schema:

prisma migrate diff \
  --from-url "$PROD_DB_URL" \
  --to-schema ./prisma/schema.prisma \
  --script

Review pending migrations

Compare database state to migrations directory:

prisma migrate diff \
  --from-config-datasource \
  --to-migrations ./prisma/migrations

Create baseline migration

Compare empty state to current schema:

prisma migrate diff \
  --from-empty \
  --to-schema ./prisma/schema.prisma \
  --script > prisma/migrations/0_init/migration.sql

Check for drift (CI)

Check if database matches schema:

prisma migrate diff \
  --from-config-datasource \
  --to-schema ./prisma/schema.prisma \
  --exit-code

Use Cases

  • Forward-generating migrations: Creating SQL without migrate dev.
  • Drift detection: Checking if DB is in sync.
  • Baselining: Creating initial migration from existing DB.
  • Debugging: Understanding what migrate dev would do.

Related skills

FAQ

What does prisma-cli-migrate-diff do?

prisma-cli-migrate-diff compares database sources and outputs SQL diffs.

When should I use prisma-cli-migrate-diff?

User runs migrate diff for baselines, drift checks, or SQL export.

Is this skill safe to install?

Review the Security Audits panel on this page before installing in production.

Databasesdatabases

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.