The build broke the moment the migration hit production. The culprit: a new column that didn’t behave the way you expected.
Adding a new column to a database table seems simple. It rarely is. A ALTER TABLE ... ADD COLUMN can lock rows, block writes, and create shadow downtime. Schema changes at scale require precision.
Start by deciding what the new column must store and how it interacts with existing data. Define nullability, default values, indexing needs, and type constraints. An ill-defined column type can cascade into application bugs and storage bloat.
When adding a new column in PostgreSQL, think about impact. Adding a column with a non-null default on a large table will rewrite every row, locking the table. Instead, add it as nullable with no default, then backfill in small batches. In MySQL, behavior differs by engine—InnoDB handles some adds instantly, others with a full table copy.