The schema was perfect until it wasn’t. A change request lands. You need a new column. The database waits, locked in its current shape. Every query runs on the old structure. Every second matters.
Adding a new column sounds simple. In production, it isn’t. You must choose the right migration strategy. Blocking alters can freeze writes. Non-blocking methods can increase complexity. The wrong choice risks downtime or data loss.
First, define the column’s purpose and data type with precision. Nullability matters. Defaults matter. An extra byte in the wrong place can echo through terabytes of storage.
Second, consider the migration plan. For large tables, use an online schema change tool. In PostgreSQL, ALTER TABLE ... ADD COLUMN is fast if no default is set. For MySQL, pt-online-schema-change or gh-ost can help keep the system responsive. Test each approach on a realistic dataset before touching production.