3 ms·
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
by globular-toast 2y ago
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 https://rtpg.co/2021/06/07/changes-checklist.html
- neerajdotname2 2y agoWe recently wrote about how we decided to handle deleting tables etc. https://bigbinary.com/blog/rails-8-deleting-tables-columns-using-rubocop https://bigbinary.com/blog/rails-8-deleting-tables-columns-u...