protected function configure() { $this->setName('migrations:migrate')->setDescription('Execute a migration to a specified version or the latest available version.')->addArgument('version', InputArgument::OPTIONAL, 'The version number (YYYYMMDDHHMMSS) or alias (first, prev, next, latest) to migrate to.', 'latest')->addOption('write-sql', null, InputOption::VALUE_NONE, 'The path to output the migration SQL file instead of executing it.')->addOption('dry-run', null, InputOption::VALUE_NONE, 'Execute the migration as a dry run.')->addOption('query-time', null, InputOption::VALUE_NONE, 'Time all the queries individually.')->addOption('allow-no-migration', null, InputOption::VALUE_NONE, 'Don\'t throw an exception if no migration is available (CI).')->setHelp(<<<EOT The <info>%command.name%</info> command executes a migration to a specified version or the latest available version: <info>%command.full_name%</info> You can optionally manually specify the version you wish to migrate to: <info>%command.full_name% YYYYMMDDHHMMSS</info> You can specify the version you wish to migrate to using an alias: <info>%command.full_name% prev</info> You can also execute the migration as a <comment>--dry-run</comment>: <info>%command.full_name% YYYYMMDDHHMMSS --dry-run</info> You can output the would be executed SQL statements to a file with <comment>--write-sql</comment>: <info>%command.full_name% YYYYMMDDHHMMSS --write-sql</info> Or you can also execute the migration without a warning message which you need to interact with: <info>%command.full_name% --no-interaction</info> You can also time all the different queries if you wanna know which one is taking so long: <info>%command.full_name% --query-time</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:execute')->setDescription('Execute a single migration version up or down manually.')->addArgument('version', InputArgument::REQUIRED, 'The version to execute.', null)->addOption('write-sql', null, InputOption::VALUE_NONE, 'The path to output the migration SQL file instead of executing it.')->addOption('dry-run', null, InputOption::VALUE_NONE, 'Execute the migration as a dry run.')->addOption('up', null, InputOption::VALUE_NONE, 'Execute the migration up.')->addOption('down', null, InputOption::VALUE_NONE, 'Execute the migration down.')->addOption('query-time', null, InputOption::VALUE_NONE, 'Time all the queries individually.')->setHelp(<<<EOT The <info>%command.name%</info> command executes a single migration version up or down manually: <info>%command.full_name% YYYYMMDDHHMMSS</info> If no <comment>--up</comment> or <comment>--down</comment> option is specified it defaults to up: <info>%command.full_name% YYYYMMDDHHMMSS --down</info> You can also execute the migration as a <comment>--dry-run</comment>: <info>%command.full_name% YYYYMMDDHHMMSS --dry-run</info> You can output the would be executed SQL statements to a file with <comment>--write-sql</comment>: <info>%command.full_name% YYYYMMDDHHMMSS --write-sql</info> Or you can also execute the migration without a warning message which you need to interact with: <info>%command.full_name% --no-interaction</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:migrate')->setDescription('Execute a migration to a specified version or the latest available version.')->addArgument('version', InputArgument::OPTIONAL, 'The version to migrate to.', null)->addOption('write-sql', null, InputOption::VALUE_NONE, 'The path to output the migration SQL file instead of executing it.')->addOption('dry-run', null, InputOption::VALUE_NONE, 'Execute the migration as a dry run.')->setHelp(<<<EOT The <info>%command.name%</info> command executes a migration to a specified version or the latest available version: <info>%command.full_name%</info> You can optionally manually specify the version you wish to migrate to: <info>%command.full_name% YYYYMMDDHHMMSS</info> You can also execute the migration as a <comment>--dry-run</comment>: <info>%command.full_name% YYYYMMDDHHMMSS --dry-run</info> You can output the would be executed SQL statements to a file with <comment>--write-sql</comment>: <info>%command.full_name% YYYYMMDDHHMMSS --write-sql</info> Or you can also execute the migration without a warning message wich you need to interact with: <info>%command.full_name% --no-interaction</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('update'); $this->setDescription('Execute a migration to the latest available version.'); $this->setHelp('This is a simplified version of the full migration command. If you wish to have more control over the migration process you should run ./doctrine migration:migrate instead.'); parent::configure(); }
protected function configure() { $this->setName('migrations:version')->setDescription('Manually add and delete migration versions from the version table.')->addArgument('version', InputArgument::OPTIONAL, 'The version to add or delete.', null)->addOption('add', null, InputOption::VALUE_NONE, 'Add the specified version.')->addOption('delete', null, InputOption::VALUE_NONE, 'Delete the specified version.')->addOption('all', null, InputOption::VALUE_NONE, 'Apply to all the versions.')->addOption('range-from', null, InputOption::VALUE_OPTIONAL, 'Apply from specified version.')->addOption('range-to', null, InputOption::VALUE_OPTIONAL, 'Apply to specified version.')->setHelp(<<<EOT The <info>%command.name%</info> command allows you to manually add, delete or synchronize migration versions from the version table: <info>%command.full_name% YYYYMMDDHHMMSS --add</info> If you want to delete a version you can use the <comment>--delete</comment> option: <info>%command.full_name% YYYYMMDDHHMMSS --delete</info> If you want to synchronize by adding or deleting all migration versions available in the version table you can use the <comment>--all</comment> option: <info>%command.full_name% --add --all</info> <info>%command.full_name% --delete --all</info> If you want to synchronize by adding or deleting some range of migration versions available in the version table you can use the <comment>--range-from/--range-to</comment> option: <info>%command.full_name% --add --range-from=YYYYMMDDHHMMSS --range-to=YYYYMMDDHHMMSS</info> <info>%command.full_name% --delete --range-from=YYYYMMDDHHMMSS --range-to=YYYYMMDDHHMMSS</info> You can also execute this command without a warning message which you need to interact with: <info>%command.full_name% --no-interaction</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:status')->setDescription('View the status of a set of migrations.')->setHelp(<<<EOT The <info>%command.name%</info> command outputs the status of a set of migrations: <info>%command.full_name%</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:up-to-date')->setDescription('Tells you if your schema is up-to-date.')->setHelp(<<<EOT The <info>%command.name%</info> command tells you if your schema is up-to-date: <info>%command.full_name%</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:generate')->setDescription('Generate a blank migration class.')->addOption('editor-cmd', null, InputOption::VALUE_OPTIONAL, 'Open file with this command upon creation.')->setHelp(<<<EOT The <info>%command.name%</info> command generates a blank migration class: <info>%command.full_name%</info> You can optionally specify a <comment>--editor-cmd</comment> option to open the generated file in your favorite editor: <info>%command.full_name% --editor-cmd=mate</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:status')->setDescription('View the status of a set of migrations.')->addOption('show-versions', null, InputOption::VALUE_NONE, 'This will display a list of all available migrations and their status')->setHelp(<<<EOT The <info>%command.name%</info> command outputs the status of a set of migrations: <info>%command.full_name%</info> You can output a list of all available migrations and their status with <comment>--show-versions</comment>: <info>%command.full_name% --show-versions</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:version')->setDescription('Manually add and delete migration versions from the version table.')->addArgument('version', InputArgument::REQUIRED, 'The version to add or delete.', null)->addOption('add', null, InputOption::VALUE_NONE, 'Add the specified version.')->addOption('delete', null, InputOption::VALUE_NONE, 'Delete the specified version.')->setHelp(<<<EOT The <info>%command.name%</info> command allows you to manually add and delete migration versions from the version table: <info>%command.full_name% YYYYMMDDHHMMSS --add</info> If you want to delete a version you can use the <comment>--delete</comment> option: <info>%command.full_name% YYYYMMDDHHMMSS --delete</info> EOT ); parent::configure(); }
protected function configure() { $this->setName('migrations:latest')->setDescription('Outputs the latest version number'); parent::configure(); }