The database is live, but the data model is wrong. You need a new column, and you need it without taking the system down.
A new column sounds simple. It’s not always simple in production. Adding it the wrong way can lock a table, block writes, or break downstream systems. Adding it the right way means you control the migration, the schema, and the rollout. The shape of your data evolves without breaking the contract with your application code.
Before you add a new column, define its type and default value. Decide if it allows nulls. Plan for how existing rows will be backfilled. In SQL, this step is not optional. Defaults and constraints determine whether the migration runs instantly or grinds the database under load.
Use transactional DDL if your database supports it. In PostgreSQL, ALTER TABLE ADD COLUMN with a default runs as a rewrite for older versions. In newer versions, it’s metadata-only, so it’s safe. MySQL and other engines behave differently. Test it on a clone of production before you run it against the real thing.