Save migration
Related terms: save version, schema change, backward compatibility, serialization
Updating saved data so a newer version of the game can understand it. A patch might rename an item, split one statistic into two, or add a field that older saves lack. Reading the bytes successfully is only the first step: the restored data must still make sense under the new rules.
A migration transforms the old representation, supplies appropriate defaults and records which updates have been applied. Factorio supports migrations for renamed prototypes and changed research or recipes. Test real older saves as part of regression testing, including links to content that has changed or disappeared.
- Further reading
- Unity Serialization: Implementing Migration for a Type