The build was green until the schema change. Now the migration is stuck, and the release clock is ticking. A single new column just halted the deployment.
Adding a new column sounds simple. In production, it can be risky. On large tables, an ALTER TABLE ... ADD COLUMN can lock writes, spike CPU, or blow up replication lag. Downtime in a high-traffic system is not acceptable.
The safest way to add a new column is to treat it as a multi-step deployment. First, alter the schema in a way that avoids blocking writes. In PostgreSQL and MySQL, adding a nullable column without a default is fast because it updates metadata only. Non-null columns with a default require a full table rewrite, which can hurt performance.
For large datasets, use online schema change tools like gh-ost or pt-online-schema-change. These create a shadow copy of the table, apply changes there, and cut over with minimal interruption. In cloud-managed databases, check if your provider offers online DDL.