aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1213.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-05-20 20:48:52 +0200
committerMario Vavti <mario@mariovavti.com>2018-05-20 22:55:01 +0200
commit43f04e4bc0b041a4e6450f6aad3e9045fb5eb3cf (patch)
treef2927f1d806f7a27a1c2722e8cabf0745343b866 /Zotlabs/Update/_1213.php
parent649260ce44837fa8477ae1f13469b8d77ca96ec6 (diff)
downloadvolse-hubzilla-43f04e4bc0b041a4e6450f6aad3e9045fb5eb3cf.tar.gz
volse-hubzilla-43f04e4bc0b041a4e6450f6aad3e9045fb5eb3cf.tar.bz2
volse-hubzilla-43f04e4bc0b041a4e6450f6aad3e9045fb5eb3cf.zip
improve abconfig queries
Diffstat (limited to 'Zotlabs/Update/_1213.php')
-rw-r--r--Zotlabs/Update/_1213.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1213.php b/Zotlabs/Update/_1213.php
new file mode 100644
index 000000000..d396829a6
--- /dev/null
+++ b/Zotlabs/Update/_1213.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1213 {
+
+ function run() {
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ q("START TRANSACTION");
+
+ $r = q("ALTER TABLE abconfig
+ DROP INDEX chan,
+ DROP INDEX xchan,
+ ADD INDEX chan_xchan (chan, xchan)
+ ");
+
+ if($r) {
+ q("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+ else {
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+ }
+ }
+ }
+
+}