Conditions | 6 |
Paths | 9 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function perform(): void |
||
28 | { |
||
29 | if (!$this->verifyEnvironment()) { |
||
30 | //Making sure we can safely migrate in this environment |
||
31 | return; |
||
32 | } |
||
33 | |||
34 | $this->migrator->configure(); |
||
35 | |||
36 | $found = false; |
||
37 | $count = !$this->option('all') ? 1 : PHP_INT_MAX; |
||
38 | while ($count > 0 && ($migration = $this->migrator->rollback())) { |
||
39 | $found = true; |
||
40 | $count--; |
||
41 | $this->sprintf( |
||
42 | "<info>Migration <comment>%s</comment> was successfully rolled back.</info>\n", |
||
43 | $migration->getState()->getName() |
||
44 | ); |
||
45 | } |
||
46 | |||
47 | if (!$found) { |
||
48 | $this->writeln('<fg=red>No executed migrations were found.</fg=red>'); |
||
49 | } |
||
52 |