Fix #1477 : let the upgrade crash if the upgrade procedure fails

This commit is contained in:
Romain Neutron
2013-09-19 13:55:58 +02:00
parent 1fb7390a92
commit 87d6dddddf

View File

@@ -58,7 +58,6 @@ class patch_380a3 implements patchInterface
{
$conn = $databox->get_connection();
try {
$removeProc = "DROP PROCEDURE IF EXISTS explode_log_table";
$stmt = $conn->prepare($removeProc);
@@ -112,16 +111,16 @@ class patch_380a3 implements patchInterface
$stmt = $conn->prepare($procedure);
$stmt->execute();
$stmt->closeCursor();
unset($stmt);
$sql = "CALL explode_log_table(',')";
$stmt = $conn->prepare($sql);
$stmt->execute();
$stmt->closeCursor();
unset($stmt);
} catch (\PDOEXception $e) {
return false;
}
$stmt = $conn->prepare($removeProc);
$stmt->execute();
$stmt->closeCursor();
return true;
}