All posts
    Software

    The Database Migration You Keep Postponing Only Gets Harder

    Every growing app has one schema change everyone is afraid to touch. Waiting does not make it safer, it just raises the price of doing it later.

    Every codebase that has been alive for more than a year has one. A table that was designed in a rush, a column that means three different things depending on who reads it, an ID type that was fine at ten thousand rows and is now a liability at ten million. Everyone on the team knows it needs to change. Nobody has scheduled the ticket.

    The math only moves in one direction

    A migration gets harder to run the longer you wait, and it does so for reasons that have nothing to do with skill. More rows mean the migration itself takes longer and locks tables longer. More features mean more code paths read that column, so more things can break in ways you did not predict. More integrations mean more external systems that assumed the old shape would never change. The version of this migration you could have shipped in an afternoon last year is, this year, a project that needs a rollback plan and a maintenance window.

    Teams tell themselves they are waiting for a quiet week. There is no quiet week. There is only a system that keeps growing on top of a foundation nobody wants to touch, until something forces the issue: a query that finally times out, a bug that only shows up at scale, a new feature that simply cannot be built on the current schema.

    What actually makes a migration safe

    The teams that pull these off without an incident tend to do the same few things:

    • Ship the schema change and the code change separately, with the new column or table dual-written alongside the old one for a while.
    • Backfill in batches, off peak hours, with a script you can pause and resume.
    • Put the cutover behind a flag so you can read from the new shape for a slice of traffic before you commit fully.
    • Take a real backup and, more importantly, confirm you can restore it before you start.

    None of this is exotic. It is just discipline that is easy to skip when the migration has already been delayed six months and everyone wants it done by Friday.

    Somebody has to actually do it

    The honest reason these migrations sit untouched is rarely technical. It is that nobody wants to own the risk on top of their regular roadmap, so it keeps losing to whatever ships this sprint. That is exactly the kind of work we take on at Cedrix: the unglamorous, high stakes change that a small team is happy to have handled by people who have done it before, so it does not eat a month of your own engineers' time.

    If you are early enough that this is still a design decision rather than a cleanup job, our free MVP build is a good way to get the schema right before bad habits calcify into it. And if you already know which table you are afraid of, get in touch and let's talk about what moving it safely actually looks like.

    Want to build something like this?

    Cedrix ships production-grade software fast — and even offers a free7-day MVP so you can see your idea working before you commit.