Adding a new column is one of the most common schema changes in application development. It sounds small. Done wrong, it can lock tables, break queries, and cause downtime. Done right, it expands your data model without risk. Modern systems demand the latter.
A new column changes the contract between your application and its database. Whether you use PostgreSQL, MySQL, or a distributed system, the process touches performance, indexing, and backward compatibility. Always assess how the migration will run in production. Will it copy data for every row? Will it rewrite the entire table? This is where understanding your database engine matters.
For zero-downtime changes, avoid adding non-nullable columns with default values in one step. Instead, create the column as nullable, backfill in batches, then enforce constraints. This avoids long locks on large tables. In PostgreSQL, ALTER TABLE ADD COLUMN is fast if you do not need to backfill immediately. In MySQL, the behavior varies by storage engine and version—some are instant, others rebuild the table.