ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestQuestionPool80DBUpdateSteps Class Reference
+ Inheritance diagram for ilTestQuestionPool80DBUpdateSteps:
+ Collaboration diagram for ilTestQuestionPool80DBUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
- 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 class.ilTestQuestionPool80DBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilTestQuestionPool80DBUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 25 of file class.ilTestQuestionPool80DBUpdateSteps.php.

References $db.

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

◆ step_1()

ilTestQuestionPool80DBUpdateSteps::step_1 ( )

Definition at line 30 of file class.ilTestQuestionPool80DBUpdateSteps.php.

30  : void
31  {
32  $this->db->manipulateF("DELETE FROM qpl_qst_type WHERE type_tag = %s", ['text'], ['assJavaApplet']);
33  $this->db->manipulateF("DELETE FROM qpl_qst_type WHERE type_tag = %s", ['text'], ['assFlashQuestion']);
34  }

◆ step_2()

ilTestQuestionPool80DBUpdateSteps::step_2 ( )

Definition at line 36 of file class.ilTestQuestionPool80DBUpdateSteps.php.

References ilDBConstants\T_INTEGER.

36  : void
37  {
38  if (!$this->db->tableColumnExists('tst_rnd_quest_set_qpls', 'pool_ref_id')) {
39  $this->db->addTableColumn(
40  'tst_rnd_quest_set_qpls',
41  'pool_ref_id',
42  [
43  'type' => ilDBConstants::T_INTEGER,
44  'length' => 8,
45  'notnull' => false,
46  'default' => null
47  ]
48  );
49  }
50  }

◆ step_3()

ilTestQuestionPool80DBUpdateSteps::step_3 ( )

Definition at line 52 of file class.ilTestQuestionPool80DBUpdateSteps.php.

52  : void
53  {
54  $fields = ['gap_id'];
55  if (!$this->db->indexExistsByFields('qpl_a_cloze', $fields)) {
56  $this->db->addIndex(
57  'qpl_a_cloze',
58  $fields,
59  'i2'
60  );
61  }
62  }

◆ step_4()

ilTestQuestionPool80DBUpdateSteps::step_4 ( )

Definition at line 64 of file class.ilTestQuestionPool80DBUpdateSteps.php.

64  : void
65  {
66  $fields = ['gap_fi', 'question_fi'];
67  if (!$this->db->indexExistsByFields('qpl_a_cloze_combi_res', $fields)) {
68  $this->db->addIndex(
69  'qpl_a_cloze_combi_res',
70  $fields,
71  'i1'
72  );
73  }
74  }

◆ step_5()

ilTestQuestionPool80DBUpdateSteps::step_5 ( )

Definition at line 76 of file class.ilTestQuestionPool80DBUpdateSteps.php.

76  : void
77  {
78  $fields = ['owner'];
79  if (!$this->db->indexExistsByFields('qpl_questions', $fields)) {
80  $this->db->addIndex(
81  'qpl_questions',
82  $fields,
83  'i5'
84  );
85  }
86  $fields = ['question_fi'];
87  if (!$this->db->indexExistsByFields('qpl_num_range', $fields)) {
88  $this->db->addIndex(
89  'qpl_num_range',
90  $fields,
91  'i6'
92  );
93  }
94  }

◆ step_6()

ilTestQuestionPool80DBUpdateSteps::step_6 ( )

Definition at line 96 of file class.ilTestQuestionPool80DBUpdateSteps.php.

References ilDBConstants\T_INTEGER.

96  : void
97  {
98  if (!$this->db->tableColumnExists('qpl_a_errortext', 'position')) {
99  $this->db->addTableColumn(
100  'qpl_a_errortext',
101  'position',
102  [
103  'type' => ilDBConstants::T_INTEGER,
104  'length' => 2,
105  'notnull' => false,
106  'default' => null
107  ]
108  );
109  }
110  }

◆ step_7()

ilTestQuestionPool80DBUpdateSteps::step_7 ( )

Definition at line 112 of file class.ilTestQuestionPool80DBUpdateSteps.php.

References ilDBConstants\T_CLOB.

112  : void
113  {
114  if (!$this->db->tableColumnExists('qpl_qst_errortext', 'parsed_errortext')) {
115  $this->db->addTableColumn(
116  'qpl_qst_errortext',
117  'parsed_errortext',
118  [
119  'type' => ilDBConstants::T_CLOB,
120  'notnull' => false,
121  'default' => null
122  ]
123  );
124  }
125  }

◆ step_8()

ilTestQuestionPool80DBUpdateSteps::step_8 ( )

Definition at line 127 of file class.ilTestQuestionPool80DBUpdateSteps.php.

127  : void
128  {
129  $this->db->modifyTableColumn(
130  'qpl_questions',
131  'author',
132  ['type' => 'text', 'length' => 512]
133  );
134  }

◆ step_9()

ilTestQuestionPool80DBUpdateSteps::step_9 ( )

Definition at line 136 of file class.ilTestQuestionPool80DBUpdateSteps.php.

136  : void
137  {
138  $this->db->modifyTableColumn(
139  'qpl_questions',
140  'title',
141  ['type' => 'text', 'length' => 124]
142  );
143  }

Field Documentation

◆ $db

ilDBInterface ilTestQuestionPool80DBUpdateSteps::$db
protected

Definition at line 23 of file class.ilTestQuestionPool80DBUpdateSteps.php.

Referenced by prepare().


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