Adding a new column sounds simple, but in production it can be dangerous. Schema changes touch critical paths. They can block writes, stall reads, or crash services if not planned. The goal is a clean migration without downtime.
In SQL, a new column can be added with an ALTER TABLE statement. For example:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This executes instantly on small tables. On large datasets, it can lock the table. For high‑traffic systems, using a background migration or an online schema change tool like gh-ost or pt-online-schema-change avoids blocking. Keep column defaults simple to prevent expensive rewrites. If the new column requires a computed value, backfill in batches while the system stays live.