Adding a new column should be simple, but in production systems it is a high-stakes change. Schema updates can lock tables, slow queries, and break application code. The path to a safe deployment is knowing the constraints of your database engine and applying changes in a controlled sequence.
In PostgreSQL, adding a column without a default is instant. Adding one with a non-null default rewrites the table, which can be costly. MySQL behaves differently, where even a nullable column might trigger a table rebuild depending on the storage engine. For large datasets, this distinction decides if your migration takes milliseconds or hours.
When you add a new column, plan for both schema and application changes. Releases should keep backward compatibility until all code paths are updated. Migrations in zero-downtime systems often create the column, backfill it in batch jobs, then enforce constraints later. This reduces lock times and mitigates retries from dependent services.