Skip to content

Commit

Permalink
Handle the case where there is no audit table to upgrade (should fix #85
Browse files Browse the repository at this point in the history
).
  • Loading branch information
DamienHarper committed Sep 16, 2019
1 parent cec3178 commit 5674dca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DoctrineAuditBundle/Command/UpdateSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

if (0 === \count($audits)) {
$io->warning('There are no audit table to upgrade.');

return 0;
}

$progressBar = new ProgressBar($output, \count($audits));
$progressBar->setBarWidth(70);
$progressBar->setFormat("%message%\n".$progressBar->getFormatDefinition('debug'));
Expand Down

0 comments on commit 5674dca

Please sign in to comment.