It wasn’t a bug. The schema had changed. A new column had landed in production, and everything downstream failed.
A new column in a database table is small in code but large in impact. It changes queries. It changes APIs. It changes assumptions in the application layer. Adding one is trivial in syntax—ALTER TABLE users ADD COLUMN last_login TIMESTAMP;—but it’s never just that. The real work is knowing where that column flows, how it affects indexes, joins, caching, and ETL jobs.
Design a new column with intent. Decide if it allows NULL. Decide if it needs a default value. Understand how it will be populated for existing rows. Plan for migrations in systems under load. Test with the dataset at scale, not just development fixtures.
When adding a new column in SQL, Postgres, MySQL, or any modern database, check its effect on storage and performance. In Postgres, adding a nullable column without a default is fast. With a default, it rewrites the table and can lock writes. In MySQL, the cost depends on table size and engine version. For large datasets, consider backfilling in stages.