The schema was locked, but the product spec changed overnight. You need a new column, and you need it without breaking production.
Adding a new column in a live database is never trivial. Done wrong, it can cause downtime, corrupt data, or trigger expensive migrations at scale. Done right, it’s a precise, low-risk change that scales cleanly and predictably.
The first step is to define the column with exact data types and constraints. Avoid nullable fields unless they are intentional. Think about indexes before you add them — indexes speed reads but can slow writes, and a poorly thought-out index on a new column will burn performance.
When working in SQL, use ALTER TABLE for schema updates, but deploy it with a migration tool that supports transactional changes and rollbacks. In Postgres, for example, adding a column without a default value is instantaneous. Adding a default will rewrite the table, so batch updates or use computed values when possible to avoid locking.