Adding a new column is simple in theory. In practice, it can be the fault line between smooth deployments and late‑night outages. Schema changes are high‑risk because they touch production data, shift constraints, and ripple through application code. A single column alters storage, indexing, queries, and even API contracts.
Before adding a new column, confirm the data type and nullability. Match it to existing patterns in your schema. Default values should be deliberate—set them in the migration, not in the ORM by accident. Use explicit SQL to avoid hidden framework behavior.
For production databases under heavy load, use migrations that run online. Add the column without locking reads or writes when possible. In MySQL, ALGORITHM=INPLACE can work for some types; in PostgreSQL, adding a column with a default may still rewrite the table unless you set it to NULL and backfill in batches.