ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAdministrationDBUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
31{
32 protected ilDBInterface $db;
33
34 public function prepare(ilDBInterface $db): void
35 {
36 $this->db = $db;
37 }
38
39 public function step_1(): void
40 {
41 // note: release_8 has step_3 as step_1
42 }
43
44 public function step_2(): void
45 {
46 if ($this->db->sequenceExists("adm_settings_template")) {
47 $this->db->dropSequence("adm_settings_template");
48 }
49
50 if ($this->db->tableExists("adm_settings_template")) {
51 $this->db->dropTable("adm_settings_template");
52 }
53 }
54
55 public function step_3(): void
56 {
57 $this->db->addTableColumn(
58 'settings',
59 'value2',
60 array( "type" => "text",
61 "length" => 4000,
62 "notnull" => false,
63 "default" => null)
64 );
65
66 $this->db->query("UPDATE settings SET value2 = SUBSTRING(value, 1, 4000)");
67 $this->db->dropTableColumn('settings', 'value');
68 $this->db->renameTableColumn('settings', 'value2', 'value');
69 }
70
74 public function step_4(): void
75 {
76 $this->db->manipulate("DELETE FROM settings WHERE keyword LIKE 'char_selector%'");
77 }
78
82 public function step_5(): void
83 {
84 $this->db->manipulate("DELETE FROM settings WHERE module = 'MathJax'");
85 }
86}
step_4()
Remove the global special charactor selector settings.
step_5()
Remove the global special charactor selector settings.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...