Adding a new column to a production database is never just another line in a migration file. It changes data shape, query performance, and application behavior. Done wrong, it introduces downtime, locks tables, or silently corrupts workloads. Done right, it expands capability without a single dropped request.
The safe path starts before the migration script runs. Define the column precisely: data type, nullability, default value, constraints. If it needs backfilled data, plan how to populate it in small, safe batches, not in one blocking transaction. Avoid adding indexes at the same moment you create the new column; do it in a separate, non-locking step if your database supports it.
In Postgres, ALTER TABLE ADD COLUMN is fast for most data types, but adding a NOT NULL column without a default will lock writes. In MySQL, adding a column to large tables can trigger a full table copy. Measure, test, and understand exactly what your engine will do.