A new column changes data structure, affects queries, and alters application logic. In SQL, adding a column is direct:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP;
When adding a new column, plan for schema changes in both the database and application code. Decide on default values. Consider whether the column should allow NULL. Think about storage type, indexing, and impact on existing reads and writes.
On production systems, adding a column can cause locks or downtime. Use zero-downtime migration strategies when possible. For PostgreSQL, adding a nullable column without a default is fast. Adding a default requires a table rewrite—migrate in two steps to avoid blocking. In MySQL, similar rules apply; avoid schema changes that cause full table copies without preparation.