Adding a new column to a database table is one of the most common schema changes, but also one of the easiest to get wrong at scale. The steps seem simple: alter the table, define the data type, set defaults if needed, and backfill. Yet in production systems with millions of rows and live traffic, this small change can trigger locks, degrade performance, or even cause downtime.
Plan your schema change. Choose between online migrations or offline updates depending on the database engine. In PostgreSQL, ALTER TABLE ADD COLUMN is fast for an empty column without defaults. But adding a default with a non-null constraint can rewrite the table. In MySQL, online DDL can reduce blocking, but engine configuration matters. For distributed databases, coordinate changes across all nodes to prevent schema drift.
Handle data consistency. If the new column stores derived data, you may need a backfill process. Run it in small batches to avoid saturating I/O. Monitor query plans before and after the migration to catch changes in index usage or execution time.