aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-12-17 19:52:54 +0100
committerMario <mario@mariovavti.com>2021-12-17 19:52:54 +0100
commit2bd69495d2bfce0481e47421cee700aa08eee54f (patch)
tree26fc29ea305197da55c0a666561a3dbac64e2402 /Zotlabs/Update
parentbfd3da43ac9226e53188a03ff1414a18422e91b4 (diff)
downloadvolse-hubzilla-2bd69495d2bfce0481e47421cee700aa08eee54f.tar.gz
volse-hubzilla-2bd69495d2bfce0481e47421cee700aa08eee54f.tar.bz2
volse-hubzilla-2bd69495d2bfce0481e47421cee700aa08eee54f.zip
missing file
Diffstat (limited to 'Zotlabs/Update')
-rw-r--r--Zotlabs/Update/_1250.php31
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;
+
+ }
+
+}