diff --git a/Console/ReencryptColumn.php b/Console/ReencryptColumn.php index bac6f48..adbfca4 100644 --- a/Console/ReencryptColumn.php +++ b/Console/ReencryptColumn.php @@ -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("The table {$tableName} doesn't exist"); + return Cli::RETURN_SUCCESS; + } + $field = $connection->quoteIdentifier(sprintf('%s.%s', $tableName, $column)); $select = $connection->select() ->from($tableName, [$identifier, "$column"]); diff --git a/Console/ReencryptUnhandledCoreConfigData.php b/Console/ReencryptUnhandledCoreConfigData.php index 0531ab8..1fcc5ad 100644 --- a/Console/ReencryptUnhandledCoreConfigData.php +++ b/Console/ReencryptUnhandledCoreConfigData.php @@ -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("The table {$ccdTable} doesn't exist"); + return Cli::RETURN_SUCCESS; + } + $select = $connection->select() ->from($ccdTable, ['*']) ->where('(value LIKE "_:_:____%" OR value LIKE "__:_:____%")')