Skip to content

Commit

Permalink
refs #272 removing duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Moraes committed Aug 2, 2016
1 parent 9a78bf5 commit 1cb39bc
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Lib/MigrationVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,25 +355,20 @@ public function run($options) {
break;
} elseif (($direction === 'up' && $info['migrated'] === null)
|| ($direction === 'down' && $info['migrated'] !== null)) {

$jumpVersion = $this->getVersionByName($mapping);
if ($version < $jumpVersion) {
$this->jump($version, $info['type']);
continue;
}
$type = $info['type'];

$jumpVersion = $this->getVersionByName($mapping);
if ($version < $jumpVersion) {
$this->jump($version, $info['type']);
$this->jump($version, $type);
continue;
}

if (in_array($mapping[$version]['name'], $this->skip)) {
$this->setVersion($version, $info['type']);
$this->setVersion($version, $type);
continue;
}

$migration = $this->getMigration($info['name'], $info['class'], $info['type'], $options);
$migration = $this->getMigration($info['name'], $info['class'], $type, $options);
$migration->Version = $this;
$migration->info = $info;

Expand All @@ -395,7 +390,7 @@ public function run($options) {
return $errorMessage;
}

$this->setVersion($version, $info['type'], ($direction === 'up'));
$this->setVersion($version, $type, ($direction === 'up'));
}
}

Expand Down

0 comments on commit 1cb39bc

Please sign in to comment.