| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | 2 | protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) |
|
| 37 | { |
||
| 38 | 2 | $client = new \MongoClient($input->getOption('server')); |
|
| 39 | 2 | $db = $client->selectDB($input->getArgument('database')); |
|
| 40 | 2 | $output->writeln("<info>✓ Successfully established database connection</info>", $output::VERBOSITY_VERBOSE); |
|
| 41 | |||
| 42 | 2 | $databaseMigrationsLockCollection = $db->selectCollection('DATABASE_MIGRATIONS_LOCK'); |
|
| 43 | 2 | $databaseMigrationsLockCollection->update(['locked' => ['$exists' => true]], ['$set' => ['locked' => false]], ['upsert' => true]); |
|
| 44 | 2 | $output->writeln("<info>✓ Successfully released migration lock</info>"); |
|
| 45 | 2 | } |
|
| 46 | } |
||
| 47 |