In databases, adding a new column is simple in theory but carries strategic weight. It can change schema design, enable new features, improve tracking, or break assumptions. The SQL command is direct:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This executes instantly on small tables but can lock rows or rewrite data on large datasets. Engine choice matters. PostgreSQL handles certain column additions without blocking reads if defaults are null. MySQL often needs a full table rewrite unless using newer instant DDL features.
A new column should not exist without purpose. Define its role, data type, and constraints. Will it be nullable? Indexed? If indexed, plan for write impact and disk costs. Once deployed, migration scripts must align with application code to prevent runtime errors from missing fields. Feature flags and phased rollouts help reduce production risk.