1
0
Fork 0

Add some more tables to remove orphans

This commit is contained in:
Michael 2021-01-07 18:24:26 +00:00
parent 9ba2bd0736
commit a119c030fd

View file

@ -835,6 +835,14 @@ function pre_update_1377()
return Update::FAILED;
}
if (DBStructure::existsTable('item-activity') && !DBA::e("DELETE FROM `item-activity` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`)")) {
return Update::FAILED;
}
if (DBStructure::existsTable('item-content') && !DBA::e("DELETE FROM `item-content` 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;
}