The query ran. The page loaded. But the data felt wrong. You need a new column, and you need it now.
A new column sounds simple. In production, it is not. Schema changes ripple through systems. Tables lock. Queries stall. Latency spikes crawl across dashboards. Adding a column is a DDL operation, and the way you execute it determines whether users notice or not.
Start with the schema definition. Identify the table. Confirm the data type. Decide if the new column allows nulls or requires a default value. The choice here affects downtime. Null-enabled additions can be instant. Defaults often trigger a full table rewrite. In large datasets, that rewrite can be catastrophic for performance.
Plan for compatibility. Migrations should be atomic or split into phases. Use feature flags. Deploy the empty column first. Backfill in batches using id-based pagination or timestamp windows. Avoid locking entire tables. Monitor IO, replication lag, and query response time during the operation.