The table was live in production when the request came in: add a new column. No downtime. No data loss. No broken queries.
A new column in a database changes the contract between your application and its data. Done right, it unlocks features and insights. Done wrong, it stalls deploys and corrupts records. Performance, schema drift, and migrations all collide here.
Adding a new column is more than ALTER TABLE. On large datasets, naive schema changes lock rows for seconds or minutes. This can block writes, spike latency, and trigger cascading failures. Plan for the size of your table, the indexes in play, and the way your ORM handles schema changes.
Always verify nullability and default values before adding a new column. Setting a default forces the database to touch every row, which can be costly. Instead, create the column as nullable, backfill data in controlled batches, then enforce constraints. This approach minimizes locks and keeps your service responsive.