Hacker News new | ask | show | jobs
by vmind 2387 days ago
Personally, 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.

1 comments

That's fair. It never occurred to me honestly, but it's reasonable - especially since I don't think humans can reliably make `down.sql`
Those 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.