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

Prisma Cli Migrate Dev

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

prisma-cli-migrate-dev creates and applies Prisma development migrations.

About

The prisma-cli-migrate-dev skill explains prisma migrate dev for local schema evolution. Steps run pending migrations in a shadow database, apply pending files, generate new SQL from schema diffs, apply to dev DB, and update _prisma_migrations. Options include --name, --create-only for SQL review, schema and config paths, and url overrides. v7 removed --skip-generate and --skip-seed so teams run prisma generate and prisma db seed explicitly afterward. Drift prompts offer database reset when manual edits diverge. Shadow database URL configures via prisma.config.ts shadowDatabaseUrl. Not for production or MongoDB where db push applies. Data loss warnings accept --accept-data-loss when dropping columns. Creates and applies migrations during local development. Uses shadow database for drift detection. --create-only writes SQL without applying. v7 requires explicit generate and seed after migrate dev. Prompts reset when schema drift is detected.

  • Creates and applies migrations during local development.
  • Uses shadow database for drift detection.
  • --create-only writes SQL without applying.
  • v7 requires explicit generate and seed after migrate dev.
  • Prompts reset when schema drift is detected.

Prisma Cli Migrate Dev by the numbers

  • 14 all-time installs (skills.sh)
  • Ranked #604 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-dev capabilities & compatibility

Capabilities
migrate dev step list · v7 explicit generate and seed workflow · shadow database configuration
Use cases
database · devops
From the docs

What prisma-cli-migrate-dev says it does

Creates and applies migrations during development
SKILL.md
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-cli-migrate-dev

Add your badge

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

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

How do I create a Prisma migration in development?

Create and apply development migrations with shadow database drift detection in Prisma v7.

Who is it for?

Developers changing Prisma models during feature work.

Skip if: Skip in production deploy or MongoDB-only workflows.

When should I use this skill?

User runs prisma migrate dev after schema.prisma edits.

What you get

New migration SQL applied to dev database with history tracked.

Files

SKILL.mdMarkdownGitHub ↗

prisma migrate dev

Creates and applies migrations during development. Requires a shadow database.

Command

prisma migrate dev [options]

What It Does

1. Runs existing migrations in shadow database to detect drift 2. Applies any pending migrations 3. Generates new migration from schema changes 4. Applies new migration to development database 5. Updates _prisma_migrations table

Options

OptionDescription
--name / -nName the migration
--create-onlyCreate a new migration but do not apply it
--schemaCustom path to your Prisma schema
--configCustom path to your Prisma config file
--urlOverride the datasource URL from the Prisma config file

Removed in v7

  • --skip-generate - Run prisma generate explicitly
  • --skip-seed - Run prisma db seed explicitly

Examples

Create and apply migration

prisma migrate dev

Prompts for migration name if schema changed.

Named migration

prisma migrate dev --name add_users_table

Create without applying

prisma migrate dev --create-only

Useful for reviewing migration SQL before applying.

Full workflow (v7)

prisma migrate dev --name my_migration
prisma generate  # Must run explicitly in v7
prisma db seed   # Must run explicitly in v7

Migration Files

Created in prisma/migrations/:

prisma/migrations/
├── 20240115120000_add_users_table/
│   └── migration.sql
├── 20240116090000_add_posts/
│   └── migration.sql
└── migration_lock.toml

Schema Drift Detection

If migrate dev detects drift (manual database changes or edited migrations), it prompts to reset:

Drift detected: Your database schema is not in sync.

Do you want to reset your database? All data will be lost.

When to Use

  • Local development
  • Adding new models/fields
  • Changing relations
  • Creating indexes

When NOT to Use

  • Production deployments (use migrate deploy)
  • CI/CD pipelines (use migrate deploy)
  • MongoDB (use db push instead)

Common Patterns

After schema changes

// schema.prisma - Add new field
model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  name      String?
  createdAt DateTime @default(now())  // New field
}
prisma migrate dev --name add_created_at

Handling data loss warnings

When a migration would cause data loss:

prisma migrate dev --name remove_field
# Warning: You are about to delete data...
# Accept with: --accept-data-loss

Shadow Database

migrate dev requires a shadow database for drift detection. Configure in prisma.config.ts:

export default defineConfig({
  datasource: {
    url: env('DATABASE_URL'),
    shadowDatabaseUrl: env('SHADOW_DATABASE_URL'),
  },
})

For local Prisma Postgres (prisma dev), shadow database is handled automatically.

Related skills

FAQ

What does prisma-cli-migrate-dev do?

prisma-cli-migrate-dev creates and applies Prisma development migrations.

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

User runs prisma migrate dev after schema.prisma edits.

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.