Prisma migrate
Safely create and apply a Prisma schema migration, guarding against running against a non-local database. Use when changing prisma/schema.prisma or adding/altering database tables, columns, indexes, or relations.From its SKILL.md
npx -y skills add K95M65/AI_ONBOARD --skill prisma-migrateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.3 KB, 251 tokens by cl100k_base, as published. Nobody here has run it
Prisma migrate
When to use
Any change to schema.prisma — a new model, field, index, or relation. Never edit the database by hand and
never hand-write migration SQL.
Steps
- Edit
schema.prisma. - Create the migration:
bash scripts/new-migration.sh <migration-name>- Generates the SQL and applies it to your local dev database via
prisma migrate dev. - Refuses to run if
DATABASE_URLlooks non-local (staging/prod) unless you pass--force.
- Generates the SQL and applies it to your local dev database via
- Review the generated SQL under
prisma/migrations/<timestamp>_<name>/before committing. - Commit
schema.prismaand the new migration folder together.
Safety
- The local-only guard is a safety net, not a substitute for judgment: migrating a shared or production database still requires explicit human confirmation.
- Never delete or edit an already-applied migration — create a new one that carries the correction.
- If
migrate devreports drift or wants to reset, stop and ask — a reset drops data.
What ships with it: 1 file
1.5 KB alongside SKILL.md, 1 of them executable
scripts/
- new-migration.shruns1.5 KB