The database was slowing down, and the product team wanted a new feature by Friday. You had one option: add a new column.
A new column changes the shape of your data. It changes how queries run. It changes how code interacts with the database. Do it wrong, and you ship delays, crashes, or silent data corruption. Do it right, and you extend your schema without pain.
Start with the migration. Never alter massive tables in a single transaction without thinking through locks. Use migrations that add the new column with a default of NULL before writing code to populate values. In PostgreSQL, adding a nullable column is instant, but adding a non-null column with a default rewrites the whole table. In MySQL, some versions still lock writes for this step. Know your engine.
Deploy the code in phases. First, add the new column to the schema. Then deploy code that reads it if present but doesn’t rely on it. After backfilling the data in batches, set constraints or defaults that enforce correctness. This multi-step path avoids downtime and broken deploys.