A new column changes both the schema and the way your application works. Before you add it, define exactly what it will store—string, integer, boolean, timestamp—and confirm the default value. For large tables, setting a default and avoiding expensive backfills can save hours of downtime.
In SQL, the core step is straightforward:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP DEFAULT NOW();
This runs instantly on small datasets, but on production-scale systems it can lock the table. Use non-blocking schema changes when your engine supports them. For PostgreSQL, ADD COLUMN with a default now updates metadata only, making it safer for high-traffic environments. For MySQL or MariaDB, online DDL options can prevent service interruptions.
Always check indexes. A new column might need one for faster queries, but premature indexing wastes disk and slows writes. Profile real usage before adding it.