2018-02-28 09:21:22 +00:00
|
|
|
<?php
|
|
|
|
|
2022-02-16 04:08:28 +00:00
|
|
|
namespace Code\Update;
|
2018-02-28 09:21:22 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
class _1206
|
|
|
|
{
|
2018-02-28 09:21:22 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
public function run()
|
|
|
|
{
|
2018-02-28 09:21:22 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
if (ACTIVE_DBTYPE == DBTYPE_MYSQL) {
|
|
|
|
$r = q("ALTER TABLE item
|
2018-02-28 09:28:06 +00:00
|
|
|
ADD INDEX uid_resource_type (uid, resource_type)
|
2018-02-28 09:21:22 +00:00
|
|
|
");
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
2018-02-28 09:21:22 +00:00
|
|
|
}
|