A new column changes everything. It alters the schema, touches queries, cascades through code paths you forgot existed. Indexes may need to be rebuilt. Default values have to be chosen with care. The wrong data type can silently sabotage performance.
When adding a new column, start with design. Ask if the field belongs with this table at all. Define its purpose, its constraints, and whether it should be nullable. Check every query that reads from this table—anything not updated will fail or silently omit data.
For large datasets, avoid locking the whole table. Use migrations that break the change into steps:
- Add the new column without constraints.
- Backfill data in controlled batches.
- Add constraints or indexes once the data is ready.
Monitor performance during the backfill. Compression changes, page splits, and index rebuilds can spike resource usage. If replication is in play, measure lag before and after each stage.