Rolling Out a Schema Change Across Versions

A schema change can be introduced in compatible steps when older and newer application versions temporarily share a database.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a new field
  2. Test both supported versions during transition

Trace a new field

First allow older writes to omit the field. Then populate existing rows and move reads to the new representation. Add a strict requirement after all supported writers respect it. See adding columns for existing records.

Test both supported versions during transition

Exercise legacy and new records and verify which version wrote each. Progressive rollout explains why overlap can occur.[1]

References

  1. David L. Parnas, On the Criteria to Be Used in Decomposing Systems into Modules, CMU-CS-71-101 ↩