@@ 250-258 (lines=9) @@ | ||
247 | ||
248 | if (null === $version) { |
|
249 | $version = max(array_merge($versions, array_keys($migrations))); |
|
250 | } else { |
|
251 | if (0 != $version && !isset($migrations[$version])) { |
|
252 | $this->output->writeln(sprintf( |
|
253 | '<comment>warning</comment> %s is not a valid version', |
|
254 | $version |
|
255 | )); |
|
256 | return; |
|
257 | } |
|
258 | } |
|
259 | ||
260 | // are we migrating up or down? |
|
261 | $direction = $version > $current ? MigrationInterface::UP : MigrationInterface::DOWN; |
|
@@ 386-389 (lines=4) @@ | ||
383 | } |
|
384 | ||
385 | // Check the target version exists |
|
386 | if (0 !== $version && !isset($migrations[$version])) { |
|
387 | $this->getOutput()->writeln("<error>Target version ($version) not found</error>"); |
|
388 | return; |
|
389 | } |
|
390 | ||
391 | // Revert the migration(s) |
|
392 | krsort($migrations); |