Adding a new column to a production database sounds simple. It rarely is. The operation touches code, data, queries, and performance. Done wrong, it locks tables, causes downtime, or ships half-baked data to users. Done right, it extends your product without risk.
Before adding a new column, know why it exists. Define its type, nullability, and default values. Decide if it belongs in the same table or if it’s better normalized. Map every place in application code that queries the table. Check stored procedures, indexes, and ORM models.
On large datasets, a blocking ALTER TABLE can stall writes and reads. Use online schema change tools or versioned migrations to avoid locking. Introduce the column without constraints first, backfill in small batches, then add indexes or foreign keys once data is consistent. Monitor replication lag if you depend on read replicas.