The query ran. The table loaded. But something was missing — the new column wasn’t there.
Adding a new column is one of the most common schema changes in any database. It looks simple. It can still wreck performance, lock production, or cause mismatched data if handled without care. The right approach depends on scale, workload, and downtime tolerance. Fast, safe schema evolution is the goal.
First, define the new column explicitly with type, constraints, and default behavior. Avoid implicit conversions that cause hidden full-table rewrites. Use ADD COLUMN with a lightweight default if your database supports metadata-only operations. When a backfill is needed, batch updates to prevent locking and I/O spikes.
Second, plan for application compatibility. Deploy code that can handle both the old and new schema before altering the table. This ensures no request fails during rollout. Test queries using the new column in staging with real data volume. Check query plans to confirm indexes are used as expected.