|
| prepare (\ilDBInterface $db) |
| Prepare the execution of the steps. More...
|
|
| step_1 () |
| Add a column to the il_meta_general table to store the 'Aggregation Level' element. More...
|
|
| step_2 () |
| Add two columns to the il_meta_contribute table to store the descrption of the date and its language. More...
|
|
| step_3 () |
| Add two columns to the il_meta_annotation table to store the description of the date and its language. More...
|
|
| step_4 () |
| Add two columns to the il_meta_educational table to store the description of the typical learning time and its language. More...
|
|
| step_5 () |
| Add two columns to the il_meta_technical table to store the description of the duration and its language. More...
|
|
| step_6 () |
| Add a new table for the non-unique coverage. More...
|
|
| step_7 () |
| Add a new table for the non-unique metadata schema. More...
|
|
| step_8 () |
| Add a new table for the non-unique or-composite in requirements. More...
|
|
| step_9 () |
| Add a new table for the non-unique learning resource type. More...
|
|
| step_10 () |
| Add a new table for the non-unique intented end user role. More...
|
|
| step_11 () |
| Add a new table for the non-unique context. More...
|
|
| prepare (\ilDBInterface $db) |
| Prepare the execution of the steps. More...
|
|
◆ prepare()
◆ step_1()
ilMDLOMUpdateSteps::step_1 |
( |
| ) |
|
Add a column to the il_meta_general table to store the 'Aggregation Level' element.
Definition at line 34 of file class.ilMDLOMUpdateSteps.php.
34 : void
35 {
36 if (!$this->db->tableColumnExists('il_meta_general', 'general_aggl')) {
37 $this->db->addTableColumn(
38 'il_meta_general',
39 'general_aggl',
40 [
42 'length' => 16,
43 ]
44 );
45 }
46 }
References ilDBConstants\T_TEXT.
◆ step_10()
ilMDLOMUpdateSteps::step_10 |
( |
| ) |
|
Add a new table for the non-unique intented end user role.
Definition at line 348 of file class.ilMDLOMUpdateSteps.php.
348 : void
349 {
350 if (!$this->db->tableExists('il_meta_end_usr_role')) {
351 $this->db->createTable(
352 'il_meta_end_usr_role',
353 [
354 'meta_end_usr_role_id' => [
356 'notnull' => true,
357 'default' => 0
358 ],
359 'rbac_id' => [
361 ],
362 'obj_id' => [
364 ],
365 'obj_type' => [
367 'length' => 6
368 ],
369 'parent_type' => [
371 'length' => 16
372 ],
373 'parent_id' => [
375 ],
376 'intended_end_user_role' => [
378 'length' => 16
379 ]
380 ]
381 );
382
383 $this->db->createSequence('il_meta_end_usr_role');
384 $this->db->addPrimaryKey('il_meta_end_usr_role', ['meta_end_usr_role_id']);
385 }
386 }
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
◆ step_11()
ilMDLOMUpdateSteps::step_11 |
( |
| ) |
|
Add a new table for the non-unique context.
Definition at line 391 of file class.ilMDLOMUpdateSteps.php.
391 : void
392 {
393 if (!$this->db->tableExists('il_meta_context')) {
394 $this->db->createTable(
395 'il_meta_context',
396 [
397 'meta_context_id' => [
399 'notnull' => true,
400 'default' => 0
401 ],
402 'rbac_id' => [
404 ],
405 'obj_id' => [
407 ],
408 'obj_type' => [
410 'length' => 6
411 ],
412 'parent_type' => [
414 'length' => 16
415 ],
416 'parent_id' => [
418 ],
419 'context' => [
421 'length' => 16
422 ]
423 ]
424 );
425
426 $this->db->createSequence('il_meta_context');
427 $this->db->addPrimaryKey('il_meta_context', ['meta_context_id']);
428 }
429 }
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
◆ step_2()
ilMDLOMUpdateSteps::step_2 |
( |
| ) |
|
Add two columns to the il_meta_contribute table to store the descrption of the date and its language.
Definition at line 52 of file class.ilMDLOMUpdateSteps.php.
52 : void
53 {
54 if (!$this->db->tableColumnExists('il_meta_contribute', 'c_date_descr')) {
55 $this->db->addTableColumn(
56 'il_meta_contribute',
57 'c_date_descr',
58 [
60 ]
61 );
62 }
63 if (!$this->db->tableColumnExists('il_meta_contribute', 'descr_lang')) {
64 $this->db->addTableColumn(
65 'il_meta_contribute',
66 'descr_lang',
67 [
69 'length' => 2
70 ]
71 );
72 }
73 }
References ilDBConstants\T_CLOB, and ilDBConstants\T_TEXT.
◆ step_3()
ilMDLOMUpdateSteps::step_3 |
( |
| ) |
|
Add two columns to the il_meta_annotation table to store the description of the date and its language.
Definition at line 79 of file class.ilMDLOMUpdateSteps.php.
79 : void
80 {
81 if (!$this->db->tableColumnExists('il_meta_annotation', 'a_date_descr')) {
82 $this->db->addTableColumn(
83 'il_meta_annotation',
84 'a_date_descr',
85 [
87 ]
88 );
89 }
90 if (!$this->db->tableColumnExists('il_meta_annotation', 'date_descr_lang')) {
91 $this->db->addTableColumn(
92 'il_meta_annotation',
93 'date_descr_lang',
94 [
96 'length' => 2
97 ]
98 );
99 }
100 }
References ilDBConstants\T_CLOB, and ilDBConstants\T_TEXT.
◆ step_4()
ilMDLOMUpdateSteps::step_4 |
( |
| ) |
|
Add two columns to the il_meta_educational table to store the description of the typical learning time and its language.
Definition at line 106 of file class.ilMDLOMUpdateSteps.php.
106 : void
107 {
108 if (!$this->db->tableColumnExists('il_meta_educational', 'tlt_descr')) {
109 $this->db->addTableColumn(
110 'il_meta_educational',
111 'tlt_descr',
112 [
114 ]
115 );
116 }
117 if (!$this->db->tableColumnExists('il_meta_educational', 'tlt_descr_lang')) {
118 $this->db->addTableColumn(
119 'il_meta_educational',
120 'tlt_descr_lang',
121 [
123 'length' => 2
124 ]
125 );
126 }
127 }
References ilDBConstants\T_CLOB, and ilDBConstants\T_TEXT.
◆ step_5()
ilMDLOMUpdateSteps::step_5 |
( |
| ) |
|
Add two columns to the il_meta_technical table to store the description of the duration and its language.
Definition at line 133 of file class.ilMDLOMUpdateSteps.php.
133 : void
134 {
135 if (!$this->db->tableColumnExists('il_meta_technical', 'duration_descr')) {
136 $this->db->addTableColumn(
137 'il_meta_technical',
138 'duration_descr',
139 [
141 ]
142 );
143 }
144 if (!$this->db->tableColumnExists('il_meta_technical', 'duration_descr_lang')) {
145 $this->db->addTableColumn(
146 'il_meta_technical',
147 'duration_descr_lang',
148 [
150 'length' => 2
151 ]
152 );
153 }
154 }
References ilDBConstants\T_CLOB, and ilDBConstants\T_TEXT.
◆ step_6()
ilMDLOMUpdateSteps::step_6 |
( |
| ) |
|
Add a new table for the non-unique coverage.
Definition at line 159 of file class.ilMDLOMUpdateSteps.php.
159 : void
160 {
161 if (!$this->db->tableExists('il_meta_coverage')) {
162 $this->db->createTable(
163 'il_meta_coverage',
164 [
165 'meta_coverage_id' => [
167 'notnull' => true,
168 'default' => 0
169 ],
170 'rbac_id' => [
172 ],
173 'obj_id' => [
175 ],
176 'obj_type' => [
178 'length' => 6
179 ],
180 'parent_type' => [
182 'length' => 16
183 ],
184 'parent_id' => [
186 ],
187 'coverage' => [
189 'length' => 4000
190 ],
191 'coverage_language' => [
193 'length' => 2,
194 'fixed' => true
195 ]
196 ]
197 );
198
199 $this->db->createSequence('il_meta_coverage');
200 $this->db->addPrimaryKey('il_meta_coverage', ['meta_coverage_id']);
201 }
202 }
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
◆ step_7()
ilMDLOMUpdateSteps::step_7 |
( |
| ) |
|
Add a new table for the non-unique metadata schema.
Definition at line 207 of file class.ilMDLOMUpdateSteps.php.
207 : void
208 {
209 if (!$this->db->tableExists('il_meta_meta_schema')) {
210 $this->db->createTable(
211 'il_meta_meta_schema',
212 [
213 'meta_meta_schema_id' => [
215 'notnull' => true,
216 'default' => 0
217 ],
218 'rbac_id' => [
220 ],
221 'obj_id' => [
223 ],
224 'obj_type' => [
226 'length' => 6
227 ],
228 'parent_type' => [
230 'length' => 16
231 ],
232 'parent_id' => [
234 ],
235 'meta_data_schema' => [
237 'length' => 16
238 ]
239 ]
240 );
241
242 $this->db->createSequence('il_meta_meta_schema');
243 $this->db->addPrimaryKey('il_meta_meta_schema', ['meta_meta_schema_id']);
244 }
245 }
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
◆ step_8()
ilMDLOMUpdateSteps::step_8 |
( |
| ) |
|
Add a new table for the non-unique or-composite in requirements.
Definition at line 250 of file class.ilMDLOMUpdateSteps.php.
250 : void
251 {
252 if (!$this->db->tableExists('il_meta_or_composite')) {
253 $this->db->createTable(
254 'il_meta_or_composite',
255 [
256 'meta_or_composite_id' => [
258 'notnull' => true,
259 'default' => 0
260 ],
261 'rbac_id' => [
263 ],
264 'obj_id' => [
266 ],
267 'obj_type' => [
269 'length' => 6
270 ],
271 'parent_type' => [
273 'length' => 16
274 ],
275 'parent_id' => [
277 ],
278 'type' => [
280 'length' => 16
281 ],
282 'name' => [
284 'length' => 32
285 ],
286 'min_version' => [
288 'length' => 255
289 ],
290 'max_version' => [
292 'length' => 255
293 ]
294 ]
295 );
296
297 $this->db->createSequence('il_meta_or_composite');
298 $this->db->addPrimaryKey('il_meta_or_composite', ['meta_or_composite_id']);
299 }
300 }
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
◆ step_9()
ilMDLOMUpdateSteps::step_9 |
( |
| ) |
|
Add a new table for the non-unique learning resource type.
Definition at line 305 of file class.ilMDLOMUpdateSteps.php.
305 : void
306 {
307 if (!$this->db->tableExists('il_meta_lr_type')) {
308 $this->db->createTable(
309 'il_meta_lr_type',
310 [
311 'meta_lr_type_id' => [
313 'notnull' => true,
314 'default' => 0
315 ],
316 'rbac_id' => [
318 ],
319 'obj_id' => [
321 ],
322 'obj_type' => [
324 'length' => 6
325 ],
326 'parent_type' => [
328 'length' => 16
329 ],
330 'parent_id' => [
332 ],
333 'learning_resource_type' => [
335 'length' => 32
336 ]
337 ]
338 );
339
340 $this->db->createSequence('il_meta_lr_type');
341 $this->db->addPrimaryKey('il_meta_lr_type', ['meta_lr_type_id']);
342 }
343 }
References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
◆ $db
The documentation for this class was generated from the following file: