Skip to content

Commit

Permalink
Merge pull request #58 from jellesiderius/master
Browse files Browse the repository at this point in the history
Prevent errors from being thrown
  • Loading branch information
convenient authored Aug 13, 2024
2 parents 4b8e171 + 8938bc3 commit 961808e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Console/ReencryptColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
*/
$tableName = $this->resourceConnection->getTableName($table);
$connection = $this->resourceConnection->getConnection();

if (!$connection->isTableExists($tableName)) {
$output->writeln("<info>The table {$tableName} doesn't exist</info>");
return Cli::RETURN_SUCCESS;
}

$field = $connection->quoteIdentifier(sprintf('%s.%s', $tableName, $column));
$select = $connection->select()
->from($tableName, [$identifier, "$column"]);
Expand Down
6 changes: 6 additions & 0 deletions Console/ReencryptUnhandledCoreConfigData.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
*/
$ccdTable = $this->resourceConnection->getTableName('core_config_data');
$connection = $this->resourceConnection->getConnection();

if (!$connection->isTableExists($ccdTable)) {
$output->writeln("<info>The table {$ccdTable} doesn't exist</info>");
return Cli::RETURN_SUCCESS;
}

$select = $connection->select()
->from($ccdTable, ['*'])
->where('(value LIKE "_:_:____%" OR value LIKE "__:_:____%")')
Expand Down

0 comments on commit 961808e

Please sign in to comment.