How To Manually Rollback A Migration in MySQL?

Viewed 1452
1 Answers

Prisma has added two commands since version 3.9.0 which allows you to rollback your migration.

Combining npx prisma migrate diff and npx prisma db execute would allow you to rollback.

Here's the reference to official documentation which goes through the workflow: Moving backwards and reverting all changes.

Please note the commands are still in preview so you would need to add --preview-feature flag while executing the commands.

Related