aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-05-07 15:02:55 +0000
committerMario <mario@mariovavti.com>2021-05-07 15:02:55 +0000
commitc2e007a8392be62c2698e5519b6d0dc0ec92a92b (patch)
treee7e2916e8c2546bb2dedaa3f23b61fc26366f71a /Zotlabs
parentebd0333256b8209de958085057848b649dbd9283 (diff)
downloadvolse-hubzilla-c2e007a8392be62c2698e5519b6d0dc0ec92a92b.tar.gz
volse-hubzilla-c2e007a8392be62c2698e5519b6d0dc0ec92a92b.tar.bz2
volse-hubzilla-c2e007a8392be62c2698e5519b6d0dc0ec92a92b.zip
update 1245 to fix hubloc_hash index for postgres
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Update/_1245.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1245.php b/Zotlabs/Update/_1245.php
new file mode 100644
index 000000000..8212fde08
--- /dev/null
+++ b/Zotlabs/Update/_1245.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1245 {
+
+ function run() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ return UPDATE_SUCCESS;
+ }
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ q("START TRANSACTION");
+
+ $r = dbq("create index hubloc_hash on hubloc (hubloc_hash)");
+
+ if($r) {
+ q("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+ }
+
+ }
+
+}