'How To Manually Rollback A Migration in MySQL?
Looks like my ORM, Prisma, does not allow for rolling back a migration. How have folks using Prisma rolled back a migration? Is there a way to manually rollback a migration with MySQL commands?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nurul Sundarani |
