Adding a new column is simple in idea but hard in truth. Done wrong, it locks tables, blocks queries, and burns deploy windows. Done right, it slides into production with zero downtime and no lost data.
A new column changes the schema. In PostgreSQL or MySQL, the ALTER TABLE command defines it. You choose the name, type, and default. The details matter. Adding columns with non-null defaults to large tables can rewrite every row, which stalls performance. To avoid this, create the column as nullable first, backfill data in batches, then enforce constraints later.
If the system is live under heavy load, use online schema change tools. In MySQL, pt-online-schema-change or native ALGORITHM=INPLACE can help. In PostgreSQL, many column adds are instant, but default values may still trigger table rewrites. Plan around it.