aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-08-13 21:18:20 -0700
committerzotlabs <mike@macgirvin.com>2018-08-13 21:18:20 -0700
commitf15c1c4e54a49d1e76747ca5e3034ca2cef909aa (patch)
tree417d40aaf26fa3be3f85072e6ef92e1267e4d956 /Zotlabs/Update
parent62925c4c3f0fb184c194f0cb177c1525ccdb72cb (diff)
downloadvolse-hubzilla-f15c1c4e54a49d1e76747ca5e3034ca2cef909aa.tar.gz
volse-hubzilla-f15c1c4e54a49d1e76747ca5e3034ca2cef909aa.tar.bz2
volse-hubzilla-f15c1c4e54a49d1e76747ca5e3034ca2cef909aa.zip
hubloc DB changes needed for z6
Diffstat (limited to 'Zotlabs/Update')
-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..67d8b49a5
--- /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");
+ $r2 = q("create index \"hubloc_id_url\" on hubloc (\"hubloc_id_url\")");
+ $r3 = q("ALTER TABLE hubloc add hubloc_site_id text NOT NULL");
+ $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;
+
+ }
+
+}