The table was complete, but the data was already out of date. You needed a new column. Not tomorrow. Now.
Adding a new column sounds simple. It isn’t, unless the process is sharp, fast, and reliable. Schema changes have a way of triggering failures, slowing deployment, and breaking services if done without planning. The best systems treat a schema migration as part of the code, versioned and tracked like any other change.
A new column in a production database should follow a zero-downtime path. Add the column without locking the table. Use a migration tool or built-in database operations that can execute online. Deploy the schema change before you write any code that depends on it. This buys time for the change to propagate across all environments.
Keep the column nullable at first. If a default is needed, backfill data in batches to avoid write spikes. Once the code starts reading and writing to the column, run checks to ensure all rows are in sync. Mark it non-nullable only after the system depends on it and the data is complete.