A new column in a database changes the shape of your data model. It can unlock new features, store derived values, or support faster queries. But adding it wrong can cause downtime, lock tables, or break application logic.
Before you create a new column, decide its exact name, data type, and default value. Avoid vague names. Keep types strict—TEXT vs. VARCHAR(255) vs. JSONB matters. Set NOT NULL only when you know every row can meet that requirement.
In SQL, adding a column is simple:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP WITH TIME ZONE;
But under the surface, the database may rewrite the table if you set a default on large datasets. In systems like Postgres, setting a constant default can be optimized, but older versions may lock writes. Test against production-like data before running migrations.