Adding a new column to a live database is routine work—until it isn’t. The wrong approach locks tables, slows queries, or causes downtime. The right approach slides it into place without a ripple. The difference is in timing, tooling, and how you structure the change.
First, define the new column explicitly. Set the correct data type and constraints from the start. Avoid defaults that require rewriting existing rows unless you can tolerate the load. Consider adding the column as nullable, backfilling data in small batches, then enforcing constraints in a later migration.
Second, understand each database’s behavior. In PostgreSQL, adding a nullable column without a default is fast. Adding one with a default can rewrite the table. In MySQL, large tables can block writes during schema changes unless you use an online DDL method. With distributed databases, verify how replicas handle schema replication.