A new column in a table changes data shape, application logic, and sometimes the rules of the system. In SQL, it’s done with ALTER TABLE and an ADD COLUMN clause. In PostgreSQL:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This is simple in syntax but not in impact. Adding a column touches production performance and integrity. On large datasets, it can lock writes or trigger long-running background work. Even without defaults or constraints, an ALTER can cascade into ORM models, API contracts, and UI forms.
Plan the new column with precision. Choose a type that fits both current and future data. Default values in SQL will backfill. Nullable columns allow phased rollouts, but every null check in code is technical debt. Index only if queries demand it—indexes speed reads but cost on writes.