Adding a new column sounds simple. In practice, it can expose weak migrations, block writes, and trigger downtime if handled carelessly. Schema changes need to respect both the database engine and the application layer. The right approach depends on the size of the table, the volume of writes, and the deployment strategy.
In PostgreSQL, adding a nullable column without a default is instant. Adding a non-nullable column with a default rewrites the table, locking it and stalling traffic. Use ALTER TABLE … ADD COLUMN with care, or run backfill operations in multiple steps to avoid downtime. In MySQL, the impact depends on storage engine, column type, and version — later releases with ALGORITHM=INSTANT can avoid full table copies for some operations.
When rolling out a new column in production, control the migration path: