Skip to content

Commit

Permalink
#24 - Minor change after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbiarda committed Jul 4, 2022
1 parent 0aa1c25 commit 80d62a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Engines/MySql/Transformation/UpdateValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

class UpdateValues extends Command implements CommandInterface
{
const COMMAND_NAME = 'mysql-transformation-update-values';

private Configuration $configuration;
private RemoteConnectionInterface $connection;
private ConsoleOutput $output;
Expand All @@ -41,14 +43,14 @@ public function __construct(
$this->output = $output;
$this->queryBuilder = $queryBuilder;
$this->properties = $properties;
parent::__construct('mysql-transformation-update-values');
parent::__construct(self::COMMAND_NAME);
}

public function go(TransportInterface $transport, EnvironmentInterface $environment): TransportInterface
{
$config = $this->configuration->getNode('update-values');
if ((isset($config['disabled']) && $config['disabled'] === true) || !isset($config['tables'])) {
return $transport->withStatus(new Status('mysql-transformation-update-values', 'success'));
return $transport->withStatus(new Status(self::COMMAND_NAME, 'success'));
}

$transport->getLogger()->notice("Beginning table updates from update-values.yaml.");
Expand All @@ -61,7 +63,7 @@ public function go(TransportInterface $transport, EnvironmentInterface $environm
$transport->getLogger()->notice("Database has been updated.");
$this->output->writeln("<info>Database has been updated.</info>");

return $transport->withStatus(new Status('mysql-transformation-update-values', 'success'));
return $transport->withStatus(new Status(self::COMMAND_NAME, 'success'));
}

public function getProperties(): array
Expand Down

0 comments on commit 80d62a1

Please sign in to comment.