The build had failed again. The issue was clear: a missing new column in the database schema brought the deployment to a halt.
Adding a new column sounds simple. It is not. It touches migrations, code paths, query performance, and data integrity. At scale, a schema change can slow the app, lock tables, or break core features.
A new column begins with a migration. Use an additive approach: write a migration that adds the column without dropping or altering existing data. In SQL, this means ALTER TABLE ... ADD COLUMN with defaults and nullability set to avoid conflicts. Avoid expensive backfills in a single transaction. Break them into batches or run background jobs to populate the new column without blocking reads and writes.
After the database migration, update the application code. Add the new column to models, serializers, and API contracts. Ensure queries select only the columns they need. A careless SELECT * can pull extra data and inflate network cost.