ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.LinkDBUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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 $field = array(
38 'type' => 'text',
39 'length' => 10,
40 'notnull' => true
41 );
42
43 $this->db->modifyTableColumn("int_link", "target_type", $field);
44 }
45
46 public function step_2(): void
47 {
48 $this->db->update(
49 "int_link",
50 [
51 "target_type" => ["text", "wpage"]
52 ],
53 [ // where
54 "target_type" => ["text", "wpag"]
55 ]
56 );
57 }
58}
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...