]> git.mxchange.org Git - friendica.git/commitdiff
Add some more tables to remove orphans
authorMichael <heluecht@pirati.ca>
Thu, 7 Jan 2021 18:24:26 +0000 (18:24 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 7 Jan 2021 18:24:26 +0000 (18:24 +0000)
update.php

index ffcfa6a90f82c169c6589bc5cce1c96379d723c3..b5d17848941bfa18994dc445454c910a72f2c799 100644 (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;
        }