Signs it is time to revisit database migrations
It is rarely the thing that gets a project approved, and often the thing that decides how it goes. A few signals that database migrations is due some attention.
Most development decisions are really maintenance decisions wearing a different hat. If it only works because one person remembers to do something, it does not work yet.
The signals
- Nobody can say when it was last reviewed
- The answer depends on who you ask
- Migrations should be reversible or provably safe
- Test them against a copy of real data volumes
The practical version
Backwards-compatible changes let you deploy without downtime. There is a version of this that is over-engineered, and it is worth avoiding. Write the reasoning down alongside the decision, because the reasoning is what changes first.
The short version
The question is rarely whether something can be built, but what it costs to keep running afterwards. Three things worth confirming about database migrations before you move on:
- Someone can say what the current setup is without going to look
- Migrations should be reversible or provably safe — and you know whether that is true here
- There is a way to tell whether the last change to this helped
The point is not perfection, it is knowing which of these you have consciously chosen to skip.