Vanessa Kroeker
07/13/2022, 6:50 PMnpx prisma migrate resolve --rolled-back 20220713234002_some_migration
step. When I try to use this to record that the migration has been rolled back, I get the error
Error: P3012
Migration `20220713234002_some_migration` cannot be rolled back because it is not in a failed state.
Currently running Prisma v3.15.2.Alex Ruheni
Alex Ruheni
migrate dev
This is because your Prisma schema, migration history (/prisma/migrations
folder), and migrations table in the database (_prisma_migrations
) are one step ahead of the database schema.Alex Ruheni
migrate resolve --rolled-back
command works with failed migrations. In this case, there isn’t a migration failure.
Thanks for bringing this up; we’ll update the docs to clarify what migrate resolve --rolled-back
does and the Down Migrations guide. 🙂Vanessa Kroeker
07/18/2022, 7:55 PM