The code waited, but the data was wrong. A missing field. A broken report. The fix was simple: add a new column.
A new column changes the shape of a table. In SQL, it alters the schema. In PostgreSQL, you use ALTER TABLE table_name ADD COLUMN column_name data_type;. In MySQL and MariaDB, the syntax is similar. The operation is quick for empty tables, but on large datasets it can lock writes and slow queries. Plan for it.
When adding a new column, set default values with care. In most databases, adding a default to an existing column rewrites the table. This can be costly. For large production tables, first add the column as nullable. Then backfill data in batches. Once filled, set the default and constraints.
Consider indexing. A new column with frequent lookups may benefit from a B-tree index. But every index adds overhead to writes. Create only when necessary. For JSON, text search, or geospatial data, use specialized index types.