The database waits for a change. You need a new column. It must be fast, safe, and without downtime.
Adding a new column in production is a high-risk move if handled without care. A schema migration can lock tables, block queries, or cause cascading failures. The path forward is precision.
First, identify the impact. Check table size, read/write patterns, and indexes. Adding a column to a small table is simple. On large tables, direct ALTER TABLE statements can stall the system. Use online schema change tools when possible. PostgreSQL offers ADD COLUMN efficiently for nullable columns. MySQL may require pt-online-schema-change or native online DDL for heavy workloads.
Second, define defaults carefully. A new column with a default value writes data for every row, which can be expensive. If possible, add it nullable, then backfill in controlled batches. This avoids locking and keeps throughput stable.