apps/docs/content/docs/cli/migrate/resolve.mdx
The prisma migrate resolve command allows you to solve migration history issues in production by marking a failed migration as already applied (supports baselining) or rolled back.
:::warning
This command is not supported on MongoDB. Use db push instead.
:::
prisma migrate resolve [options]
The datasource URL configuration is read from the Prisma config file (e.g., prisma.config.ts).
:::note
This command can only be used with a failed migration. Using it with a successful migration results in an error.
:::
Run prisma migrate status to identify if you need to use resolve.
| Option | Description |
|---|---|
-h, --help | Display help message |
--config | Custom path to your Prisma config file |
--schema | Custom path to your Prisma schema |
--applied | Record a specific migration as applied |
--rolled-back | Record a specific migration as rolled back |
You must specify either --applied or --rolled-back.
npx prisma migrate resolve --applied 20201231000000_add_users_table
npx prisma migrate resolve --rolled-back 20201231000000_add_users_table
npx prisma migrate resolve --rolled-back 20201231000000_add_users_table --schema=./schema.prisma