ILIAS  release_8 Revision v8.24
class.ilCalendarDBUpdateSteps8.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types=1);
19
24{
25 protected \ilDBInterface $db;
26
27 public function prepare(\ilDBInterface $db): void
28 {
29 $this->db = $db;
30 }
31
32 public function step_1(): void
33 {
34 // Add indices
35 if (!$this->db->indexExistsByFields('cal_entries', ['starta'])) {
36 $this->db->addIndex('cal_entries', ['starta'], 'i3');
37 }
38 if (!$this->db->indexExistsByFields('cal_entries', ['enda'])) {
39 $this->db->addIndex('cal_entries', ['enda'], 'i4');
40 }
41 }
42
43 public function step_2(): void
44 {
45 $this->db->modifyTableColumn(
46 'cal_entries',
47 'title',
48 [
49 'length' => 255
50 ]
51 );
52 }
53
54 public function step_3(): void
55 {
56 $this->db->modifyTableColumn(
57 'cal_categories',
58 'title',
59 [
60 'length' => 255
61 ]
62 );
63 }
64}
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...