The migration script failed, and all eyes turned to the schema. A missing new column had taken down the deploy.
Adding a new column to a database table sounds simple. It is not. The wrong approach can lock tables, block writes, or trigger downtime. In production, those risks multiply fast.
A new column changes storage layout. On large datasets, an ALTER TABLE ... ADD COLUMN can rewrite the whole file. That means slow I/O and potential locks. On high-traffic systems, the safer path is to add the column in a way that avoids blocking and keeps the schema consistent.
Plan before you add. Check the database engine’s behavior for adding columns. PostgreSQL can add a nullable column with a default without rewriting, if done right. MySQL may need a different tactic, or require the ONLINE modifier. For distributed SQL systems, you must also ensure the schema change propagates without breaking replication.