mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix #1477 : let the upgrade crash if the upgrade procedure fails
This commit is contained in:
@@ -58,7 +58,6 @@ class patch_380a3 implements patchInterface
|
|||||||
{
|
{
|
||||||
$conn = $databox->get_connection();
|
$conn = $databox->get_connection();
|
||||||
|
|
||||||
try {
|
|
||||||
$removeProc = "DROP PROCEDURE IF EXISTS explode_log_table";
|
$removeProc = "DROP PROCEDURE IF EXISTS explode_log_table";
|
||||||
|
|
||||||
$stmt = $conn->prepare($removeProc);
|
$stmt = $conn->prepare($removeProc);
|
||||||
@@ -112,16 +111,16 @@ class patch_380a3 implements patchInterface
|
|||||||
$stmt = $conn->prepare($procedure);
|
$stmt = $conn->prepare($procedure);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
unset($stmt);
|
|
||||||
|
|
||||||
$sql = "CALL explode_log_table(',')";
|
$sql = "CALL explode_log_table(',')";
|
||||||
$stmt = $conn->prepare($sql);
|
$stmt = $conn->prepare($sql);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
unset($stmt);
|
|
||||||
} catch (\PDOEXception $e) {
|
|
||||||
return false;
|
$stmt = $conn->prepare($removeProc);
|
||||||
}
|
$stmt->execute();
|
||||||
|
$stmt->closeCursor();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user