The query ran, the data came back, and the schema cracked open like a seam under pressure. You needed a new column. Not later. Now.
Adding a new column to a production database is one of the most common schema changes in software. It’s also one of the most dangerous if done without care. A poorly planned ALTER TABLE can lock writes, block reads, or push latency past the point of failure.
The first step is deciding how to add the column without breaking existing queries. If the column can default to NULL and be nullable, the migration is simpler. Postgres, MySQL, and modern cloud databases can add such a column instantly in many cases. When a default value is required, write-heavy tables need special caution. Setting a default during migration can rewrite the entire table. That means downtime or degraded performance. The safer path is to add the column as nullable, backfill in small batches, then set the default later.