Problems when deploying after a failed migration
I ran the test with the following example
1. assuming I have raw data, I created a field called test String and ran
prisma migrate dev --name test --create-only
.
2. when I ignored the warning and ran prisma migrate dev
, a migration error occurred and a failed record was created in _prisma_migrations.
3. followed the official guide and ran deploy after rollback https://www.prisma.io/docs/orm/prisma-migrate/workflows/patching-and-hotfixing#option-1-mark-the-migration-as-rolled-back-and-re-deploy
4. reflected as normal
5. if you are working on additional migrations, we recommend a data wipe due to the following issue
(The migration 20240626014409_test
was modified after it was applied)
Why?Patching & hotfixing | Prisma Documentation
How to reconcile the migration history after applying a hotfix or patch to a production environment.
0 Replies