managing-dev-migrations
Installation
SKILL.md
Decision Tree
Use prisma migrate dev when: Building production-ready features; working on teams with shared schema changes; needing migration history for rollbacks; version controlling schema changes; deploying to staging/production.
Use prisma db push when: Rapid prototyping and experimentation; early-stage development with frequent schema changes; personal projects without deployment concerns; testing schema ideas quickly; no migration history needed.
migrate dev Workflow
npx prisma migrate dev --name add_user_profile
Detects schema changes in schema.prisma, generates SQL migration, applies to database, regenerates Prisma Client.
Review generated SQL before applying with --create-only:
npx prisma migrate dev --create-only --name add_indexes