The query ran without errors, but the report looked wrong. The cause was a missing new column in the database. Data was being written, but no one could read it because the schema was out of sync.
A new column is more than a single field—it’s a structural change. Adding it should be fast, safe, and predictable. The method depends on your database, your workload, and your uptime requirements. For relational databases like PostgreSQL or MySQL, you can add a new column with an ALTER TABLE command. Always define the column type, constraints, and defaults carefully. Nullable columns are simpler to add; non-null columns with defaults cause table rewrites and may lock writes.
When you add a new column in production systems, run the change in a migration script. Keep schema changes in version control. Deploy them alongside application changes that use the new field, but sequence it so that reads and writes won’t break during rollout. If you work with high-traffic systems, consider phased releases: