The migration halted. Production read replicas lagged. Someone whispered the cause: a new column.
Adding a new column seems simple. In truth, it changes the shape of data. When executed without care, it locks tables, stalls requests, and costs revenue. To add a new column in production, you must think about schema change strategies, storage engines, and query paths.
A new column alters the database definition. It can increase row size, affect index selection, and change cache efficiency. On large datasets, an ALTER TABLE command can trigger a full table rewrite, blocking reads and writes until complete. In high-traffic systems, this is not acceptable.
Use non-blocking migrations when possible. With MySQL, pt-online-schema-change or gh-ost can add a new column with minimal lock time. PostgreSQL can add nullable columns fast, but adding with a default forces a rewrite—so split it into two statements: one to add the column, one to update values.