The query returned fast, but the report was wrong. The missing data lived in a column that didn’t exist—yet.
Adding a new column should be simple. It often isn’t. Schema changes ripple through systems, break queries, and force downtime. The problem is amplified when the dataset is live, the traffic is high, and the business depends on accuracy at all times. A new column isn’t just a field in a table. It’s a change in the language your data speaks.
The first step: choose the right migration strategy. For relational databases, many teams opt for an additive-only migration. Create the column with a NULL default, push it to production, then backfill records in small batches. Avoid large locking operations. In PostgreSQL, adding a nullable column without constraints is usually instant, but adding with DEFAULT on large tables can lock writes. Plan accordingly.