Skip to content

The Myth of Down Migrations

atlasgo.io
5 pointsCoffeeOnWrite2 comments
On HN

Comments

My "down" migrations get exercised when I need to switch feature-branches in local development.

I'm OK with the idea that they almost certainly won't be needed after the feature has been in production for X months, but there are still short-term benefits, such as being a kind of executable code-documentation for when DevOps finds out something goes Horribly Wrong with this week's release, and you're trying to hit "undo" within a relatively short time period.

On longer time frames, you'll probably make a new differently-forward migration script, but the old one can still be very handy to have as a reference.

Exactly. Down migrations aren’t for production. Production is forward-only.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.