diff options
author | Mario <mario@mariovavti.com> | 2023-05-17 13:28:23 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-05-17 13:28:23 +0000 |
commit | 65d98af24c3c7b784f7e2c95998df65901011ce3 (patch) | |
tree | d7d6a60698d7a0c3704ea55cb71c543285186b17 /Zotlabs/Update/_1257.php | |
parent | a57739c462a7991bf2130e8eca0c383eb276f0cd (diff) | |
parent | 62d35627f35537d0056482047e74a27ad837c3cf (diff) | |
download | volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.gz volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.tar.bz2 volse-hubzilla-65d98af24c3c7b784f7e2c95998df65901011ce3.zip |
Merge branch '8.4RC'8.4
Diffstat (limited to 'Zotlabs/Update/_1257.php')
-rw-r--r-- | Zotlabs/Update/_1257.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1257.php b/Zotlabs/Update/_1257.php new file mode 100644 index 000000000..34c10c372 --- /dev/null +++ b/Zotlabs/Update/_1257.php @@ -0,0 +1,33 @@ +<?php + +namespace Zotlabs\Update; + +class _1257 { + + function run() { + + dbq("START TRANSACTION"); + + $r1 = dbq("TRUNCATE TABLE updates"); + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r2 = dbq("ALTER TABLE updates add ud_host text NOT NULL DEFAULT ''"); + } + + if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { + $r2 = dbq("ALTER TABLE updates add ud_host varchar(191) NOT NULL DEFAULT ''"); + } + + $r3 = dbq("ALTER TABLE updates DROP COLUMN ud_guid"); + + if($r1 && $r2 && $r3) { + dbq("COMMIT"); + return UPDATE_SUCCESS; + } + + q("ROLLBACK"); + return UPDATE_FAILED; + + } + +} |