From c5fb0c50a67d106ac005fdec002eac6c6a642c8d Mon Sep 17 00:00:00 2001 From: YAHIAOUI Hamza Date: Fri, 29 Jul 2022 13:14:14 +0100 Subject: [PATCH] adding 22-10 update script --- www/install/php/Update-22.10.0-beta.1.php | 51 +++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 www/install/php/Update-22.10.0-beta.1.php diff --git a/www/install/php/Update-22.10.0-beta.1.php b/www/install/php/Update-22.10.0-beta.1.php new file mode 100644 index 00000000000..5be122caa8a --- /dev/null +++ b/www/install/php/Update-22.10.0-beta.1.php @@ -0,0 +1,51 @@ +beginTransaction(); + + $errorMessage = "Unable to delete 'appKey' information from database"; + $pearDB->query("DELETE FROM `informations` WHERE `key` = 'appKey'"); + + $pearDB->commit(); +} catch (\Exception $e) { + if ($pearDB->inTransaction()) { + $pearDB->rollBack(); + } + + $centreonLog->insertLog( + 4, + $versionOfTheUpgrade . $errorMessage . + " - Code : " . (int)$e->getCode() . + " - Error : " . $e->getMessage() . + " - Trace : " . $e->getTraceAsString() + ); + + throw new \Exception($versionOfTheUpgrade . $errorMessage, (int) $e->getCode(), $e); +} \ No newline at end of file