diff --git a/components/ILIAS/BackgroundTasks_/classes/Setup/class.ilBackgroundTasksDB80.php b/components/ILIAS/BackgroundTasks_/classes/Setup/class.ilBackgroundTasksDBHotfixes10.php similarity index 60% rename from components/ILIAS/BackgroundTasks_/classes/Setup/class.ilBackgroundTasksDB80.php rename to components/ILIAS/BackgroundTasks_/classes/Setup/class.ilBackgroundTasksDBHotfixes10.php index cf586b968fe2..74db2c229b11 100755 --- a/components/ILIAS/BackgroundTasks_/classes/Setup/class.ilBackgroundTasksDB80.php +++ b/components/ILIAS/BackgroundTasks_/classes/Setup/class.ilBackgroundTasksDBHotfixes10.php @@ -16,10 +16,9 @@ * *********************************************************************/ -use ILIAS\Setup; -use ILIAS\Data\Password; +declare(strict_types=1); -class ilBackgroundTasksDB80 implements ilDatabaseUpdateSteps +class ilBackgroundTasksDBHotfixes10 implements ilDatabaseUpdateSteps { protected ilDBInterface $db; @@ -30,8 +29,16 @@ public function prepare(ilDBInterface $db): void public function step_1(): void { - if (!$this->db->indexExistsByFields('il_bt_bucket', ['user_id'])) { - $this->db->addIndex('il_bt_bucket', ['user_id'], 'i1'); + if (!$this->db->indexExistsByFields('il_bt_bucket', ['user_id', 'state'])) { + $this->db->addIndex('il_bt_bucket', ['user_id', 'state'], 'i1'); + } + + if (!$this->db->indexExistsByFields('il_bt_task', ['bucket_id'])) { + $this->db->addIndex('il_bt_task', ['bucket_id'], 'i1'); + } + + if (!$this->db->indexExistsByFields('il_bt_value_to_task', ['bucket_id'])) { + $this->db->addIndex('il_bt_value_to_task', ['bucket_id'], 'i1'); } } }