Adding a new column sounds simple. In practice, it can be a breaking change. It can lock tables, block queries, and block deploys. The right approach depends on data size, uptime goals, and schema evolution strategy.
Start with the migration plan. Identify whether the database can add the new column without rewriting the full table. In Postgres, adding a nullable column with no default is fast. Adding a column with a default rewrites the table. In MySQL, older versions lock for the alteration. Newer versions support ALGORITHM=INPLACE. Choose the method that limits downtime.
Decide on default values early. If the column must have a default, consider adding it as nullable first, then backfilling in controlled batches. This avoids long locks and spikes in replication lag.
Check application code next. Deploy the schema change before using the column. Write code that can run with and without the column. Use feature flags if needed. This is the safest way to avoid race conditions and partial deploy issues.