The schema is live, but the product team needs a new column.
You open the migration file. The decision is simple, but the execution must be precise. A new column changes storage, queries, indexes, and constraints. One mistake can trigger downtime or corrupt data. Adding a column is easy—adding it safely, in production, is not.
First, confirm the purpose. Name the column with intent. Avoid vague labels that require future engineers to guess. Define the data type and constraints the moment you create it. Nullability must be explicit. A missing default value can slow every write under load.
Then manage the migration. For large tables, add the column without a default in the initial deploy. Backfill data in batches. Set defaults and constraints in a second migration. This keeps locks short and reduces operational risk. Monitor for queries that implicitly select every column; adding one changes the payload size.