improve abconfig queries

This commit is contained in:
Mario Vavti
2018-05-20 20:48:52 +02:00
parent 9e1af2492f
commit 55e1026c98
3 changed files with 30 additions and 3 deletions

28
Zotlabs/Update/_1213.php Normal file
View File

@@ -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;
}
}
}
}