2018-05-20 18:48:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Update;
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class _1213
|
|
|
|
{
|
2018-05-20 18:48:52 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
if (ACTIVE_DBTYPE == DBTYPE_MYSQL) {
|
|
|
|
q("START TRANSACTION");
|
2018-05-20 18:48:52 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
$r = q("ALTER TABLE abconfig
|
2018-05-20 18:48:52 +00:00
|
|
|
DROP INDEX chan,
|
|
|
|
DROP INDEX xchan,
|
|
|
|
ADD INDEX chan_xchan (chan, xchan)
|
|
|
|
");
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
if ($r) {
|
|
|
|
q("COMMIT");
|
|
|
|
return UPDATE_SUCCESS;
|
|
|
|
} else {
|
|
|
|
q("ROLLBACK");
|
|
|
|
return UPDATE_FAILED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-05-20 18:48:52 +00:00
|
|
|
}
|