From f85cce714f91c877a86a57d95943d1ff7a22b31c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 6 Oct 2018 21:10:52 +0000 Subject: return success for postgres (cherry picked from commit 2d9fe72215f0853f9234f57466095ee762253d82) --- Zotlabs/Update/_1224.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Zotlabs/Update/_1224.php') 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