Adding a new column is one of the most common schema changes in any relational database. It seems simple. It can also be dangerous. Done wrong, it stalls deployments, blocks writes, and burns through CPU. Done right, it’s invisible and safe.
The key is planning. First, choose the column name and type. Keep it consistent with naming conventions. Avoid reserved words. For large datasets, adding a new column with a default value can cause a full table rewrite. That means downtime in production. Break the change into steps: create the new column without a default, backfill rows in small batches, then apply the default and constraints in a separate migration.
On PostgreSQL, ALTER TABLE ... ADD COLUMN is fast if you don’t set a non-null default. On MySQL with InnoDB, adding a column may require a table copy, depending on the version. Test the migration on production-size data before release.