exp:expmigrationconvert
Convert YAML migrations of the migration bundle of the Symfony based platform into YAML migrations of Exponential: a file or every .yml file of a folder, step by step, what does not convert listed at the top of the new file; a dry run unless --apply.
Script bin/php/expmigrationconvert.php, code in kernel/private/classes/commands/expmigrationconvert.php. Run it from the installation root, as the user the web server runs as:
./console exp:expmigrationconvert --help
./console exp:migration:convert --help
php bin/php/expmigrationconvert.php --helpHelp text
Convert migrations of the migration bundle of the Symfony based platform
Reads a YAML migration of the bundle (a list of steps with type, mode, match, attributes and
references), or every .yml and .yaml file of a folder, and writes a YAML migration of Exponential
for each: content, content_type, content_type_group, location, role, section, user, user_group,
language, tag, sql, reference and trash steps convert; "reference:<name>" becomes ${ref.<name>}.
What does not convert (PHP and service calls, HTTP, mail, processes, loops, files, keys without a
counterpart) is never guessed: it is listed at the top of the new file, to be done by hand. Every
converted step is checked by its step type. The new file keeps the date and time of the old name and
goes into the site's migrations directory or, with --source=extension:<name>, the extension's. Without
--apply it shows the files and writes nothing; an existing file is never replaced.
./console exp:migration:convert var/import/20240115093000_create_news_folder.yml
./console exp:migration:convert var/import/MigrationVersions --apply
./console exp:migration:convert var/import/MigrationVersions --source=extension:expnews --applyOptions
| Option | Value | Help |
|---|---|---|
--apply | Make the changes (the default is a dry run that lists them and changes nothing) | |
--dry-run | The default, accepted for scripts that pass it: list what would change, change nothing | |
--format | required | text (default) or json (the machine output exp-migration/1) |
--source | required | The source: site or extension:<name> (generate: where the file goes; rollback: which migration, when two sources have its id) |
--author | required | The author in the header of the new migration |
Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).
Arguments: [file].
Related
Generated by ./console exp:help:examples from bin/php/expmigrationconvert.php, kernel/private/classes/commands/expmigrationconvert.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.