The Myth of Down Migrations; Introducing Atlas Migrate Down
· 16 min read
TL;DR
Ever since my first job as a junior engineer, the seniors on my team told me that whenever I make a schema change I must write the corresponding "down migration", so it can be reverted at a later time if needed. But what if that advice, while well-intentioned, deserves a second look?
Today, I want to argue that contrary to popular belief, down migration files are actually a bad idea and should be actively avoided.
In the final section, I'll introduce an alternative that may sound completely contradictory: the new migrate down
command. I will explain the
thought process behind its creation and show examples of how to use it.