Adding a new column is simple until it isn’t. Speed, consistency, and zero downtime matter. One wrong migration script can lock tables, kill queries, or even freeze production. In modern systems, every schema change is a deployment event, not a side task.
First, design the column. Define the correct datatype. Keep nullability explicit. Make defaults deterministic. Think about indexing, but don’t create indexes blindly — measure the cost. A new column in a large table affects storage, cache, and I/O patterns.
Second, plan the migration. In transactional databases, use ALTER TABLE with minimal locking options or leverage phased rollouts. In distributed systems, apply additive changes before destructive ones. Always control versioning in migrations. Write SQL that can run in parallel with live reads and writes.