The query hit the database like a hammer, but the results were wrong. A missing new column had broken everything.
Adding a new column should be fast, safe, and reversible. In production systems, it rarely is. Schema migrations can trigger locks, block writes, or even crash under load. This risk grows with table size, replication lag, and live traffic. Every choice—data type, nullability, default values—affects downtime and rollback paths.
Modern workflows demand zero-downtime migrations. The process starts with adding the new column in a non-blocking way. On many relational databases, that means avoiding defaults that rewrite the table. Use a nullable column first, then backfill in batches small enough to avoid saturating I/O or triggering long-running locks. Monitor query plans as soon as the column exists; even unused columns can change index size and memory usage.