Adding a new column is simple in concept but dangerous in practice. It alters the contract between your application and its data. Miss one dependency and you can lock tables, drop queries, or stall deployments. Speed matters. Consistency matters more.
First, define the new column in a way that does not break existing reads or writes. Add it as nullable if possible. Use defaults sparingly and with intention—silent defaults can hide logic errors.
Second, choose the right migration strategy. Online schema changes reduce downtime. Postgres tools like ALTER TABLE ... ADD COLUMN work well for small tables but can cause locks on large ones. In MySQL, use gh-ost or pt-online-schema-change to keep production queries flowing.
Third, backfill data in controlled batches. Test performance on staging with realistic datasets. Monitor CPU, I/O, and replication lag before pushing changes to production. A careless backfill can saturate resources and cascade into failures.