A new column changes the structure. It alters how data is stored, queried, and understood. This is not a minor patch. It’s a schema migration. In SQL, the process starts with ALTER TABLE. Example:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This command adds last_login to users. Every existing row will have a default, often NULL, unless you specify otherwise. The database locks part of the table during the operation. On large datasets, this can freeze writes or impact reads. Plan for downtime or use non-blocking migrations where possible.
Performance matters. Adding a new column with a default value may cause a full table rewrite. In PostgreSQL, adding a nullable column without a default is fast—it only updates metadata. Adding with a default and NOT NULL will rewrite all rows, which can mean minutes or hours for big tables.
Indexing a new column is a separate step. Use: