| @@ 71-94 (lines=24) @@ | ||
| 68 | throw new \InvalidArgumentException(sprintf('The migration "%s" does not exist in the migrations table.', $migrationNameOrPath)); |
|
| 69 | } |
|
| 70 | ||
| 71 | switch ($migration->status) { |
|
| 72 | case Migration::STATUS_DONE: |
|
| 73 | $status = '<info>executed</info>'; |
|
| 74 | break; |
|
| 75 | case Migration::STATUS_STARTED: |
|
| 76 | $status = '<comment>execution started</comment>'; |
|
| 77 | break; |
|
| 78 | case Migration::STATUS_TODO: |
|
| 79 | // bold to-migrate! |
|
| 80 | $status = '<error>not executed</error>'; |
|
| 81 | break; |
|
| 82 | case Migration::STATUS_SKIPPED: |
|
| 83 | $status = '<comment>skipped</comment>'; |
|
| 84 | break; |
|
| 85 | case Migration::STATUS_PARTIALLY_DONE: |
|
| 86 | $status = '<comment>partially executed</comment>'; |
|
| 87 | break; |
|
| 88 | case Migration::STATUS_SUSPENDED: |
|
| 89 | $status = '<comment>suspended</comment>'; |
|
| 90 | break; |
|
| 91 | case Migration::STATUS_FAILED: |
|
| 92 | $status = '<error>failed</error>'; |
|
| 93 | break; |
|
| 94 | } |
|
| 95 | ||
| 96 | $output->writeln('<info>Migration: ' . $migration->name . '</info>'); |
|
| 97 | $output->writeln('Status: ' . $status); |
|
| @@ 125-148 (lines=24) @@ | ||
| 122 | continue; |
|
| 123 | } |
|
| 124 | ||
| 125 | switch ($migration->status) { |
|
| 126 | case Migration::STATUS_DONE: |
|
| 127 | $status = '<info>executed</info>'; |
|
| 128 | break; |
|
| 129 | case Migration::STATUS_STARTED: |
|
| 130 | $status = '<comment>execution started</comment>'; |
|
| 131 | break; |
|
| 132 | case Migration::STATUS_TODO: |
|
| 133 | // bold to-migrate! |
|
| 134 | $status = '<error>not executed</error>'; |
|
| 135 | break; |
|
| 136 | case Migration::STATUS_SKIPPED: |
|
| 137 | $status = '<comment>skipped</comment>'; |
|
| 138 | break; |
|
| 139 | case Migration::STATUS_PARTIALLY_DONE: |
|
| 140 | $status = '<comment>partially executed</comment>'; |
|
| 141 | break; |
|
| 142 | case Migration::STATUS_SUSPENDED: |
|
| 143 | $status = '<comment>suspended</comment>'; |
|
| 144 | break; |
|
| 145 | case Migration::STATUS_FAILED: |
|
| 146 | $status = '<error>failed</error>'; |
|
| 147 | break; |
|
| 148 | } |
|
| 149 | $notes = array(); |
|
| 150 | if ($migration->executionError != '') { |
|
| 151 | $notes[] = "<error>{$migration->executionError}</error>"; |
|