Adding a new column is a small change with big consequences. In relational databases, it can alter storage patterns, indexing performance, and replication speeds. In distributed systems, it can break services that assume a fixed schema. The key is to make the change without downtime, without corrupting data, and without blocking writes.
The safest method is additive and backward-compatible. First, add the new column as nullable or with a default. Apply the change in a migration that only updates the schema, not the data. Once deployed, backfill the new column incrementally, in small batches, with careful monitoring. When all rows are populated, you can enforce constraints, update indexes, and connect dependent code paths.
On large datasets, online schema change tools can save hours. Methods like ALTER TABLE ... ADD COLUMN with LOCK=NONE, or tools like gh-ost and pt-online-schema-change, prevent long table locks. For hot production systems, run schema changes in non-peak hours, or segment them by shard or partition.