Adding a new column to a production database sounds simple. It is not. Downtime risk, locking behavior, and replication lag can turn a quick ALTER TABLE into a fire drill. The right approach depends on table size, read/write patterns, and database engine.
In PostgreSQL, adding a nullable column with no default is instant. Add a default, and the database rewrites the table, blocking writes. In MySQL, especially older versions without instant DDL, even a basic new column can lock the table and stall traffic. For large datasets, tools like gh-ost or pt-online-schema-change allow new column creation without blocking. In cloud-managed services, you may have access to instant schema changes, but you still need to test timing and replication effects.
Plan for backward compatibility. Ship code that can handle both the old schema and the new column. Deploy the column, backfill if needed, then switch application logic. Avoid breaking queries that read from replicas mid-migration.