mcpbeat Sign in

Prisma CLI Migrate Resolve Skill for Cursor

prisma migrate resolve

478 tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
8
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/prisma/cursor-plugin --skill prisma-cli-migrate-resolve

What comes with it

106 bytes besides the instruction
metadata.json

The instruction itself

9 sections, as written by the author

prisma migrate resolve

Resolves issues with database migrations, such as failed migrations or baselining.

Command

prisma migrate resolve [options]

What It Does

Updates the _prisma_migrations table to manually change the state of a migration. This is a recovery tool.

Options

You must provide exactly one of --applied or --rolled-back.

| Option | Description |

|--------|-------------|

| --applied <name> | Mark a migration as applied (success) |

| --rolled-back <name> | Mark a migration as rolled back (ignored/failed) |

| --schema | Path to schema file |

| --config | Custom path to your Prisma config file |

Examples

Mark as Applied (Baselining)

If you have existing tables and want to initialize migrations without running the SQL:

prisma migrate resolve --applied 20240101000000_initial_migration

This tells Prisma "Assume this migration has already run".

Mark as Rolled Back (Fixing Failures)

If a migration failed (e.g., syntax error) and you fixed the SQL or want to retry:

prisma migrate resolve --rolled-back 20240115120000_failed_migration

This tells Prisma "Forget this migration run, let me try applying it again".

Use Cases

  • Baselining: Adopting Prisma Migrate on an existing production database.
  • Failed Migrations: Recovering from a failed migrate deploy in production.
  • Hotfixes: reconciling manual database changes (rare).

References

How to use it

Copy the folder

Take prisma/prisma-cli-migrate-resolve from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.