The query finished running, but the report looked wrong. One column—critical to the analysis—was missing. You opened the schema and saw the problem. A new column was needed.
Adding a new column to a table sounds simple. Yet the impact can be wide. Performance, indexing, data integrity, and downstream services can all feel the change. In production systems, the choice is never just ALTER TABLE. It is architecture.
First, decide the column type. Use exact types, not vague defaults. An INT where you mean boolean wastes space and confuses API consumers. A VARCHAR without a defined length can bloat storage. Choose with intent.
Second, plan for nullability. Adding a non-nullable column to a large table without a default will fail if any existing rows lack data. Setting a default value can make the migration smooth, but make sure it won’t pollute the dataset with placeholders that mislead future queries.