Adding a new column is one of the most common schema changes in any database. Done right, it’s seamless. Done wrong, it’s downtime, corrupted data, or even lost transactions. The stakes are high, even for a change that looks small.
First, define the purpose of the new column. Is it storing computed data, user input, or metadata? Type selection matters—use the smallest data type that meets the requirements. Consider nullability up front. Making a non-null column without a default value in a populated table can block writes until the migration finishes.
Second, understand the migration path for your database engine. In PostgreSQL, adding a nullable column with a default is now fast in most versions, but older releases lock the table. In MySQL, adding a column may require a full table copy depending on storage engine and version. For production systems, always run the migration on a staging clone with identical data volume to measure the impact.