Zero-downtime database migrations

Renaming a column on a busy table used to mean a maintenance window. The expand and contract pattern removed that.

Part 1: Reading the plan

For staging and small sites we use SQLite. One file is easy to copy, easy to reset, and fast enough for everything we have thrown at it.

5 comments on “Zero-downtime database migrations”

    1. Elin Sørensen

      Good question. It took about three weeks, most of it waiting for review and measuring the results.

  1. Luis Ortega

    Bookmarked. The part about writing things down before changing anything is underrated.

  2. Clara Lindqvist

    This matches our experience almost exactly, down to the part where the slow tail took longest to fix.

Leave a comment

Your email address will not be published. Required fields are marked *