The query ran. The dataset loaded. But the new column wasn’t there.
Adding a new column sounds trivial, but in production systems the stakes are high. Schema changes hit performance. Bad defaults break code paths. Missing indexes drag queries to a halt. To get it right, you need a process that is fast, safe, and reversible.
First, define the column precisely. Use explicit types. Avoid NULL when your logic depends on defaults. Choose names that will never need renaming. Changing a column name later ripples through code, APIs, and downstream jobs.
Second, migrate without downtime. In relational databases, use ALTER TABLE with care. Large tables can lock reads and writes. Break the change into stages: add the column, backfill in batches, then enforce constraints. For NoSQL, design new fields to coexist with old ones until you confirm consistency.