Browse Source

Add some more tables to remove orphans

pull/9759/head
Michael 2 weeks ago
parent
commit
a119c030fd
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      update.php

+ 8
- 0
update.php 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;
}

Loading…
Cancel
Save