aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1218.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-10-19 11:18:28 +0200
committerMario Vavti <mario@mariovavti.com>2018-10-19 11:18:28 +0200
commitfa9e9510e5d993d183feb942fe74be5fdd07f5cf (patch)
tree41fec09f527a9346e043b8099b458a97d81b03ed /Zotlabs/Update/_1218.php
parent32de123db0ac526795a237ff46885fe8a332cbc0 (diff)
parent06b3ad1071c755757555baf941e2c0f446f97b21 (diff)
downloadvolse-hubzilla-3.8.tar.gz
volse-hubzilla-3.8.tar.bz2
volse-hubzilla-3.8.zip
Merge branch '3.8RC'3.8
Diffstat (limited to 'Zotlabs/Update/_1218.php')
-rw-r--r--Zotlabs/Update/_1218.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1218.php b/Zotlabs/Update/_1218.php
new file mode 100644
index 000000000..07c7dba20
--- /dev/null
+++ b/Zotlabs/Update/_1218.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1218 {
+
+ function run() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r1 = q("ALTER TABLE hubloc add hubloc_id_url text NOT NULL DEFAULT ''");
+ $r2 = q("create index \"hubloc_id_url\" on hubloc (\"hubloc_id_url\")");
+ $r3 = q("ALTER TABLE hubloc add hubloc_site_id text NOT NULL DEFAULT ''");
+ $r4 = q("create index \"hubloc_site_id\" on hubloc (\"hubloc_site_id\")");
+
+ $r = $r1 && $r2 && $r3 && $r4;
+ }
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ $r1 = q("ALTER TABLE hubloc add hubloc_id_url varchar(191) NOT NULL, ADD INDEX hubloc_id_url (hubloc_id_url)");
+ $r2 = q("ALTER TABLE hubloc add hubloc_site_id varchar(191) NOT NULL, ADD INDEX hubloc_site_id (hubloc_site_id)");
+
+ $r = $r1 && $r2;
+ }
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+ }
+
+}