System design · interactive
Zero-downtime schema migrations
You want to rename users.name to full_name. During a rolling deploy, old and new app versions run at the same time against one database, so every schema change must work with both. Compare a one-step rename with expand and contract.
- before
- migrate
- deploy
- done
users table columns
name
server 1
v1
server 2
v1
server 3
v1
All servers run v1, which reads and writes name.
Approach
Step 1 of 4 · read left to right
In production
Tools and technologies
Migration tools help, but expand and contract is a process.
Not tied to one language — use these names when you search docs or design a system.