php bin/console doctrine:migrations:version
Manually add and delete migration versions from the version table.
Usage
doctrine:migrations:version [--add] [--delete] [--all] [--range-from [RANGE-FROM]] [--range-to [RANGE-TO]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
Arguments
version The version to add or delete.
Options
--add Add the specified version.
--delete Delete the specified version.
--all Apply to all the versions.
--range-from Apply from specified version.
--range-to Apply to specified version.
--configuration The path to a migrations configuration file. <comment>[default: any of migrations.{php,xml,json,yml,yaml}]</comment>
--em The name of the entity manager to use.
--conn The name of the connection to use.
Help
The doctrine:migrations:version command allows you to manually add, delete or synchronize migration versions from the version table:
bin/console doctrine:migrations:version MIGRATION-FQCN --add
If you want to delete a version you can use the --delete option:
bin/console doctrine:migrations:version MIGRATION-FQCN --delete
If you want to synchronize by adding or deleting all migration versions available in the version table you can use the --all option:
bin/console doctrine:migrations:version --add --all
bin/console doctrine:migrations:version --delete --all
If you want to synchronize by adding or deleting some range of migration versions available in the version table you can use the --range-from/--range-to option:
bin/console doctrine:migrations:version --add --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN
bin/console doctrine:migrations:version --delete --range-from=MIGRATION-FQCN --range-to=MIGRATION-FQCN
You can also execute this command without a warning message which you need to interact with:
bin/console doctrine:migrations:version --no-interaction