Drush command to migrate running instances between workflow versions (#3605111)

Implements #3605111: the command-line equivalent of the "Migrate instances here" form, for deploy scripts, headless sites and bulk runs.

drush orchestra:migrate-versions WORKFLOW [--to=VERSION] [--map=old:new,old2:new2] [--dry-run]
  • --to: target version (revision) id; defaults to the current published version.
  • --map: node remappings for renamed or removed nodes (the CLI form of the migrate form's mapping selects).
  • --dry-run: reports how many instances would migrate and which live nodes still need a mapping, without changing anything.

A thin wrapper over WorkflowVersionManagerInterface (publishedVersion, definition, migrate); a missing mapping is refused up front with the unmapped nodes listed. It is the module's first Drush command (attribute-based, auto-discovered from src/Drush/Commands/, with a create() for DI), so no Drush services file is needed and no engine or manager change.

Verified on a live site: the command registers and lists, the no-target case reports correctly, and --dry-run against a versioned workflow reports the instance count. The underlying migrate() is covered by the versioning kernel tests (#3604588).

Docs (versioning.md) updated.

Merge request reports

Loading