Adding a new column is never just about schema. It’s about uptime, data integrity, and the ability to deploy without breaking the world for your users. A poorly planned alter can lock your table, spike load, or cause replication lag. A well-executed one can ship in seconds with zero visible impact.
In relational databases like PostgreSQL or MySQL, ALTER TABLE ... ADD COLUMN is the obvious command. But the real work is choosing defaults, handling nulls, and planning the roll-out. Setting a non-null column with a default forces a table rewrite in many engines. That’s downtime risk. Use nullable first, backfill in controlled batches, then set constraints.
For large datasets, PostgreSQL 11+ supports adding a column with a constant default without rewriting the table. MySQL’s behavior varies by storage engine. Always check the execution plan in staging before running in production.