Adding a new column to a database seems simple. It rarely is. In production, every schema change carries risk. Locks can block writes. Long-running operations can drain performance. Poor planning can cause outages.
The safest way to add a new column starts with understanding your database engine. In PostgreSQL, ALTER TABLE ADD COLUMN without a default is fast, because it only updates metadata. When you add a default value for existing rows, Postgres rewrites the entire table, which can hold locks for minutes or hours depending on size. In MySQL, adding a column often triggers a full table rebuild unless you use features like ALGORITHM=INPLACE or ALGORITHM=INSTANT in newer versions.
Zero-downtime migrations hinge on two points: keeping operations transactional where possible, and keeping them non-blocking. Add nullable columns first. Populate them in controlled batches. Avoid schema changes that rewrite data inline. Monitor query plans and watch for index rebuilds; adding an indexed column can be far more disruptive than adding a blank one.