streams/Zotlabs/Update/_1200.php

25 lines
419 B
PHP
Raw Normal View History

<?php
namespace Zotlabs\Update;
2021-12-02 23:02:31 +00:00
class _1200
{
public function run()
{
2021-12-02 23:02:31 +00:00
if (ACTIVE_DBTYPE == DBTYPE_MYSQL) {
$r = q("ALTER TABLE item
DROP INDEX item_type,
ADD INDEX uid_item_type (uid, item_type)
");
2021-12-03 03:01:39 +00:00
if ($r) {
2021-12-02 23:02:31 +00:00
return UPDATE_SUCCESS;
2021-12-03 03:01:39 +00:00
}
2021-12-02 23:02:31 +00:00
return UPDATE_FAILED;
} else {
return UPDATE_SUCCESS;
}
}
}