Adding a new column seems simple. It can be. But in production systems with high traffic, large tables, and strict uptime requirements, the wrong approach will lock rows, blow up queries, or trigger outages. The safest path depends on database type, table size, and access patterns.
In PostgreSQL, adding a nullable column with no default is instant. But adding a default value rewrites the entire table. Use ALTER TABLE ... ADD COLUMN with NULL first, then backfill in batches. After that, set the default and NOT NULL constraints.
In MySQL, ALTER TABLE usually copies the table. For InnoDB on MySQL 8.0+, ALGORITHM=INSTANT can add certain columns without copying, but not if a default forces a table rebuild. Watch out for large indexes and old MySQL versions. Online schema change tools like pt-online-schema-change or gh-ost can help avoid downtime.
For distributed databases, a new column may mean rolling out schema changes across shards or replicas. Propagate changes carefully. Use feature flags to avoid application errors when part of the cluster is still on the old schema.