Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function execute() |
||
21 | { |
||
22 | $migrations = $this->manager->migrations(); |
||
23 | $isNoMigration = true; |
||
24 | foreach ($migrations as $migration) { |
||
25 | if (!$migration->isApplied()) { |
||
26 | $isNoMigration = false; |
||
27 | $migration->up(); |
||
28 | $this->output->writeln(sprintf("<info>up</info> %s", $migration->getId())); |
||
29 | } |
||
30 | } |
||
31 | if ($isNoMigration) { |
||
32 | $this->output->writeln("<comment>there is no migration to migrate.</comment>"); |
||
33 | } |
||
34 | } |
||
35 | } |
||
36 |