Adding a new column sounds simple. It isn’t. In production systems, one schema change can cascade through queries, indexes, APIs, and dashboards. A careless migration can lock tables, spike CPU, or break replication. Precision matters.
When adding a new column to a relational database, first decide if it should be nullable, have a default, or require an index. For large tables, adding a column with a default value may rewrite the entire table. In PostgreSQL, adding a nullable column is instant, but adding it with a default before version 11 rewrites data. In MySQL, online DDL options vary by storage engine, and for InnoDB, some changes can be applied without blocking reads.
Plan for API impact. If the new column changes a contract, update serializers and clients before deployment. For ETL pipelines, ensure column additions are reflected in schema definitions. Test your migration on a replica with production-sized data to measure performance cost.