Adding a new column to a table sounds simple. It is not. Schema changes can break production if handled without precision. A single ALTER TABLE can lock rows, block writes, or trigger a full table rewrite depending on the database engine. Downtime is the cost of ignoring how your system handles a column change.
In PostgreSQL, adding a new column with a default value is not the same as adding one without it. With a default, the database may rewrite the entire table. That can mean millions of rows and minutes—or hours—of blocked transactions. Without a default, the column is added instantly, and you can backfill in controlled batches. MySQL, MariaDB, and SQLite follow their own rules. Always check the version-specific documentation before executing in production.
When planning a new column migration, start in staging. Measure the lock time. Verify your indexes. Look for dependent views, triggers, and stored procedures. Even in systems with online schema change tools, like pt-online-schema-change or gh-ost, you must test on production-like data. Automation can mask a problem until too late.