Adding a new column is one of the most common schema changes you will make in a database. Yet it is also one of the easiest to get wrong if you don’t think through the impact. A poorly executed column addition can lock tables, block writes, and freeze systems in production.
The safest way to add a new column starts with knowing your database engine’s behavior. In MySQL, ALTER TABLE can cause a full table rewrite, unless you use ALGORITHM=INPLACE or ALGORITHM=INSTANT in supported versions. In PostgreSQL, adding a column without a default is fast, but adding one with a non-null default rewrites the entire table.
Plan for your data type and constraints. Consider nullability, indexing, and default values. Avoid adding a default at the schema level if it will trigger a rewrite; backfill the data in batches instead. Indexes on a new column can be created concurrently in PostgreSQL (CREATE INDEX CONCURRENTLY) or later in MySQL with LOCK=NONE options.