The database was breaking. Queries slowed. Reports stalled. The fix was a new column.
Adding a new column is one of the most common schema changes in relational databases. It looks simple. It isn’t. Every step matters. Poor execution can lock tables, crash services, and turn a deployment window into a firefight.
Start with analysis. Know the table size. Understand the indexes. Identify whether the new column will hold nullable values, defaults, or constraints. Each choice changes the impact on write operations and storage.
Plan for downtime—or avoid it. Many databases support online DDL for adding columns without blocking queries. MySQL’s ALTER TABLE ... ADD COLUMN with ALGORITHM=INPLACE can help. PostgreSQL is fast with ALTER TABLE ADD COLUMN when adding nullable columns without a default. But adding a default with NOT NULL will rewrite every row. That’s expensive.