ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Test\Setup\Test9DBUpdateSteps Class Reference
+ Inheritance diagram for ILIAS\Test\Setup\Test9DBUpdateSteps:
+ Collaboration diagram for ILIAS\Test\Setup\Test9DBUpdateSteps:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 Drop the test settings for the special character seletor. More...
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
 step_10 ()
 
 step_11 ()
 
 step_12 ()
 
 step_13 ()
 
 step_14 ()
 
 step_15 ()
 
 step_16 ()
 
 step_17 ()
 
 step_18 ()
 
 step_19 ()
 
 step_20 ()
 
 step_22 ()
 
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 23 of file Test9DBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\Test\Setup\Test9DBUpdateSteps::prepare ( \ilDBInterface  $db)

Prepare the execution of the steps.

Do not use anything from the globals or the DIC inside your steps, only use the instance of the database provided here.

Implements ilDatabaseUpdateSteps.

Definition at line 27 of file Test9DBUpdateSteps.php.

27 : void
28 {
29 $this->db = $db;
30 }

References ILIAS\Test\Setup\Test9DBUpdateSteps\$db.

◆ step_1()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_1 ( )

Definition at line 32 of file Test9DBUpdateSteps.php.

32 : void
33 {
34 if ($this->db->tableColumnExists('tst_tests', 'show_examview_pdf')) {
35 $this->db->dropTableColumn('tst_tests', 'show_examview_pdf');
36 }
37 }

◆ step_10()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_10 ( )

Definition at line 198 of file Test9DBUpdateSteps.php.

198 : void
199 {
200 if ($this->db->tableColumnExists('tst_tests', 'sign_submission')) {
201 $this->db->dropTableColumn(
202 'tst_tests',
203 'sign_submission'
204 );
205 }
206 }

◆ step_11()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_11 ( )

Definition at line 208 of file Test9DBUpdateSteps.php.

208 : void
209 {
210 if ($this->db->tableColumnExists('tst_tests', 'show_summary')) {
211 $this->db->renameTableColumn(
212 'tst_tests',
213 'show_summary',
214 'usr_pass_overview_mode'
215 );
216 }
217 }

◆ step_12()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_12 ( )

Definition at line 219 of file Test9DBUpdateSteps.php.

219 : void
220 {
221 if (!$this->db->tableColumnExists('tst_tests', 'show_questionlist')) {
222 $this->db->addTableColumn(
223 'tst_tests',
224 'show_questionlist',
225 [
226 'type' => 'integer',
227 'length' => 1
228 ]
229 );
230 }
231 }

◆ step_13()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_13 ( )

Definition at line 233 of file Test9DBUpdateSteps.php.

233 : void
234 {
235 if (!$this->db->tableColumnExists('tst_tests', 'hide_info_tab')) {
236 $this->db->addTableColumn('tst_tests', 'hide_info_tab', [
237 'type' => 'integer',
238 'length' => 1,
239 'default' => 0,
240 'notnull' => true
241 ]);
242 }
243
244 if (!$this->db->tableColumnExists('tst_tests', 'conditions_checkbox_enabled')) {
245 $this->db->addTableColumn('tst_tests', 'conditions_checkbox_enabled', [
246 'type' => 'integer',
247 'length' => 1,
248 'default' => 0,
249 'notnull' => true
250 ]);
251 }
252 }

◆ step_14()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_14 ( )

Definition at line 254 of file Test9DBUpdateSteps.php.

254 : void
255 {
256 if ($this->db->tableColumnExists('tst_tests', 'hide_info_tab')) {
257 $this->db->modifyTableColumn('tst_tests', 'hide_info_tab', [
258 'type' => 'integer',
259 'length' => 1,
260 'default' => 0,
261 'notnull' => true
262 ]);
263 }
264
265 if ($this->db->tableColumnExists('tst_tests', 'conditions_checkbox_enabled')) {
266 $this->db->modifyTableColumn('tst_tests', 'conditions_checkbox_enabled', [
267 'type' => 'integer',
268 'length' => 1,
269 'default' => 0,
270 'notnull' => true
271 ]);
272 }
273 }

◆ step_15()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_15 ( )

Definition at line 275 of file Test9DBUpdateSteps.php.

275 : void
276 {
277 if ($this->db->tableColumnExists('tst_tests', 'result_tax_filters')) {
278 $this->db->dropTableColumn('tst_tests', 'result_tax_filters');
279 }
280 }

◆ step_16()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_16 ( )

Definition at line 282 of file Test9DBUpdateSteps.php.

282 : void
283 {
284 if ($this->db->tableColumnExists('tst_tests', 'show_cancel')) {
285 $this->db->modifyTableColumn(
286 'tst_tests',
287 'show_cancel',
288 [
289 'type' => 'text',
290 'length' => 1,
291 'default' => '0'
292 ]
293 );
294 }
295 }

◆ step_17()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_17 ( )

Definition at line 297 of file Test9DBUpdateSteps.php.

297 : void
298 {
299 if ($this->db->tableColumnExists('tst_tests', 'use_previous_answers')) {
300 $this->db->modifyTableColumn(
301 'tst_tests',
302 'use_previous_answers',
303 [
304 'type' => 'text',
305 'length' => 1,
306 'default' => '0'
307 ]
308 );
309 }
310 }

◆ step_18()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_18 ( )

Definition at line 313 of file Test9DBUpdateSteps.php.

313 : void
314 {
315 if ($this->db->tableColumnExists('tst_tests', 'show_cancel')) {
316 $this->db->renameTableColumn(
317 'tst_tests',
318 'show_cancel',
319 'suspend_test_allowed'
320 );
321 }
322 }

◆ step_19()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_19 ( )

Definition at line 324 of file Test9DBUpdateSteps.php.

324 : void
325 {
326 if (!$this->db->tableExists('tst_qst_var_presented')) {
327 $this->db->createTable('tst_qst_var_presented', [
328 'question_id' => [
329 'type' => 'integer',
330 'length' => 8,
331 'notnull' => true
332 ],
333 'active_id' => [
334 'type' => 'integer',
335 'length' => 8,
336 'notnull' => true
337 ],
338 'pass' => [
339 'type' => 'integer',
340 'length' => 8,
341 'notnull' => true
342 ],
343 'variable' => [
344 'type' => 'text',
345 'length' => 32,
346 'notnull' => true
347 ],
348 'value' => [
349 'type' => 'text',
350 'length' => 64,
351 'notnull' => true
352 ]
353 ]);
354 $this->db->addPrimaryKey(
355 'tst_qst_var_presented',
356 ['question_id','active_id','pass','variable']
357 );
358 }
359 }

◆ step_2()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_2 ( )

Definition at line 39 of file Test9DBUpdateSteps.php.

39 : void
40 {
41 if (!$this->db->tableExists('manscoring_done')) {
42 $this->db->createTable('manscoring_done', [
43 'active_id' => [
44 'type' => 'integer',
45 'length' => 8,
46 'notnull' => true
47 ],
48 'done' => [
49 'type' => 'integer',
50 'length' => 1,
51 'notnull' => true,
52 'default' => 0
53 ]
54 ]);
55 $this->db->addPrimaryKey('manscoring_done', ['active_id']);
56 }
57 }

◆ step_20()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_20 ( )

Definition at line 361 of file Test9DBUpdateSteps.php.

361 : void
362 {
363 $this->db->manipulate('UPDATE tst_pass_result SET points = 0 WHERE points < 0');
364 $this->db->manipulate('UPDATE tst_result_cache SET reached_points = 0 WHERE reached_points < 0');
365 }

◆ step_22()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_22 ( )

Definition at line 367 of file Test9DBUpdateSteps.php.

367 : void
368 {
369 $this->db->modifyTableColumn(
370 'tst_tests',
371 'starting_time',
372 [
373 'length' => 8
374 ]
375 );
376 $this->db->modifyTableColumn(
377 'tst_tests',
378 'ending_time',
379 [
380 'length' => 8
381 ]
382 );
383 }

◆ step_3()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_3 ( )

Drop the test settings for the special character seletor.

Definition at line 62 of file Test9DBUpdateSteps.php.

62 : void
63 {
64 if ($this->db->tableColumnExists('tst_tests', 'char_selector_availability')) {
65 $this->db->dropTableColumn('tst_tests', 'char_selector_availability');
66 }
67
68 if ($this->db->tableColumnExists('tst_tests', 'char_selector_definition')) {
69 $this->db->dropTableColumn('tst_tests', 'char_selector_definition');
70 }
71 }

◆ step_4()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_4 ( )

Definition at line 73 of file Test9DBUpdateSteps.php.

73 : void
74 {
75 if (!$this->db->tableColumnExists('tst_tests', 'introduction_page_id')) {
76 $this->db->addTableColumn(
77 'tst_tests',
78 'introduction_page_id',
79 [
80 'type' => 'integer',
81 'length' => 8
82 ]
83 );
84 }
85 if (!$this->db->tableColumnExists('tst_tests', 'concluding_remarks_page_id')) {
86 $this->db->addTableColumn(
87 'tst_tests',
88 'concluding_remarks_page_id',
89 [
90 'type' => 'integer',
91 'length' => 8
92 ]
93 );
94 }
95 }

◆ step_5()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_5 ( )

Definition at line 97 of file Test9DBUpdateSteps.php.

97 : void
98 {
99 if ($this->db->tableColumnExists('tst_tests', 'show_examview_html')) {
100 $this->db->dropTableColumn(
101 'tst_tests',
102 'show_examview_html'
103 );
104 }
105 if ($this->db->tableColumnExists('tst_tests', 'showinfo')) {
106 $this->db->dropTableColumn(
107 'tst_tests',
108 'showinfo'
109 );
110 }
111 if ($this->db->tableColumnExists('tst_tests', 'forcejs')) {
112 $this->db->dropTableColumn(
113 'tst_tests',
114 'forcejs'
115 );
116 }
117 if ($this->db->tableColumnExists('tst_tests', 'enable_archiving')) {
118 $this->db->dropTableColumn(
119 'tst_tests',
120 'enable_archiving'
121 );
122 }
123 if ($this->db->tableColumnExists('tst_tests', 'customstyle')) {
124 $this->db->dropTableColumn(
125 'tst_tests',
126 'customstyle'
127 );
128 }
129 if ($this->db->tableColumnExists('tst_tests', 'enabled_view_mode')) {
130 $this->db->dropTableColumn(
131 'tst_tests',
132 'enabled_view_mode'
133 );
134 }
135 }

◆ step_6()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_6 ( )

Definition at line 137 of file Test9DBUpdateSteps.php.

137 : void
138 {
139 if ($this->db->tableColumnExists('tst_tests', 'allowedusers')) {
140 $this->db->dropTableColumn('tst_tests', 'allowedusers');
141 }
142
143 if ($this->db->tableColumnExists('tst_tests', 'alloweduserstimegap')) {
144 $this->db->dropTableColumn('tst_tests', 'alloweduserstimegap');
145 }
146
147 if ($this->db->tableColumnExists('tst_tests', 'limit_users_enabled')) {
148 $this->db->dropTableColumn('tst_tests', 'limit_users_enabled');
149 }
150 }

◆ step_7()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_7 ( )

Definition at line 152 of file Test9DBUpdateSteps.php.

152 : void
153 {
154 if ($this->db->tableExists('tst_dyn_quest_set_cfg')) {
155 $this->db->dropTable('tst_dyn_quest_set_cfg');
156 }
157 if ($this->db->tableExists('tst_seq_qst_tracking')) {
158 $this->db->dropTable('tst_seq_qst_tracking');
159 }
160 if ($this->db->tableExists('tst_seq_qst_answstatus')) {
161 $this->db->dropTable('tst_seq_qst_answstatus');
162 }
163 if ($this->db->tableExists('tst_seq_qst_postponed')) {
164 $this->db->dropTable('tst_seq_qst_postponed');
165 }
166 }

◆ step_8()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_8 ( )

Definition at line 168 of file Test9DBUpdateSteps.php.

168 : void
169 {
170 if ($this->db->tableColumnExists('tst_tests', 'redirection_url')) {
171 $this->db->modifyTableColumn(
172 'tst_tests',
173 'redirection_url',
174 [
175 'type' => 'text',
176 'length' => 4000,
177 'notnull' => false,
178 'default' => null
179 ]
180 );
181 }
182 }

◆ step_9()

ILIAS\Test\Setup\Test9DBUpdateSteps::step_9 ( )

Definition at line 184 of file Test9DBUpdateSteps.php.

184 : void
185 {
186 if (!$this->db->tableColumnExists('tst_tests', 'show_questionlist')) {
187 $this->db->addTableColumn(
188 'tst_tests',
189 'show_questionlist',
190 [
191 'type' => 'integer',
192 'length' => 1
193 ]
194 );
195 }
196 }

Field Documentation

◆ $db

ilDBInterface ILIAS\Test\Setup\Test9DBUpdateSteps::$db
protected

Definition at line 25 of file Test9DBUpdateSteps.php.

Referenced by ILIAS\Test\Setup\Test9DBUpdateSteps\prepare().


The documentation for this class was generated from the following file: