ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ilCourseObjectiveDBUpdateSteps.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
class
ilCourseObjectiveDBUpdateSteps
implements
ilDatabaseUpdateSteps
22
{
23
protected
ilDBInterface
$db
;
24
25
public
function
prepare
(
ilDBInterface
$db): void
26
{
27
$this->db =
$db
;
28
}
29
30
public
function
step_1
(): void
31
{
32
if
(!$this->db->indexExistsByFields(
'loc_settings'
, [
'itest'
])) {
33
$this->db->addIndex(
'loc_settings'
, [
'itest'
],
'i1'
);
34
}
35
}
36
37
public
function
step_2
(): void
38
{
39
if
(!$this->db->indexExistsByFields(
'loc_settings'
, [
'qtest'
])) {
40
$this->db->addIndex(
'loc_settings'
, [
'qtest'
],
'i2'
);
41
}
42
}
43
44
public
function
step_3
(): void
45
{
46
if
(
47
$this->db->tableExists(
'crs_settings'
) &&
48
!$this->db->tableColumnExists(
'crs_settings'
,
'tutorial_support_block'
)
49
) {
50
$this->db->addTableColumn(
'crs_settings'
,
'tutorial_support_block'
, [
51
'type'
=>
'integer'
,
52
'notnull'
=>
true
,
53
'length'
=> 1,
54
'default'
=> 0
55
]);
56
}
57
}
58
}
ilCourseObjectiveDBUpdateSteps
Definition:
ilCourseObjectiveDBUpdateSteps.php:21
ilCourseObjectiveDBUpdateSteps\step_1
step_1()
Definition:
ilCourseObjectiveDBUpdateSteps.php:30
ilCourseObjectiveDBUpdateSteps\step_3
step_3()
Definition:
ilCourseObjectiveDBUpdateSteps.php:44
ilDBInterface
ilDatabaseUpdateSteps
ilCourseObjectiveDBUpdateSteps\$db
ilDBInterface $db
Definition:
ilCourseObjectiveDBUpdateSteps.php:23
ilCourseObjectiveDBUpdateSteps\step_2
step_2()
Definition:
ilCourseObjectiveDBUpdateSteps.php:37
ilCourseObjectiveDBUpdateSteps\prepare
prepare(ilDBInterface $db)
Definition:
ilCourseObjectiveDBUpdateSteps.php:25
components
ILIAS
Course
classes
Objectives
Setup
ilCourseObjectiveDBUpdateSteps.php
Generated on Wed Sep 3 2025 23:02:47 for ILIAS by
1.8.13 (using
Doxyfile
)