Dabish Digital
Development

Why database migrations matters more than it looks

It comes up on almost every project, usually later than it should. Database migrations is easy to treat as a detail, and that is exactly why it is worth a few minutes of attention.

Code gets read far more often than it gets written, and usually by someone with less context than the author had. The failure mode is not doing it wrong, it is doing it once and assuming it stays done.

Why this earns attention

Migrations should be reversible or provably safe. The teams that handle this well are rarely the ones with the biggest budgets. It is the sort of thing that looks like polish right up until it costs you an enquiry.

Test them against a copy of real data volumes. It is worth being explicit about, because assumptions differ quietly. Doing this properly once is usually cheaper than doing it approximately three times.

Where it usually goes wrong

Backwards-compatible changes let you deploy without downtime. Small and consistent beats large and occasional here. It rarely shows up as a line item, which is exactly why it slips.

How to tell if yours is fine

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
  • Backwards-compatible changes let you deploy without downtime — 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.