The table was failing under its own weight. Queries slowed. Metrics drifted. The schema needed change, and the only clean way forward was a new column.
Adding a new column is simple in theory but punishing in production if you get it wrong. Schema alterations can lock rows, trigger full table rewrites, and break downstream pipelines. The key is to design and execute the change without disrupting service.
First, define exactly what the new column must hold—type, default value, nullability. Ambiguity will cost time and trigger rollbacks. Use explicit data types for predictable sorting and indexing. Avoid implicit type casts, which can cause silent performance hits.
Second, plan the migration path. For small tables, a direct ALTER TABLE ADD COLUMN can be safe. For large or critical datasets, a zero-downtime migration is safer. Create the new column as nullable, then backfill in small batches. Once populated, apply constraints or defaults in a separate step.