aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1205.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-03-13 10:59:21 +0100
committerGitHub <noreply@github.com>2018-03-13 10:59:21 +0100
commit790660e61264ed884a8c600f407cf75893ffe977 (patch)
tree8fb3e4263cd7cdf4b34e0d7bb859c2f290c8ab39 /Zotlabs/Update/_1205.php
parent2bcfa0c12687d47c11e8c445a5a38ffe96d5c135 (diff)
parent53c1d3775cc140ecda50d837752adac851d9e0b2 (diff)
downloadvolse-hubzilla-790660e61264ed884a8c600f407cf75893ffe977.tar.gz
volse-hubzilla-790660e61264ed884a8c600f407cf75893ffe977.tar.bz2
volse-hubzilla-790660e61264ed884a8c600f407cf75893ffe977.zip
Merge pull request #18 from redmatrix/dev
Dev
Diffstat (limited to 'Zotlabs/Update/_1205.php')
-rw-r--r--Zotlabs/Update/_1205.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1205.php b/Zotlabs/Update/_1205.php
new file mode 100644
index 000000000..968833726
--- /dev/null
+++ b/Zotlabs/Update/_1205.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1205 {
+
+ function run() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+
+ q("ALTER TABLE item DROP INDEX title");
+ q("ALTER TABLE item DROP INDEX body");
+ q("ALTER TABLE item DROP INDEX allow_cid");
+ q("ALTER TABLE item DROP INDEX allow_gid");
+ q("ALTER TABLE item DROP INDEX deny_cid");
+ q("ALTER TABLE item DROP INDEX deny_gid");
+ q("ALTER TABLE item DROP INDEX item_flags");
+ q("ALTER TABLE item DROP INDEX item_restrict");
+ q("ALTER TABLE item DROP INDEX aid");
+
+ $r = q("ALTER TABLE item
+ DROP INDEX item_private,
+ ADD INDEX uid_item_private (uid, item_private),
+ ADD INDEX item_wall (item_wall),
+ ADD INDEX item_pending_remove_changed (item_pending_remove, changed)
+ ");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+ }
+ else {
+ return UPDATE_SUCCESS;
+ }
+
+ }
+
+}