| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2.024 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 2 | protected function execute(InputInterface $input, OutputInterface $output) : int |
|
| 39 | { |
||
| 40 | 2 | $question = 'WARNING! You are about to execute a database migration that could result in schema changes and data loss. Are you sure you wish to continue?'; |
|
| 41 | |||
| 42 | 2 | if (! $this->canExecute($question, $input)) { |
|
| 43 | $this->io->error('Migration cancelled!'); |
||
| 44 | |||
| 45 | return 3; |
||
| 46 | } |
||
| 47 | |||
| 48 | 2 | $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); |
|
| 49 | 2 | $version = $this->getDependencyFactory()->getRollup()->rollup(); |
|
| 50 | |||
| 51 | 2 | $this->io->success(sprintf( |
|
| 52 | 2 | 'Rolled up migrations to version <info>%s</info>', |
|
| 53 | 2 | (string) $version |
|
| 54 | )); |
||
| 55 | |||
| 56 | 2 | return 0; |
|
| 57 | } |
||
| 59 |