Adding a new column sounds trivial, but in production it can be dangerous. Schema changes can lock tables, stall writes, or break downstream jobs. The right approach depends on your database engine, your workload, and your uptime requirements.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast for metadata-only operations when you have a default of NULL. Adding a column with a non-null default will rewrite the entire table. That means a full table lock and high I/O. MySQL behaves differently: adding a new column may require a table copy depending on the storage engine and the MySQL version. Modern releases with ALGORITHM=INPLACE or INSTANT can avoid downtime for certain operations.
For large datasets, run schema migrations in stages. First, add the column as nullable with no default. This avoids an immediate rewrite. Then, backfill data in small batches. Once complete, set defaults or constraints in a separate migration. This staged pattern works well with tools like gh-ost, pt-online-schema-change, or built-in online DDL when supported.