Adding a new column sounds simple, but in production databases it can trigger downtime, break queries, or corrupt data if done wrong. The right approach depends on schema design, performance constraints, and deployment workflow.
A new column should start with clear definition. Decide the data type, nullability, and default value before touching the database. Avoid implicit defaults that cause full-table rewrites on large datasets. In high-traffic systems, even a single ALTER TABLE can lock millions of rows for seconds or minutes.
Use online schema change tools when possible. MySQL offers ALGORITHM=INPLACE for certain column additions. PostgreSQL can add a nullable column almost instantly, but adding with a default will rewrite every row. For massive tables, add the column without a default, backfill in small batches, then enforce constraints.