The database migration looked clean, but the new column wasn’t showing up in production.
A new column in a database table can be among the simplest schema changes and also the easiest to get wrong. Adding one without breaking queries, constraints, or downstream pipelines requires precision. It’s not just ALTER TABLE ADD COLUMN; it’s versioning, indexing, default values, and nullability all moving under the surface.
Start by defining the exact schema change in version control. Use migration files that are backward-compatible so old code can run against the new structure until every service is ready. Avoid altering large tables in one blocking step; break them into smaller operations if your database supports online migrations. For high-traffic systems, add the new column as nullable first, then backfill in batches to avoid locking and performance hits. Only after the data is in place should you enforce NOT NULL constraints or add indexes.