Skip to content

Commit

Permalink
Update SchemaUpdateCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Dec 29, 2018
1 parent e2995d0 commit 8772c09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Command/SchemaUpdateCommand.php
Expand Up @@ -115,14 +115,16 @@ private function setupModelIndexes(OutputInterface $output, bool $ingoreDuplicat
foreach ($indexes as $index) {
try {
$collection->createIndex($index->getKey(), $index->getOptions());

$output->writeln("\t> ".$collection->getCollectionName(), OutputInterface::VERBOSITY_DEBUG);
} catch (CommandException $e) {
if ($ingoreDuplicateKeyException) {
$output->writeln('EXCEPTION - '.$e->getMessage());
if (false == $ingoreDuplicateKeyException) {
throw $e;
}

$output->writeln('<error>EXCEPTION</error> - '.$e->getMessage());
}
}

$output->writeln("\t> ".$collection->getCollectionName(), OutputInterface::VERBOSITY_DEBUG);
}
}
}
Expand Down

0 comments on commit 8772c09

Please sign in to comment.