3 ms·
> How about a facility to roll back a migration (doesn't seem like it?) Ack, I assumed it was building the rollback based on an understanding of what was appli
by asdkhadsj 7y ago
> How about a facility to roll back a migration (doesn't seem like it?)
Ack, I assumed it was building the rollback based on an understanding of what was applied. If it can't rollback (unconfirmed yet), that is a problem. Bummer
- vmind 7y agoPersonally, beyond development, I haven't found rollback migrations particularly useful. Once you've run migrations on a live database, it's often much simpler operationally to treat any rollback as a new migration, to keep things append-only. From that perspective, while rollbacks are nice, the technical investment needed to auto-generate sound rollbacks for all DDL operations is probably vastly outsized compared to the benefit, so I can see why it wouldn't be a high priority, especially if targeting multiple databases. If you're writing things by hand, there's not a whole lot of difference between the two.
- asdkhadsj 7y agoThat's fair. It never occurred to me honestly, but it's reasonable - especially since I don't think humans can reliably make `down.sql`
- shantly 7y agoThose down files probably rarely receive as much implicit or explicit testing as the up files, too. I sure wouldn't trust them, in most cases.
- jxs 7y agoHi! to roll back a migration you have to build a new one which undo's what you want to rollback. Refinery is very inspired on flyway, which only recently started offering undo migrations, but still explains why that is problematic in it's/our vision: https://flywaydb.org/documentation/command/undo#important-notes https://flywaydb.org/documentation/command/undo#important-no...