Every database migration should be deliberate. A new column changes the schema, alters storage, and influences query performance. Done right, it strengthens your system. Done wrong, it creates hidden costs and downtime.
Start by defining the purpose of the new column. Know its data type, default value, and nullability. In PostgreSQL, use ALTER TABLE table_name ADD COLUMN column_name data_type; for a basic change. In MySQL, it’s the same with minor syntax variations. For high-traffic systems, wrap schema changes in transactions or use tools like pt-online-schema-change to avoid locking.
When adding a new column with a default value, beware of migrations that touch every row on a large table. This can trigger long locks and block writes. Instead, add the column as nullable, backfill data in controlled batches, and then set constraints.