The table was huge, millions of rows, each one a record someone cared about. You needed a new column.
Adding a new column in a database is never just about schema change. It’s about speed, downtime, and risk. If you do it wrong, production waits, locks stack, and dashboards go dark. If you do it right, nobody notices—except the people who now have the data they needed.
Plan before you write the migration. Know exactly what the column will store. Define the type, nullability, defaults. Small fields can be added fast, but large defaults in massive tables can choke performance. Instead of writing every cell during the alter statement, consider adding the column as nullable, backfilling in batches, then enforcing constraints later.
Watch your database engine’s DDL behavior. Postgres can add certain columns instantly if no default is specified. MySQL and MariaDB vary depending on version. Cloud-managed SQL services sometimes hide latency spikes—until they kill your throughput.