The new column had to go in before the build hit production, or the next deploy would fail.
Adding a new column sounds simple. It isn’t. In production systems, every schema change carries risk—data loss, inconsistent reads, downtime. The challenge is making that change without breaking the services that depend on it.
The process starts with clarity: define the column’s name, type, and constraints. Know why it exists—whether it is for new features, tracking metrics, or supporting integrations. Then plan the migration path. In relational databases, use an additive approach: create the column first, keep existing code untouched, and populate the data in a background job. Only once the column is populated should services start reading from it.
Zero-downtime migrations require tight sequencing. If you run ALTER TABLE on large datasets without care, locks can stall requests. Break the change into safe steps. For example: