Issue 9746: Delete uri-id orphans
This commit is contained in:
parent
2ae8e5d34e
commit
2f52afeeac
|
@ -831,6 +831,10 @@ function pre_update_1377()
|
|||
return Update::FAILED;
|
||||
}
|
||||
|
||||
if (!DBA::e("DELETE FROM `diaspora-interaction` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`)")) {
|
||||
return Update::FAILED;
|
||||
}
|
||||
|
||||
if (!DBA::e("DELETE FROM `notify` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`)")) {
|
||||
return Update::FAILED;
|
||||
}
|
||||
|
@ -838,7 +842,6 @@ function pre_update_1377()
|
|||
if (!DBA::e("UPDATE `notify` SET `parent-uri-id` = NULL WHERE `parent-uri-id` = 0")) {
|
||||
return Update::FAILED;
|
||||
}
|
||||
|
||||
if (!DBA::e("DELETE FROM `notify` WHERE `parent-uri-id` NOT IN (SELECT `id` FROM `item-uri`)")) {
|
||||
return Update::FAILED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue