YAML Migrations
YAML Migrations
Section titled “YAML Migrations”YAML migrations let DaisyConfig update old disk schemas into the current typed shape before decode.
DaisyYamlMigration object Version-aware migration contract from one schema version to the next.
DaisyYamlMigrationResult object Warnings plus renamed and removed key reporting from one migration step.
DaisyMutableYamlNode object Mutable YAML tree abstraction used during managed migration.
DaisyYamlMigrations.rename object Helper for simple rename operations.
DaisyYamlMigrations.move object Moves one path to another and records the rename pair.
DaisyYamlMigrations.remove object Removes one explicit path from the YAML tree.
Adds a default value if the target path is missing.
Chain validation rules
Section titled “Chain validation rules”Managed migration chains are rejected when they:
- skip versions
- duplicate one
fromVersion - use
toVersion <= fromVersion - fail to advance exactly one version step
- fail to reach
currentVersion
Version behavior
Section titled “Version behavior”- absent
config_versionmeans version1 - DaisyConfig writes the final
config_versionback when changes occurred - unknown keys are preserved unless an explicit migration removes them
- disk writes happen only when something actually changed
Mutable node operations
Section titled “Mutable node operations”DaisyMutableYamlNode supports:
get(path)set(path, value)remove(path)contains(path)keys(deep = true)asMap()
That API exists so migrations can rename, move, remove, and default keys without dropping to plugin-local YAML mutation code.