Schema changes are the sharp edge of production work. Adding a new column is common but never trivial. Done without care, it locks tables, stalls queries, and in the worst case, takes down the application. Done right, it becomes an invisible improvement—fast, safe, and ready for use.
A new column is more than a single line in a migration file. You must choose the correct data type. You must decide if it allows nulls, has a default, or uses constraints. Each choice affects storage, indexing, and query performance. Adding the wrong constraints can block inserts or cause unexpected errors.
For large datasets, adding a column can be dangerous. A blocking ALTER TABLE may freeze writes until the operation finishes. To avoid this, use non-blocking migrations when supported by the database engine. In Postgres, that means adding the column without a default first, then backfilling data in small batches to keep locks minimal.