Fix slow queries

This commit is contained in:
Michael 2021-03-01 22:19:47 +00:00
parent 0277c55c43
commit 5f48d6497e
6 changed files with 47 additions and 17 deletions

View file

@ -885,3 +885,19 @@ function update_1404()
DBA::update('workerqueue', ['parameter' => json_encode($parameters)], ['id' => $task['id']]);
}
}
function update_1407()
{
if (!DBA::e("UPDATE `post` SET `causer-id` = NULL WHERE `causer-id` = 0")) {
return Update::FAILED;
}
if (!DBA::e("UPDATE `post-user` SET `causer-id` = NULL WHERE `causer-id` = 0")) {
return Update::FAILED;
}
if (!DBA::e("UPDATE `post-thread` SET `causer-id` = NULL WHERE `causer-id` = 0")) {
return Update::FAILED;
}
if (!DBA::e("UPDATE `post-thread-user` SET `causer-id` = NULL WHERE `causer-id` = 0")) {
return Update::FAILED;
}
}