diff options
author | Mario <mario@mariovavti.com> | 2021-12-17 19:52:54 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-12-17 19:52:54 +0100 |
commit | 2bd69495d2bfce0481e47421cee700aa08eee54f (patch) | |
tree | 26fc29ea305197da55c0a666561a3dbac64e2402 /Zotlabs/Update/_1250.php | |
parent | bfd3da43ac9226e53188a03ff1414a18422e91b4 (diff) | |
download | volse-hubzilla-2bd69495d2bfce0481e47421cee700aa08eee54f.tar.gz volse-hubzilla-2bd69495d2bfce0481e47421cee700aa08eee54f.tar.bz2 volse-hubzilla-2bd69495d2bfce0481e47421cee700aa08eee54f.zip |
missing file
Diffstat (limited to 'Zotlabs/Update/_1250.php')
-rw-r--r-- | Zotlabs/Update/_1250.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1250.php b/Zotlabs/Update/_1250.php new file mode 100644 index 000000000..bc50479d4 --- /dev/null +++ b/Zotlabs/Update/_1250.php @@ -0,0 +1,31 @@ +<?php + +namespace Zotlabs\Update; + +class _1250 { + + function run() { + + dbq("START TRANSACTION"); + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = dbq("ALTER TABLE atoken ADD atoken_guid VARCHAR(255) NOT NULL DEFAULT ''"); + $r2 = dbq("CREATE INDEX \"atoken_guid\" ON atoken (\"atoken_guid\")"); + $r = ($r1 && $r2); + } + else { + $r = dbq("ALTER TABLE `atoken` ADD `atoken_guid` CHAR(191) NOT NULL DEFAULT '' , + ADD INDEX `atoken_guid` (`atoken_guid`)"); + } + + if($r) { + dbq("COMMIT"); + return UPDATE_SUCCESS; + } + + dbq("ROLLBACK"); + return UPDATE_FAILED; + + } + +} |