Hacker News new | past | comments | ask | show | jobs | submit login

There's a little bit more to it. Firstly you can deploy the migration first as long as it's forwards compatible (ie. old code can read from it). That migration needs to be zero downtime; it can't, for example, rewrite whole tables or otherwise lock them, or requests will time out. Doing a whole new schema is one way to do it, but not always necessary. In any case you probably then need a backfill job to fill up the new schema with data before possibly removing the old one.

There's a good post about it here: https://rtpg.co/2021/06/07/changes-checklist.html




We recently wrote about how we decided to handle deleting tables etc. https://bigbinary.com/blog/rails-8-deleting-tables-columns-u...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: