ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCtrlDatabaseUpdateSteps.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
32 private ?ilDBInterface $database = null;
33
37 public function prepare(ilDBInterface $db): void
38 {
39 $this->database = $db;
40 }
41
46 public function step_1(): void
47 {
48 $this->abortIfNotPrepared();
49 if ($this->database->tableExists('ctrl_calls')) {
50 $this->database->dropTable('ctrl_calls');
51 }
52 }
53
58 public function step_2(): void
59 {
60 $this->abortIfNotPrepared();
61 if ($this->database->tableExists('ctrl_classfile')) {
62 $this->database->dropTable('ctrl_classfile');
63 }
64 }
65
70 public function step_3(): void
71 {
72 $this->abortIfNotPrepared();
73 if ($this->database->tableExists('ctrl_structure')) {
74 $this->database->dropTable('ctrl_structure');
75 }
76 }
77
82 public function step_4(): void
83 {
84 $this->abortIfNotPrepared();
85 if ($this->database->tableExists('il_request_token')) {
86 $this->database->dropTable('il_request_token');
87 }
88 }
89
94 public function step_5(): void
95 {
96 $this->abortIfNotPrepared();
97 if ($this->database->tableExists('service_class')) {
98 $this->database->dropTable('service_class');
99 }
100 }
101
106 public function step_6(): void
107 {
108 $this->abortIfNotPrepared();
109 if ($this->database->tableExists('module_class')) {
110 $this->database->dropTable('module_class');
111 }
112 }
113
121 private function abortIfNotPrepared(): void
122 {
123 if (null === $this->database) {
124 throw new LogicException(self::class . "::prepare() must be called before db-update-steps execution.");
125 }
126 }
127}
Class ilCtrlDatabaseUpdateSteps holds the database update- steps affecting ilCtrl tables.
step_4()
Deletes the table 'il_request_token' from the database, since tokens are now stored in the ILIAS sess...
step_1()
Deletes the table 'ctrl_calls' from the database, as it is no longer needed.
step_2()
Deletes the table 'ctrl_classfile' from the database, as it is no longer needed.
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
prepare(ilDBInterface $db)
@inheritDoc
step_3()
Deletes the table 'ctrl_structure' from the database, as it is no longer needed.
step_6()
Deletes the table 'module_class' from the database, since information is now stored in an artifact.
step_5()
Deletes the table 'service_class' from the database, since information is now stored in an artifact.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...