Hacker News new | ask | show | jobs
by raziel2p 3945 days ago
The only time I've had use for rolling back migrations is when I'm working on a feature/develop branch that have modified existing columns and need to switch back to the master branch to start work on a bug fix.

That could potentially be solved in other ways, though - such as keeping separate databases for different git branches, or making database snapshots. Both of those are manual work, though - apart from the upfront effort it takes to write the "down" migration, rolling back migrations seems like the path with least friction.

Unless you don't need any of the data in your database, or it's easily reproducible (database "seeders"), in which case you can just delete the entire database and start from scratch every time.