Re:Prisma – ORM for Node.js and TypeScript
by abaldwin99 on Wednesday April 21, 2021 @12:19PM
(#26891672)
So future features notwithstanding, is the typical Prisma workflow that if a migration failed during a production deploy the developer would have to manually work out how to fix it while the application is down?
[ Parent
| on HN ]
Re:Prisma – ORM for Node.js and TypeScript
by tomhoule on Wednesday April 21, 2021 @12:39PM
(#26891955)
As of now there is no strong opinionation in the tool — you could absolutely maintain a set of down migrations to recover from bad deployments next to your regular migrations, and apply the relevant one (manually, admittedly) in case of problem.
Re:Prisma – ORM for Node.js and TypeScript
by tor291674 on Friday April 23, 2021 @11:52AM
(#26916005)
Take a backup before you do any prod migrations.
Re:Prisma – ORM for Node.js and TypeScript
by abaldwin99 on Monday May 03, 2021 @05:23PM
(#27030855)
Sure we do that before every release as well. But a rollback is a much less invasive surgical fix compared to a full database restore. You're down while the new db instance spins up and any writes in the meantime will be lost.
You can also test migrations against a restored prod database snapshot but again there's no guarantee some incompatible data hasn't been inserted in the meantime.