ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
45 public function step_2(): void
46 {
47 $this->db->modifyTableColumn("object_data", "import_id", [
48 "type" => \ilDBConstants::T_TEXT,
49 "length" => 255,
50 "notnull" => false
51 ]);
52 }
53}
General purpose update steps for weblinks.
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
step_2()
Increases the maximum length of object import-ids from 50 to 255 characters.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...