Adding a new column to a database table should be simple. It is not. The wrong SQL, an unnoticed null constraint, or a mismatch in data type can break production. Every schema change has risk, and a new column is often where mistakes hide.
The goal is precision. Choose the correct column name. Match the data type to future usage, not just today’s input. Decide on NULL or NOT NULL before writing the first ALTER TABLE. Add defaults only when they are correct for all current and future rows.
Migrations for a new column must be idempotent. Run them in staging. Run them again. Verify that the schema version matches what the code expects. Never ship a migration without a tested rollback.
On large tables, a new column can lock writes and reads. To avoid downtime in systems under load, use phased deployment: first make the column nullable, backfill it in small batches, then enforce constraints when the data is clean.