php bin/console doctrine:migrations:execute
Execute a single migration version up or down manually.
Usage
doctrine:migrations:execute [--write-sql] [--dry-run] [--up] [--down] [--query-time] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [--] <version>
Arguments
version The version to execute.
Options
--write-sql The path to output the migration SQL file instead of executing it.
--dry-run Execute the migration as a dry run.
--up Execute the migration up.
--down Execute the migration down.
--query-time Time all the queries individually.
--configuration The path to a migrations configuration file.
--db-configuration The path to a database connection configuration file.
--db The database connection to use for this command.
--em The entity manager to use for this command.
--shard The shard connection to use for this command.
Help
The doctrine:migrations:execute command executes a single migration version up or down manually:
bin/console doctrine:migrations:execute YYYYMMDDHHMMSS
If no --up or --down option is specified it defaults to up:
bin/console doctrine:migrations:execute YYYYMMDDHHMMSS --down
You can also execute the migration as a --dry-run :
bin/console doctrine:migrations:execute YYYYMMDDHHMMSS --dry-run
You can output the would be executed SQL statements to a file with --write-sql :
bin/console doctrine:migrations:execute YYYYMMDDHHMMSS --write-sql
Or you can also execute the migration without a warning message which you need to interact with:
bin/console doctrine:migrations:execute --no-interaction