
Safely Migrate a Database
How to rename a column on 500 million rows without taking the app down
What you'll learn
- Why a one-line schema change can take an app down
- The expand and contract pattern, step by step
- Backfilling in small batches without hurting replicas
- How online schema change tools copy and swap a table
In this video, we'll look at how to rename a column in a table with 500 million rows without taking your app offline. We'll cover the expand and contract pattern, writing to both columns, backfilling data in small batches, and switching from the old column to the new one without breaking anything.
We'll also look at why some schema changes can block reads and writes, how old and new code run side by side during a deploy, and how online schema change tools help with large tables.
By the end, you'll know how to plan a database migration without taking your app down.



