The code stops. The data needs more room. You add a new column.
A new column changes the shape of your database. It can unlock new features, store new attributes, or track new relationships. But it can also break queries, slow reads, and trigger migrations that grind production to a halt. Precision matters.
First, decide the column’s type. Use native data types. Keep it as small as possible. If it’s an integer, make it an integer. If it’s text, use varchar with a length. Avoid type guessing. Define defaults to prevent null chaos.
Second, plan how to add the column. In small datasets, an ALTER TABLE runs fast. In large tables, the same statement can lock writes for minutes or hours. Consider adding the column with a default and filling data in batches. Use tools built for zero-downtime migration.