]> git.mxchange.org Git - friendica.git/blobdiff - update.php
More foreign keys added, one removed
[friendica.git] / update.php
index f163faf02f9ef740ebc69a3e2d2b24a1d58714e2..775262297db9459f039738b363ce95719aa9b3c2 100644 (file)
@@ -736,3 +736,15 @@ function pre_update_1364()
 
        return Update::SUCCESS;
 }
+
+function pre_update_1365()
+{
+       if (!DBA::e("DELETE FROM `notify-threads` WHERE NOT `notify-id` IN (SELECT `id` FROM `notify`)")) {
+               return Update::FAILED;
+       }
+
+       if (!DBA::e("DELETE FROM `thread` WHERE NOT `iid` IN (SELECT `id` FROM `item`)")) {
+               return Update::FAILED;
+       }
+
+}
\ No newline at end of file