ILIAS  release_8 Revision v8.23
ilStudyProgrammeSettingsTableUpdateSteps Class Reference
+ Inheritance diagram for ilStudyProgrammeSettingsTableUpdateSteps:
+ Collaboration diagram for ilStudyProgrammeSettingsTableUpdateSteps:

Public Member Functions

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

Data Fields

const TABLE_NAME = 'prg_settings'
 
const TABLE_PROGRESSES = 'prg_usr_progress'
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilStudyProgrammeSettingsTableUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 28 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

References $db.

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

◆ step_1()

ilStudyProgrammeSettingsTableUpdateSteps::step_1 ( )

Definition at line 33 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

33  : void
34  {
35  $column_name = 'vq_restart_recheck';
36 
37  if (!$this->db->tableColumnExists(self::TABLE_NAME, $column_name)) {
38  $this->db->addTableColumn(
39  self::TABLE_NAME,
40  $column_name,
41  [
42  'type' => 'integer',
43  'length' => 1,
44  'default' => 0,
45  'notnull' => false
46  ]
47  );
48  }
49  }

◆ step_2()

ilStudyProgrammeSettingsTableUpdateSteps::step_2 ( )

Definition at line 51 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

51  : void
52  {
53  if (!$this->db->indexExistsByFields(self::TABLE_NAME, ['assignment_id', 'prg_id', 'usr_id'])) {
54  $this->db->dropPrimaryKey(self::TABLE_PROGRESSES);
55  $this->db->addPrimaryKey(
56  self::TABLE_PROGRESSES,
57  [
58  'assignment_id',
59  'prg_id',
60  'usr_id'
61  ]
62  );
63  }
64  }

Field Documentation

◆ $db

ilDBInterface ilStudyProgrammeSettingsTableUpdateSteps::$db
protected

Definition at line 26 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

Referenced by prepare().

◆ TABLE_NAME

const ilStudyProgrammeSettingsTableUpdateSteps::TABLE_NAME = 'prg_settings'

Definition at line 23 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

◆ TABLE_PROGRESSES

const ilStudyProgrammeSettingsTableUpdateSteps::TABLE_PROGRESSES = 'prg_usr_progress'

Definition at line 24 of file ilStudyProgrammeSettingsTableUpdateSteps.php.


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