| @@ 27-49 (lines=23) @@ | ||
| 24 | * |
|
| 25 | * @return void |
|
| 26 | */ |
|
| 27 | protected function configure() |
|
| 28 | { |
|
| 29 | parent::configure(); |
|
| 30 | ||
| 31 | $this->addOption('--environment', '-e', InputOption::VALUE_REQUIRED, 'The target environment.'); |
|
| 32 | ||
| 33 | $this->setDescription('Manage breakpoints') |
|
| 34 | ->addOption('--target', '-t', InputOption::VALUE_REQUIRED, 'The version number to target for the breakpoint') |
|
| 35 | ->addOption('--set', '-s', InputOption::VALUE_NONE, 'Set the breakpoint') |
|
| 36 | ->addOption('--unset', '-u', InputOption::VALUE_NONE, 'Unset the breakpoint') |
|
| 37 | ->addOption('--remove-all', '-r', InputOption::VALUE_NONE, 'Remove all breakpoints') |
|
| 38 | ->setHelp( |
|
| 39 | <<<EOT |
|
| 40 | The <info>breakpoint</info> command allows you to toggle, set, or unset a breakpoint against a specific target to inhibit rollbacks beyond a certain target. |
|
| 41 | If no target is supplied then the most recent migration will be used. |
|
| 42 | You cannot specify un-migrated targets |
|
| 43 | ||
| 44 | <info>phinx breakpoint -e development</info> |
|
| 45 | <info>phinx breakpoint -e development -t 20110103081132</info> |
|
| 46 | <info>phinx breakpoint -e development -r</info> |
|
| 47 | EOT |
|
| 48 | ); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Toggle the breakpoint. |
|
| @@ 29-51 (lines=23) @@ | ||
| 26 | * |
|
| 27 | * @return void |
|
| 28 | */ |
|
| 29 | protected function configure() |
|
| 30 | { |
|
| 31 | parent::configure(); |
|
| 32 | ||
| 33 | $this->addOption('--environment', '-e', InputOption::VALUE_REQUIRED, 'The target environment'); |
|
| 34 | ||
| 35 | $this->setDescription('Migrate the database') |
|
| 36 | ->addOption('--target', '-t', InputOption::VALUE_REQUIRED, 'The version number to migrate to') |
|
| 37 | ->addOption('--date', '-d', InputOption::VALUE_REQUIRED, 'The date to migrate to') |
|
| 38 | ->addOption('--dry-run', '-x', InputOption::VALUE_NONE, 'Dump query to standard output instead of executing it') |
|
| 39 | ->addOption('--fake', null, InputOption::VALUE_NONE, "Mark any migrations selected as run, but don't actually execute them") |
|
| 40 | ->setHelp( |
|
| 41 | <<<EOT |
|
| 42 | The <info>migrate</info> command runs all available migrations, optionally up to a specific version |
|
| 43 | ||
| 44 | <info>phinx migrate -e development</info> |
|
| 45 | <info>phinx migrate -e development -t 20110103081132</info> |
|
| 46 | <info>phinx migrate -e development -d 20110103</info> |
|
| 47 | <info>phinx migrate -e development -v</info> |
|
| 48 | ||
| 49 | EOT |
|
| 50 | ); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Migrate the database. |
|