Hacker News new | ask | show | jobs
by andreimackenzie 2935 days ago
It can help to establish rules such as "new DB migrations must always be compatible with old code" aka "migrations first". This gets everyone into the mindset that a db+code change must be carefully staged in a way that both (new DB, old code) and not just (new DB, new code) are tested. If the migration goes wrong due to different data in prod, it's easier to roll that back before new code is deployed.
1 comments

Anything faster than what you’re suggesting here is trying to rush the process.

Create the data before it’s needed, clean up old records, verify the quality, make it required. And only then do you use it.