The query was simple: add a new column without breaking production.
Schema changes look harmless in a migration file, but in a live system they can burn hours or take down services. A new column means altered table structure, updated queries, possible index changes, and hidden performance traps. Every choice matters.
Start with the database. Decide if the column is nullable or has a default. Avoid locking the table for long transactions. On large datasets, break the schema change into steps: add the column, backfill in controlled batches, then switch application logic. This keeps users online and queries fast.
Update your ORM models, DTOs, and API contracts in sync. Old code will keep running until it touches the new column; staged rollouts reduce risk. Watch for queries that select *—extra columns can push unexpected data across the wire, increasing memory use.