A new column can be simple in code but disruptive in production. It changes schemas, API contracts, and the shape of data flowing through every layer. In relational databases like PostgreSQL or MySQL, the syntax is trivial:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This command looks harmless, yet it can lock large tables or trigger replication lag. On systems with millions of rows, adding a new column can stall writes, cause timeouts, or force a deploy rollback.
Before adding the column, confirm if it needs a default value. Setting a default on a large table will backfill every row, often blocking queries. For zero-downtime deployments, add the column without defaults, then update rows in small batches.
For systems with strict SLAs, measure the migration in staging with realistic data volumes. Use tools like pg_stat_activity to watch for locks during the change. When possible, add nullable columns first, then enforce NOT NULL constraints in later steps once the data is ready.