ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10 Class Reference
+ Inheritance diagram for ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10:
+ Collaboration diagram for ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Private Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 24 of file class.DBUpdateSteps10.php.

Member Function Documentation

◆ prepare()

ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10::prepare ( \ilDBInterface  $db)

Prepare the execution of the steps.

Do not use anything from the globals or the DIC inside your steps, only use the instance of the database provided here.

Implements ilDatabaseUpdateSteps.

Definition at line 28 of file class.DBUpdateSteps10.php.

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

References ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10\$db.

◆ step_1()

ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10::step_1 ( )

Definition at line 33 of file class.DBUpdateSteps10.php.

33 : void
34 {
35 if (!$this->db->tableColumnExists('adv_mdf_enum', 'position')) {
36 $field_infos = [
37 'type' => 'integer',
38 'length' => 4,
39 'notnull' => false,
40 'default' => null
41 ];
42 $this->db->addTableColumn('adv_mdf_enum', 'position', $field_infos);
43 }
44 }

◆ step_2()

ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10::step_2 ( )

Definition at line 46 of file class.DBUpdateSteps10.php.

46 : void
47 {
48 $table_name = "adv_md_record_files";
49 if ($this->db->tableExists($table_name)) {
50 return;
51 }
52 $this->db->createTable($table_name, [
53 'object_id' => [
55 'length' => 8,
56 'default' => 0,
57 'notnull' => true
58 ],
59 'rid' => [
60 'type' => ilDBConstants::T_TEXT,
61 'length' => 64,
62 'default' => '',
63 'notnull' => true
64 ],
65 'is_global' => [
67 'length' => 1,
68 'default' => 0,
69 'notnull' => true
70 ]
71 ]);
72 $this->db->addPrimaryKey($table_name, ["object_id", "rid", "is_global"]);
73 }

References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

Field Documentation

◆ $db

ilDBInterface ILIAS\AdvancedMetaData\Setup\DBUpdateSteps10::$db
private

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