ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Setup\DBUpdateSteps10 Class Reference
+ Inheritance diagram for ILIAS\Setup\DBUpdateSteps10:
+ Collaboration diagram for ILIAS\Setup\DBUpdateSteps10:

Public Member Functions

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

Private Attributes

ilDBInterface $db
 

Detailed Description

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

Member Function Documentation

◆ prepare()

ILIAS\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.

References ILIAS\Setup\DBUpdateSteps10\$db.

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

◆ step_1()

ILIAS\Setup\DBUpdateSteps10::step_1 ( )

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

References null.

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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ step_2()

ILIAS\Setup\DBUpdateSteps10::step_2 ( )

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

References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

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' => [
54  'type' => ilDBConstants::T_INTEGER,
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' => [
66  'type' => ilDBConstants::T_INTEGER,
67  'length' => 1,
68  'default' => 0,
69  'notnull' => true
70  ]
71  ]);
72  $this->db->addPrimaryKey($table_name, ["object_id", "rid", "is_global"]);
73  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Setup\DBUpdateSteps10::$db
private

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

Referenced by ILIAS\Setup\DBUpdateSteps10\prepare().


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