A new column in a production database is not just a structural change. It affects queries, indexes, API contracts, and migrations. The way you add it can define whether your next release ships clean or blows up in your face.
The first step is clear: define the purpose. Every new column must have an explicit function in the data model. Is it storing calculated values, supporting analytics, or enabling a new feature? Decide the type, constraints, and whether it allows NULLs before writing a single line.
For SQL-based systems, the most common pattern is an ALTER TABLE statement. In PostgreSQL:
ALTER TABLE users ADD COLUMN last_login TIMESTAMPTZ;
This works in milliseconds for small tables, but large datasets require caution. Adding a new column with a default value can lock the table for a long time. Avoid defaults on creation; instead, populate data in a separate backfill step.