Skip to content

YAML Migrations

YAML migrations let DaisyConfig update old disk schemas into the current typed shape before decode.

Version-aware migration contract from one schema version to the next.

Required

Warnings plus renamed and removed key reporting from one migration step.

Required

Mutable YAML tree abstraction used during managed migration.

Required

Helper for simple rename operations.

Optional

Moves one path to another and records the rename pair.

Optional

Removes one explicit path from the YAML tree.

Optional

Adds a default value if the target path is missing.

Optional

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
  • absent config_version means version 1
  • DaisyConfig writes the final config_version back when changes occurred
  • unknown keys are preserved unless an explicit migration removes them
  • disk writes happen only when something actually changed

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.