Preference Migration Logic
For each preference, the migration process attempts to find a delta where the source version either matches or is greater than the version of the preferences file from which the preference is being imported.
If no such delta is found, the preference value is copied “as is” to the newly built preferences file. If a matching delta is found, the migration process uses the transformation specified in the delta to convert the preference. The converted preference is assumed to be understood by the version released immediately after “source_version”.
For example, if a delta specifies “12.0” as the source version, then the transformation function is assumed to convert the preference into a format that software version 12.2 understands.
After a transformation, one of the following occurs:
- The destination version of the applied transformation matches the current version. The migration process assumes that the conversion process is complete and that the preference is in a format that can be understood by the currently installed version.
- The destination version of the last applied transformation does not match the current version, but there is a “more recent” delta with source version information that either matches or is greater than the destination version of the last transformation. The “more recent” delta is applied. This step is repeated until there is no more recent delta.
- The migration process system does not find “more recent” deltas. The migration process assumes that the conversion process is complete and that the preference is now in a format that can be understood by the currently installed version.
In other words, if a preference has underdone multiple changes spanning many versions, the migration process tries to apply a series of delta transformations to convert the preference to the latest format.