ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMDUpdateSteps10.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected \ilDBInterface $db;
24
25 public function prepare(\ilDBInterface $db): void
26 {
27 $this->db = $db;
28 }
29
33 public function step_1(): void
34 {
35 if (!$this->db->tableExists('il_meta_oer_exposed')) {
36 $this->db->createTable(
37 'il_meta_oer_exposed',
38 [
39 'obj_id' => [
41 'notnull' => true,
42 'length' => 4
43 ],
44 'identifier' => [
45 'type' => ilDBConstants::T_TEXT,
46 'notnull' => true,
47 'length' => 64
48 ],
49 'datestamp' => [
51 'notnull' => true,
52 'length' => 8
53 ],
54 'metadata' => [
55 'type' => ilDBConstants::T_CLOB,
56 'notnull' => true
57 ]
58 ]
59 );
60 $this->db->addPrimaryKey('il_meta_oer_exposed', ['obj_id']);
61 }
62 }
63}
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
step_1()
Add a new table for exposed OER metadata.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...