Adding a new column sounds simple. It isn’t when the database is under load and your service has zero tolerance for downtime. A poorly planned schema change can lock tables, block writes, and trigger cascading failures. Success comes down to the right commands, the right order, and the right safety checks.
Start by identifying if the new column can be nullable or must have a default value. On PostgreSQL, adding a nullable column is fast because it only updates metadata. Adding a column with a default forces a rewrite, which can freeze large tables. Use ALTER TABLE ... ADD COLUMN for the simplest case, and prefer adding defaults in a separate statement with UPDATE to avoid long locks.
If you are on MySQL, remember that the storage engine matters. InnoDB can handle many ALTER operations online, but not all. Check ALGORITHM=INPLACE or ALGORITHM=INSTANT options to minimize locking. Validate disk space before running the migration.