The missing piece was a new column.
Adding a new column is one of the most common schema changes. It seems simple—one alteration and done—but the way you approach it can decide whether your app keeps running or stalls under load. A careless schema migration can lock rows, spike CPU, and block requests for minutes. At scale, minutes are expensive.
Plan the change. Start with ALTER TABLE in a staging environment using production-sized data. Measure the time and impact. If your database supports it, use options like ADD COLUMN with DEFAULT NULL to avoid full writes. Set defaults in a separate step to prevent large table rewrites.
For PostgreSQL, adding a nullable column without a default is nearly instant. Adding a column with a default non-null value will rewrite the whole table unless you split it into two operations. For MySQL, check the storage engine. InnoDB can add columns online in modern versions, but older setups will lock the table.