The table "item-delivery-data" does not exist on newer systems

This commit is contained in:
Michael 2020-08-22 05:22:08 +00:00
parent 61a2b225bb
commit dcfde52e7f
2 changed files with 13 additions and 1 deletions

View File

@ -456,6 +456,11 @@ class PostUpdate
return true; return true;
} }
if (!DBStructure::existsTable('item-delivery-data')) {
DI::config()->set('system', 'post_update_version', 1297);
return true;
}
$max_item_delivery_data = DBA::selectFirst('item-delivery-data', ['iid'], ['queue_count > 0 OR queue_done > 0'], ['order' => ['iid']]); $max_item_delivery_data = DBA::selectFirst('item-delivery-data', ['iid'], ['queue_count > 0 OR queue_done > 0'], ['order' => ['iid']]);
$max_iid = $max_item_delivery_data['iid']; $max_iid = $max_item_delivery_data['iid'];
@ -700,6 +705,11 @@ class PostUpdate
return true; return true;
} }
if (!DBStructure::existsTable('item-delivery-data')) {
DI::config()->set('system', 'post_update_version', 1345);
return true;
}
$id = DI::config()->get('system', 'post_update_version_1345_id', 0); $id = DI::config()->get('system', 'post_update_version_1345_id', 0);
Logger::info('Start', ['item' => $id]); Logger::info('Start', ['item' => $id]);

View File

@ -348,7 +348,9 @@ function update_1309()
function update_1315() function update_1315()
{ {
DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]); if (DBStructure::existsTable('item-delivery-data')) {
DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]);
}
return Update::SUCCESS; return Update::SUCCESS;
} }