Skip to content

Commit

Permalink
Update UpdateSchemaCommand.php
Browse files Browse the repository at this point in the history
Fix the command order for the tenant DB and DB name optional inputs.
  • Loading branch information
mogilvie authored Feb 27, 2024
1 parent 1aa20df commit edae792
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Command/UpdateSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$repo = $this->entityManager->getRepository(Tenant::class);

if (null !== $tenantId) {
// Get tenant db name passed as an option.
$tenants = $repo->findBy(['dbName' => $singleDbName]);
} elseif (null !== $singleDbName) {
// Get tenant using the tenant id.
$tenants = $repo->findBy(['id' => $tenantId]);
} elseif (null !== $singleDbName) {
// Get tenant using database name.
$tenants = $repo->findBy(['dbName' => $singleDbName]);
} else {
// Get all tenants
$tenants = $repo->findAll();
Expand Down

0 comments on commit edae792

Please sign in to comment.