The schema was perfect until the data team asked for one more field. Now you need a new column, and you need it without breaking production.
Adding a new column sounds simple, but the difference between a seamless deploy and a site outage is all in the execution. The database must accept the change without locking critical tables, the API must handle both old and new payloads, and the downstream jobs must keep running.
First, design the new column with the right constraints. Ask if it allows NULL or requires a default. Nullable columns deploy faster in most relational databases because they skip the expensive rewrite step. If defaults are mandatory, consider backfilling in a separate migration to avoid downtime.
Second, write the migration to be backward compatible. The service should run without errors whether the column exists or not. This often means checking for column presence in code and deploying those guards before the schema change.