ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCourseObjectiveDBUpdateSteps Class Reference
+ Inheritance diagram for ilCourseObjectiveDBUpdateSteps:
+ Collaboration diagram for ilCourseObjectiveDBUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file ilCourseObjectiveDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilCourseObjectiveDBUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 25 of file ilCourseObjectiveDBUpdateSteps.php.

25 : void
26 {
27 $this->db = $db;
28 }

References $db.

◆ step_1()

ilCourseObjectiveDBUpdateSteps::step_1 ( )

Definition at line 30 of file ilCourseObjectiveDBUpdateSteps.php.

30 : void
31 {
32 if (!$this->db->indexExistsByFields('loc_settings', ['itest'])) {
33 $this->db->addIndex('loc_settings', ['itest'], 'i1');
34 }
35 }

◆ step_2()

ilCourseObjectiveDBUpdateSteps::step_2 ( )

Definition at line 37 of file ilCourseObjectiveDBUpdateSteps.php.

37 : void
38 {
39 if (!$this->db->indexExistsByFields('loc_settings', ['qtest'])) {
40 $this->db->addIndex('loc_settings', ['qtest'], 'i2');
41 }
42 }

◆ step_3()

ilCourseObjectiveDBUpdateSteps::step_3 ( )

Definition at line 44 of file ilCourseObjectiveDBUpdateSteps.php.

44 : 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 }

Field Documentation

◆ $db

ilDBInterface ilCourseObjectiveDBUpdateSteps::$db
protected

Definition at line 23 of file ilCourseObjectiveDBUpdateSteps.php.

Referenced by prepare().


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