Adding a new column sounds simple. In production, it can be dangerous. Done wrong, it locks tables, slows writes, and risks downtime. Done right, it delivers new features without breaking anything.
Before you add a new column, define its purpose and scope. Decide the data type. Consider nullability. Think through defaults. Estimate the storage impact. Every choice affects performance, future schema changes, and index strategies.
In SQL, adding a new column is a schema migration. On small datasets, ALTER TABLE is instant. On large ones, it can trigger a table rewrite. Some databases block reads and writes until the operation completes. Postgres can add nullable columns without a table rewrite, but adding defaults can lock the table. MySQL may allow instant adds under certain conditions, but not for every type or constraint.
Avoid full-table rewrites if possible. Break the migration into safe steps: