Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | protected function execute(InputInterface $input, OutputInterface $output) : ?int |
||
39 | { |
||
40 | $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? (y/n)'; |
||
41 | |||
42 | if (! $this->canExecute($question, $input, $output)) { |
||
43 | $output->writeln('<error>Migration cancelled!</error>'); |
||
44 | |||
45 | return 3; |
||
46 | } |
||
47 | |||
48 | $this->getDependencyFactory()->getMetadataStorage()->ensureInitialized(); |
||
49 | $version = $this->getDependencyFactory()->getRollup()->rollup(); |
||
50 | |||
51 | $output->writeln(sprintf( |
||
52 | 'Rolled up migrations to version <info>%s</info>', |
||
53 | (string) $version |
||
54 | )); |
||
55 | |||
56 | return 0; |
||
57 | } |
||
59 |