Databases evolve. Requirements change. When they do, you often need to add a new column to an existing table without breaking queries, APIs, or downstream systems. The task sounds small, but the impact can be wide. Doing it wrong can lock tables, stall transactions, or corrupt data.
A new column isn’t just an extra field. It changes the shape of the data model. Before running ALTER TABLE, confirm the reason for the addition. Is the new column a natural part of the entity, or should it be a separate table? Schema bloat over months becomes technical debt.
When you know the column belongs, design it with tight constraints. Pick the correct type. Avoid generic types like TEXT or VARCHAR(MAX) unless necessary. Set NOT NULL only when you can guarantee a default value for existing rows. An unsafe NOT NULL on a large dataset can lock the table and block writes.
Deploy schema changes in a controlled way: