Adding a new column to a production database is simple to describe and hard to do right. The schema changes must be atomic, safe under load, and compatible with rolling deployments. If you skip planning, the results can lock tables, drop indexes, or cause silent data corruption.
To add a new column without downtime, first review the database engine’s online DDL capabilities. MySQL with ALTER TABLE ... ALGORITHM=INPLACE can avoid full table copies in many cases. PostgreSQL can add nullable columns instantly, but adding default values to large tables can still lock writes. Always test on a copy of production data.
Consider the impact on code that reads and writes the table. Deploy code that can handle both the pre-change and post-change schema. Use feature flags or conditional logic until rollout is complete. Backfill data in small batches to avoid overwhelming I/O and cache layers.