From 2d9fe72215f0853f9234f57466095ee762253d82 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 6 Oct 2018 23:10:52 +0200 Subject: return success for postgres --- Zotlabs/Update/_1224.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Zotlabs/Update/_1224.php b/Zotlabs/Update/_1224.php index d687afce7..d160cea5d 100644 --- a/Zotlabs/Update/_1224.php +++ b/Zotlabs/Update/_1224.php @@ -5,21 +5,24 @@ namespace Zotlabs\Update; class _1224 { function run() { - q("START TRANSACTION"); - if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { + q("START TRANSACTION"); + $r1 = q("ALTER TABLE hubloc ALTER hubloc_id_url SET DEFAULT ''"); $r2 = q("ALTER TABLE hubloc ALTER hubloc_site_id SET DEFAULT ''"); - } - if($r1 && $r2) { - q("COMMIT"); + if($r1 && $r2) { + q("COMMIT"); + return UPDATE_SUCCESS; + } + + q("ROLLBACK"); + return UPDATE_FAILED; + } + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { return UPDATE_SUCCESS; } - q("ROLLBACK"); - return UPDATE_FAILED; - } } -- cgit v1.2.3