Schema changes should be routine, but in real systems they rarely are. Adding a new column in SQL alters the contract your database has with its clients. It can impact query performance, break integrations, and cause costly downtime if done wrong. In PostgreSQL, MySQL, and most relational databases, ALTER TABLE ... ADD COLUMN is straightforward, but you need to plan for size, defaults, indexing, and nullability before executing.
A new column with a default non-null value can lock the table while existing rows are updated. On large datasets, this can take minutes or hours, blocking other writes. One solution is to add the column as nullable, backfill in batches, and then apply constraints when ready. Many teams deploy the schema first, run a migration job, and then enforce the rules in a follow-up release.
Consider what the new column means for indexes. Adding an index at the same time you add the column can compound load, especially on a busy system. Defer indexing until after the backfill. Test the migration on a realistic dataset, and measure before and after query plans to confirm that the column improves performance or enables the intended functionality without regressions.