Adding a new column is one of the most common schema changes in production. It seems simple. It is not. Done well, it feels instant. Done badly, it can lock tables, spike CPU, stall queries, and wake you at 3 a.m.
First, define the column in a migration script. Use explicit data types. Avoid nulls unless they are the real default. Do not guess at constraints—write them. If you need an index, add it separately. Creating indexes inline with column creation is a trap.
On large tables, a blocking ALTER TABLE can take minutes or hours. Prefer online schema changes when the database supports it. In MySQL, use tools like gh-ost or pt-online-schema-change. In PostgreSQL, certain column additions with defaults rewrite the entire table; avoid that by setting the default after the column exists.
Compatibility matters. Deploy the schema change before deploying code that writes to the new column. This allows a safe rollout without broken inserts. Then, start writing data to it. Test reads and writes under load.