Dori Media

Engineering note

Schema-safe migrations

How to change production schemas without blocking writes.

Migrations Postgres Laravel Postgres
About 4 min read Published 1 November 2025

Founder, Dori Media · Christchurch · Laravel & Stripe since 2011

On this page

The idea

Treat schema changes as production deployments. Design for zero downtime and reversible steps.

The approach

  • Add columns as nullable first
  • Backfill in batches
  • Switch reads, then writes
  • Remove old columns after traffic settles

Guardrails

Track migration time, lock time, and rollbacks like you track deploys.

This note sits under Web apps & platforms. See also all journal writing.

Building something similar?

Want to talk it through?

Booking systems, internal tools, multi-tenant platforms. I build and run them from Christchurch, and I will tell you honestly if you should stay on what you have got.