When building or modifying a database table, adding a new column is one of the most common operations. It changes the shape of your data model. It impacts queries, indexes, constraints, triggers, and the code connected to it. Treat it as a schema change with real consequences, not just an extra field.
A new column can store computed results, track state, capture metadata, or support new features. Before you alter a table, define the column name, type, nullability, and default value. Choose types that balance precision, storage, and speed. If you add constraints, make them explicit. Decide if the column should be indexed right away or later, based on query patterns.
In SQL, adding a column is straightforward:
ALTER TABLE orders ADD COLUMN fulfilled_at TIMESTAMP;
But this command is not the end. Migrations should be versioned and automated. For large datasets, adding a column with a default can lock the table or cause downtime. Use tools that run migrations online and in steps to avoid blocking reads and writes. Apply monitoring to watch performance after the change.