npx skills add ...
npx skills add prisma/cursor-plugin --skill prisma-cli-migrate-deploy
npx skills add prisma/cursor-plugin --skill prisma-cli-migrate-deploy
prisma migrate deploy
Applies pending migrations in production/staging environments.
prisma/migrations/_prisma_migrations table| Option | Description |
|---|---|
--schema | Custom path to your Prisma schema |
--config | Custom path to your Prisma config file |
| Feature | migrate dev | migrate deploy |
|---|---|---|
| Creates migrations | Yes | No |
| Applies migrations | Yes | Yes |
| Detects drift | Yes | No |
| Prompts for input | Yes | No |
| Uses shadow database | Yes | No |
| Safe for production | No | Yes |
| Resets on issues | Prompts | Fails |
Development: Create migrations locally
Commit: Include migration files in version control
Deploy: Apply in production
If a migration fails, migrate deploy exits with error. The failed migration is marked as failed in _prisma_migrations.
To fix:
prisma migrate resolve --applied <migration_name>prisma migrate deployShows pending and applied migrations before deploying.
Ensure prisma.config.ts has the production database URL:
migrate status before migrate deploy in CImigrate dev in production