A new column alters the shape of your data. It changes how queries run, how indexes work, and how future code interacts with that table. A careless schema change can slow queries, block writes, or lock a table until your users start seeing errors.
The right process starts before you touch the database. First, define the purpose of the new column. Decide its type, default, constraints, and nullability. Make sure every downstream service that reads from this table can handle the new shape.
In SQL, the basic syntax is direct:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
But production databases don’t run in isolation. On large tables, this can lock writes for long enough to trigger incidents. Use online schema change tools or database-native non-locking migrations when possible. For MySQL, pt-online-schema-change or gh-ost are reliable. For Postgres, adding a nullable column with no default is usually safe, but adding defaults or indexes requires care.