From Peter Johnston on the Retool blog:
A few weeks ago, I unintentionally took Retool down for 2 minutes when an out-of-control database migration tried to rewrite a mission critical data table. As my teammate and I cleaned up the mess—caused by incorrectly using transactions in the migration—I reflected on my last few years working with Postgres (officially PostgreSQL) and the different lessons I’ve learned when it comes to writing a safe database migration.
Database migrations aren’t easy; a migration that runs totally fine on your laptop may cause problems in production due to increased data and traffic volumes. And every time your app goes down, so does customer trust and revenue.
Over the last 3 years, our team at Retool has navigated a few pitfalls and fixed major issues related to migrations in Postgres. This post will highlight key lessons learned and what you can do to avoid making the same mistakes.
Try Retool’s FREE tier ~> retool.com/changelog