diff --git a/Console/Command/MigrationShell.php b/Console/Command/MigrationShell.php index 66f51515..7370baeb 100644 --- a/Console/Command/MigrationShell.php +++ b/Console/Command/MigrationShell.php @@ -183,7 +183,7 @@ public function getOptionParser() { 'help' => __('Skip certain migration.'))) ->addOption('jump-to', array( 'short' => 'j', - 'help' => __('Will jump to the migration and mark the others as executed.'))) + 'help' => __('Jump to a certain migration and mark the preceding migrations as executed.'))) ->addOption('compare', array( 'short' => 'm', 'boolean' => true, diff --git a/Docs/Documentation/Examples.md b/Docs/Documentation/Examples.md index c8b758c7..c54102f9 100644 --- a/Docs/Documentation/Examples.md +++ b/Docs/Documentation/Examples.md @@ -99,7 +99,7 @@ Remember this migrations will be set as executed. Jumping to certain migrations -------------------------------------------------- -If you want to jump to certain migration, you can use ```--jump-to``` or ```-j``` + migration name as the example below. +If you want to jump to a certain migration, you can use ```--jump-to``` or ```-j``` + migration name as in the example below. ``` cake Migrations.migration run all -j 1458963215_articles_table diff --git a/Lib/MigrationVersion.php b/Lib/MigrationVersion.php index 1663bc94..8ca3cc24 100644 --- a/Lib/MigrationVersion.php +++ b/Lib/MigrationVersion.php @@ -76,7 +76,7 @@ class MigrationVersion { public $skip = array(); /** - * Will jump to the migration. + * Jump to a certain migration. * * @var null|string */ @@ -406,10 +406,10 @@ public function run($options) { } /** - * jump method + * Jump to a certain migration and mark the preceding migrations as executed. * - * @param array $version version of a migration - * @param array $info migration info + * @param array $version Version of a migration to jump to. + * @param array $type migration type * @return void */ public function jump($version, $type) { @@ -419,6 +419,7 @@ public function jump($version, $type) { /** * Will return a version based in the migration name * + * @param array $mapping mapping of all migrations. * @return bool|string */ public function getVersionByName($mapping) { diff --git a/Test/Case/Console/Command/MigrationShellTest.php b/Test/Case/Console/Command/MigrationShellTest.php index 4dba0b63..fa8e1e8c 100644 --- a/Test/Case/Console/Command/MigrationShellTest.php +++ b/Test/Case/Console/Command/MigrationShellTest.php @@ -206,7 +206,8 @@ public function testRun() { 'version' => 1, 'dry' => false, 'precheck' => null, - 'skip' => array()))); + 'skip' => array())) + ); $this->Shell->args = array('up'); $this->assertTrue($this->Shell->run()); @@ -229,7 +230,8 @@ public function testRun() { 'version' => 1, 'dry' => false, 'precheck' => null, - 'skip' => array()))); + 'skip' => array())) + ); $this->Shell->args = array('down'); $this->assertTrue($this->Shell->run());