Adding a new column sounds simple. It is not. Done wrong, it locks the database, burns CPU, and blocks production. Done right, it is fast, safe, and invisible to users.
A new column changes the schema. Whether in PostgreSQL, MySQL, or another RDBMS, the operation can be destructive or non-blocking depending on choices made. Adding a nullable column without a default is often instant. Adding one with a default value can rewrite the entire table. On large datasets, that means hours of downtime—or worse, silent data loss if interrupted.
For high-traffic systems, you must plan. Identify the column type, constraints, and indexing needs before execution. Avoid immediate indexes on creation. Create the column first, populate it in batches, then apply indexes in a second step to control load.
Migrations need to be reversible. Always test in a staging environment with representative data sizes. Use feature flags to deploy dormant columns ahead of the code that uses them. This pattern keeps changes isolated and reduces rollback risk.