Adding a new column to a database should be simple. In production, it can be dangerous. A careless ALTER TABLE can lock writes, inflate downtime, or break dependent queries. The right approach depends on your database engine, schema size, and performance budget.
For PostgreSQL, ALTER TABLE ADD COLUMN is usually safe if you add the column without a default value. Adding DEFAULT and NOT NULL together forces a table rewrite, which can take minutes or hours on large datasets. Instead, add the column as nullable, backfill it in batches, then add constraints when ready.
In MySQL, adding a column can trigger a full table copy unless you use an online DDL method. Check your MySQL version and storage engine; InnoDB supports ALGORITHM=INPLACE for many operations, but not all. Large tables require testing to see how long the schema change will take under your workload.