ILIAS  release_8 Revision v8.24
class.ilWebResourceDBUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 protected \ilDBInterface $db;
28
29 public function prepare(\ilDBInterface $db): void
30 {
31 $this->db = $db;
32 }
33
34 public function step_1(): void
35 {
36 // Add index
37 if (!$this->db->indexExistsByFields('webr_items', ['webr_id'])) {
38 $this->db->addIndex('webr_items', ['webr_id'], 'i3');
39 }
40 }
41
42 public function step_2(): void
43 {
44 // Add combined index
45 // 32201
46 if (
47 $this->db->tableExists('webr_items') &&
48 !$this->db->indexExistsByFields('webr_items', ['webr_id', 'active'])
49 ) {
50 $this->db->addIndex('webr_items', ['webr_id', 'active'], 'i4');
51 }
52 }
53}
General purpose update steps for weblinks.
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...