Ensure to only execute this if the table exists

This commit is contained in:
Michael 2021-01-07 18:13:40 +00:00
parent 2f52afeeac
commit 9ba2bd0736

View File

@ -831,7 +831,7 @@ function pre_update_1377()
return Update::FAILED;
}
if (!DBA::e("DELETE FROM `diaspora-interaction` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`)")) {
if (DBStructure::existsTable('diaspora-interaction') && !DBA::e("DELETE FROM `diaspora-interaction` WHERE `uri-id` NOT IN (SELECT `id` FROM `item-uri`)")) {
return Update::FAILED;
}