The table "item-delivery-data" does not exist on newer systems
This commit is contained in:
parent
61a2b225bb
commit
dcfde52e7f
2 changed files with 13 additions and 1 deletions
|
@ -456,6 +456,11 @@ class PostUpdate
|
|||
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_iid = $max_item_delivery_data['iid'];
|
||||
|
||||
|
@ -700,6 +705,11 @@ class PostUpdate
|
|||
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);
|
||||
|
||||
Logger::info('Start', ['item' => $id]);
|
||||
|
|
|
@ -348,7 +348,9 @@ function update_1309()
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue