The database screamed for change. A feature needed shipping today, but the schema was missing a field. You needed a new column.
Adding a new column sounds simple. In practice, it can be a high‑risk move if done wrong. A careless ALTER TABLE on a large production dataset can lock writes, eat CPU, and bring down your service. The safest path starts with understanding how your database engine handles schema updates.
In PostgreSQL, adding a new column with a default value can rewrite the entire table. If that table has millions of rows, downtime is real. Use ADD COLUMN without a default first, then backfill in small batches. For MySQL, check whether you are on a version with instant DDL support. Instant operations are truly metadata‑only; others require a copy and rebuild.
Always pair schema changes with migrations that can run forward and backward. If the application depends on the new column, add code that handles both old and new structures until the migration completes. This protects you from edge cases when replicas lag.