prisma-cli-migrate-statuspor prisma
prisma migrate status
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-cli-migrate-statusprisma migrate status
Checks the status of your database migrations.
Command
prisma migrate status [options]
What It Does
- Connects to the database
- Checks the
_prisma_migrationstable - Compares applied migrations with local migration files
- Reports:
- Status: Database is up-to-date or behind
- Unapplied migrations: Count of pending migrations
- Missing migrations: Migrations present in DB but missing locally
- Failed migrations: Any migrations that failed to apply
Options
| Option | Description |
|---|---|
--schema | Path to schema file |
--config | Custom path to your Prisma config file |
Examples
Check status
prisma migrate status
Output example (Up to date):
Database schema is up to date!
Output example (Pending):
Following migration have not yet been applied:
20240115120000_add_user
To apply migrations in development, run:
prisma migrate dev
To apply migrations in production, run:
prisma migrate deploy
When to Use
- Debugging: Why is
migrate devcomplaining about drift? - CI/CD: Verify database state before deploying
- Production: Check if migrations are needed (
migrate deploy) or if a deployment failed
Exit Codes
0: Success (may have pending migrations, but command ran successfully)1: Error
To check for pending migrations programmatically, you might need to parse the output or use migrate diff with exit code flags.
Más skills de prisma
prisma-cli-studio
by prisma
prisma studio. Reference when using this Prisma feature.
prisma-cli-validate
by prisma
prisma validate. Reference when using this Prisma feature.
prisma-cli-db-execute
by prisma
prisma db execute. Reference when using this Prisma feature.
prisma-cli-db-pull
by prisma
prisma-cli-db-pull — an installable skill for AI agents, published by prisma/cursor-plugin.
prisma-cli-db-push
by prisma
prisma db push. Reference when using this Prisma feature.
prisma-cli-db-seed
by prisma
prisma db seed. Reference when using this Prisma feature.
prisma-cli-debug
by prisma
prisma debug. Reference when using this Prisma feature.
prisma-cli-dev
by prisma
prisma dev. Reference when using this Prisma feature.