The database was breaking. Queries slowed. Reports piled up. You needed a new column, and you needed it now.
Adding a new column sounds simple. In practice, it can stall deployments, lock tables, or break production code. The right approach depends on your database engine, your schema migration strategy, and how much downtime you can risk.
First, define the column precisely. Set the data type, nullability, and default value. Avoid implicit conversions; they add hidden costs. Decide if it should be indexed at creation or later.
Second, choose the migration method. On small tables, an ALTER TABLE with the new column is often safe. On large, high-write tables, use an online migration tool or a phased rollout. Add the column without defaults, backfill in batches, then enforce constraints. Monitor the database for locks, replication lag, or performance drops during the process.