The error: column “status” does not exist.
Adding a new column is routine, but the edge cases turn routine into traps. The schema changes. The application changes. Data integrity is at stake. When you add a new column in production, the wrong order, lock time, or migration strategy can stall requests or corrupt writes.
Use a zero-downtime migration plan. Create the column with a default of NULL to avoid table rewrites. Backfill in small batches to prevent table locking. Update application code to write to both old and new fields until the switch is safe. Only then drop compatibility code.
For relational databases like PostgreSQL or MySQL, a new column addition seems fast in small tables but can lock large ones. Test against a production-sized dataset. Index only after the column is populated. Avoid NOT NULL with a default on busy tables in a single step—it can rewrite the whole table. Break it into separate migrations.