A database schema change seems simple—add a new column, set the default, deploy. But in production, a poorly handled change can lock tables, block writes, or cause cascading failures. The cost is real. Queries slow down. API responses fail. Monitoring lights go red.
When adding a new column in SQL, you must plan for size, type, defaults, and constraints. Adding a column with a NOT NULL constraint and default value can rewrite the entire table. On large datasets, this means downtime. In PostgreSQL, use ADD COLUMN ... DEFAULT ... with care. For MySQL, consider adding the column without a default, backfilling in batches, then applying defaults in a later migration.
In multi-tenant systems, adding a column can trigger migrations across hundreds of tables. Plan for zero-downtime changes by shipping schema updates and application code in separate steps. Deploy the schema first. Write to the new column in parallel with the old one. Migrate data asynchronously. Switch reads once the migration finishes.