Zero-Downtime Database Migrations: The Expand and Contract Pattern
How to change a live schema without an outage: expand, backfill in batches, switch reads and writes, then contract. With safe NOT NULL, renames and lock timeouts.
Migrations in pipelines, testing them in Docker, zero-downtime changes and documentation that updates itself.
How to change a live schema without an outage: expand, backfill in batches, switch reads and writes, then contract. With safe NOT NULL, renames and lock timeouts.
Run migrations against a throw-away real database on every change: a Testcontainers and Flyway example, CI service containers, version matrices and schema checks.
What schema drift is, how it creeps in through hotfixes and unsynced environments, the tools that detect it and the workflow that stops it coming back.
What to document about a database, where it should live, how to generate the parts that rot, and how to keep schema docs honest through code review and CI.
Turn the schema diagram into a build artifact: regenerate it from the migrations on every change, commit it through a pull request and review the diff.
One HTTP call with your migration files, one poll, one SVG. Free while we build it.