ILIAS  release_8 Revision v8.24
class.ilAdministrationDBUpdateSteps.php
Go to the documentation of this file.
1<?php
2
20
25{
26 protected \ilDBInterface $db;
27
28 public function prepare(\ilDBInterface $db): void
29 {
30 $this->db = $db;
31 }
32
33 public function step_1(): void
34 {
35 $this->db->addTableColumn(
36 'settings',
37 'value2',
38 array( "type" => "text",
39 "length" => 4000,
40 "notnull" => false,
41 "default" => null)
42 );
43
44 $this->db->query("UPDATE settings SET value2 = SUBSTRING(value, 1, 4000)");
45 $this->db->dropTableColumn('settings', 'value');
46 $this->db->renameTableColumn('settings', 'value2', 'value');
47 }
48}
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:19