A single missing metric forced the team to stop. One fix: a new column.
Adding a new column is not just schema work. It changes queries, indexes, storage, and API contracts. Done well, it improves accuracy and speed. Done poorly, it breaks production.
Start with the migration. In PostgreSQL or MySQL, ALTER TABLE is the command. Add the column with the smallest viable data type. Set DEFAULT values only if needed—avoiding table locks on large datasets. Always test the migration in a staging environment with production-sized data.
Next, update the data layer. ORM models need the new field. Query builders must handle null states until the data is backfilled. Any consumer—internal dashboards, external clients—must adjust parsing and display logic.