3 ms·
> what ActiveRecord migration rollbacks are for Whatever their intended purpose (by the developers, I assume), that has no bearing on how they're actually used
by mmt 8y ago
> what ActiveRecord migration rollbacks are for
Whatever their intended purpose (by the developers, I assume), that has no bearing on how they're actually used.
> Nobody is 'blowing away' customer data.
That's a remarkable claim. Although it wasn't ActiveRecord specifically, I've seen this happen with a similar migration/rollback mechanism. Granted, it was only a few hours of customer data, and it would not have existed in the first place were it not for the initial upgrade/migration (subsequently rolled back), but the data was accepted and subsequently lost. Good thing there weren't any SLAs (yet).
> 2. During deployment. It gives you a sane way to rollback a botched deployed.
Even this use case can fall into the data loss trap in my example above. What if nobody realizes the deployment was botched until hours later?