From 9fcbc908dea7bec3213d3cd80575964cd1757e80 Mon Sep 17 00:00:00 2001 From: Alex Rapatij <109154287+AlexRapatij@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:06:41 +0100 Subject: [PATCH] Check whether the table exist --- Console/ReencryptTfaData.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Console/ReencryptTfaData.php b/Console/ReencryptTfaData.php index 74b7c4b..6f4d193 100644 --- a/Console/ReencryptTfaData.php +++ b/Console/ReencryptTfaData.php @@ -84,6 +84,10 @@ 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()