Adding a new column to a production database is simple in theory and risky in practice. If you block queries or cause downtime, you feel it immediately. The right approach keeps read and write operations smooth while you expand your data model.
The safest method is to add the new column with a default value of NULL first. This makes the schema change instant in most relational databases. Avoid locking the table with non-null constraints or heavy defaults during creation. Apply constraints and indexes in a separate step, once the column exists and data is migrated.
For zero-downtime systems, run backfills in small batches. This prevents transaction logs from exploding and keeps replication healthy. Use feature flags to control access to the new column in application code. Turn it on only when the data is ready.