Important

You are browsing documentation for version 5.1 of OroCommerce, supported until March 2026. Read the documentation for version 6.0 (the latest LTS version) to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

CLI Commands (MigrationBundle) 

oro:migration:data:load 

The oro:migration:data:load command loads data fixtures. The fixtures type (“main”, or “demo”) can be specified with the –fixtures-type option:

php bin/console oro:migration:data:load --fixtures-type=<type>

The --dry-run option can be used to print the list of fixtures without applying them:

php bin/console oro:migration:data:load --dry-run

The --bundles option can be used to load the fixtures only from the specified bundles:

php bin/console oro:migration:data:load --bundles=<BundleOne> --bundles=<BundleTwo> --bundles=<BundleThree>

The --exclude option will skip loading fixtures from the specified bundles:

php bin/console oro:migration:data:load --exclude=<BundleOne> --exclude=<BundleTwo> --exclude=<BundleThree>

oro:migration:dump 

The oro:migration:dump command displays the database schema as PHP code that can be used to create a migration script.

php bin/console oro:migration:dump

The --plain-sql option can be used to output schema as plain SQL queries:

php bin/console oro:migration:dump --plain-sql

The --bundle option can be used to show only the portion of the schema that is associated with the entities in a specific bundle:

php bin/console oro:migration:dump --bundle=<bundle-name>

The --all option can be used to create migration script for all bundles:

php bin/console oro:migration:dump --all

Use the --migration-version option to specify the migration version for the generated PHP code:

php bin/console oro:migration:dump --migration-version=<version-string>

oro:migration:load 

Command oro:migration:load executes migration scripts:

php bin/console oro:migration:load