The cause was simple: adding a new column went wrong.
A new column sounds harmless. In reality, it changes the structure of your database, updates your schema, and can lock critical tables. Done poorly, it can stall production, spike latency, and break existing queries. Done well, it is invisible, fast, and safe.
When you add a new column, you must decide how it fits into your data model. Define its type, set its default values, and decide nullability. Think about how it will be indexed. Consider how it will interact with existing constraints and joins. Every choice affects performance and future flexibility.
In PostgreSQL, ALTER TABLE ADD COLUMN is straightforward, but production workloads demand more. Large tables can take minutes to alter, blocking reads and writes. Use ADD COLUMN ... DEFAULT carefully, because it rewrites the table. Add the column without the default, then backfill in batches. Add indexes after the data migration, not before.
In MySQL, adding a new column to an InnoDB table can be expensive. Modern MySQL versions support instant DDL for certain operations, but not all column types or ordering options use it. Check your engine’s documentation before deploying. Test schema changes in a staging environment with production-size data.