Adding a new column is not decoration. It is structure. Precision. Speed. Whether in PostgreSQL, MySQL, or SQLite, the step is the same in principle—define the column, choose the data type, set constraints, apply defaults. One line of SQL changes the shape of your dataset forever.
In PostgreSQL:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP WITH TIME ZONE DEFAULT NOW();
In MySQL:
ALTER TABLE users ADD COLUMN last_login DATETIME DEFAULT CURRENT_TIMESTAMP;
No wasted movement. Always know the impact before running the command. Adding a new column updates the schema. Queries must adapt. Indexes may need to change. Migrations should be version-controlled to prevent drift between environments.
Naming matters. A vague name creates confusion. Use singular, descriptive identifiers. Know whether the column will store computed values, external IDs, or user-generated content. Adjust types accordingly: VARCHAR, TEXT, BOOLEAN, JSONB.