Tutorial
Clean Code Python: Multi-Tenant Migrations Without Downtime
A naive ALTER TABLE on a 100M-row table locks it for minutes. Multi-tenant makes it worse: one failed migration across 200 schemas leaves tenants on inconsistent versions. Here is the expand-contract pattern and the tooling to migrate safely.
14 min read