The table was wrong. You knew it the moment you saw the missing field, the gap that broke the flow of the data. The fix was obvious: add a new column. Not later. Now.
A new column is more than a minor schema tweak. It changes how your application reads, stores, and indexes information. If the table is large or high-traffic, the wrong approach will lock writes, block queries, or slow the system to a crawl. Doing it right means planning the migration, updating code paths, and ensuring compatibility across services.
Start with definition. Name the new column with precision. Avoid vague labels; a poorly named column will spawn confusion in every query that touches it. Pick the correct data type the first time—changing it later under load is expensive.
Apply defaults carefully. A NULL default may keep the migration fast, but can lead to scattered null-check logic. A non-null default triggers writes to every row, which can be slow. For massive datasets, use batched updates or backfill jobs after adding the column as nullable.