diff options
author | Mario <mario@mariovavti.com> | 2018-09-28 09:55:10 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-09-28 09:55:10 +0200 |
commit | 44bb0702030e0c7d6c15e1052b8c49d4cb109157 (patch) | |
tree | c780796b1736ffa9fa6afde5ac04d880940151dc /Zotlabs/Update | |
parent | 9e87219aead74791cdb68d4fa166326a0bd92d78 (diff) | |
download | volse-hubzilla-44bb0702030e0c7d6c15e1052b8c49d4cb109157.tar.gz volse-hubzilla-44bb0702030e0c7d6c15e1052b8c49d4cb109157.tar.bz2 volse-hubzilla-44bb0702030e0c7d6c15e1052b8c49d4cb109157.zip |
add transaction, commit and rollback to update 1221
Diffstat (limited to 'Zotlabs/Update')
-rw-r--r-- | Zotlabs/Update/_1221.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1221.php b/Zotlabs/Update/_1221.php index 252fcaa90..75b400adc 100644 --- a/Zotlabs/Update/_1221.php +++ b/Zotlabs/Update/_1221.php @@ -6,13 +6,18 @@ class _1221 { function run() { + q("START TRANSACTION"); + $r1 = q("ALTER table " . TQUOT . 'groups' . TQUOT . " rename to pgrp "); $r2 = q("ALTER table " . TQUOT . 'group_member' . TQUOT . " rename to pgrp_member "); if($r1 && $r2) { + q("COMMIT"); return UPDATE_SUCCESS; } + + q("ROLLBACK"); return UPDATE_FAILED; } |