ILIAS  release_8 Revision v8.24
class.ilBookingManagerDBUpdateSteps.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
27{
28 protected \ilDBInterface $db;
29
30 public function prepare(\ilDBInterface $db): void
31 {
32 $this->db = $db;
33 }
34
35 public function step_1(): void
36 {
37 if (!$this->db->indexExistsByFields('booking_reservation', ['context_obj_id'])) {
38 $this->db->addIndex('booking_reservation', ['context_obj_id'], 'i5');
39 }
40 }
41
42 public function step_2(): void
43 {
44 if (!$this->db->indexExistsByFields('booking_schedule', ['pool_id'])) {
45 $this->db->addIndex('booking_schedule', ['pool_id'], 'i1');
46 }
47 }
48
49 public function step_3(): void
50 {
51 if (!$this->db->indexExistsByFields('booking_object', ['schedule_id'])) {
52 $this->db->addIndex('booking_object', ['schedule_id'], 'i2');
53 }
54 }
55}
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: class.Agent.php:21