ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Export\Setup\DBUpdateSteps10 Class Reference
+ Inheritance diagram for ILIAS\Export\Setup\DBUpdateSteps10:
+ Collaboration diagram for ILIAS\Export\Setup\DBUpdateSteps10:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 Create new export file table. More...
 
 step_2 ()
 Create table to store info about the public access file of an object. More...
 
 step_3 ()
 Add migrate column to table export_file_info. More...
 
- 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 27 of file DBUpdateSteps10.php.

Member Function Documentation

◆ prepare()

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

Definition at line 31 of file DBUpdateSteps10.php.

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

31  : void
32  {
33  $this->db = $db;
34  }

◆ step_1()

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

Create new export file table.

Definition at line 39 of file DBUpdateSteps10.php.

39  : void
40  {
41  if ($this->db->tableExists("export_files")) {
42  return;
43  }
44  $this->db->createTable("export_files", [
45  'object_id' => [
46  'type' => 'integer',
47  'length' => 8,
48  'default' => 0,
49  'notnull' => true
50  ],
51  'rid' => [
52  'type' => 'text',
53  'length' => 64,
54  'default' => '',
55  'notnull' => true
56  ],
57  'owner_id' => [
58  'type' => 'integer',
59  'length' => 8,
60  'default' => 0,
61  'notnull' => true
62  ],
63  'timestamp' => [
64  'type' => 'timestamp',
65  'notnull' => false
66  ],
67  ]);
68  $this->db->addPrimaryKey("export_files", ["object_id", "rid"]);
69  }

◆ step_2()

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

Create table to store info about the public access file of an object.

Definition at line 74 of file DBUpdateSteps10.php.

74  : void
75  {
76  if ($this->db->tableExists("export_public_access")) {
77  return;
78  }
79  $this->db->createTable("export_public_access", [
80  'object_id' => [
81  'type' => 'integer',
82  'length' => 8,
83  'default' => 0,
84  'notnull' => true
85  ],
86  'export_option_id' => [
87  'type' => 'text',
88  'length' => 64,
89  'default' => '',
90  'notnull' => true
91  ],
92  'identification' => [
93  'type' => 'text',
94  'length' => 64,
95  'default' => '',
96  'notnull' => true
97  ],
98  'timestamp' => [
99  'type' => 'timestamp',
100  'notnull' => false
101  ],
102  ]);
103  $this->db->addPrimaryKey("export_public_access", ["object_id"]);
104  }

◆ step_3()

ILIAS\Export\Setup\DBUpdateSteps10::step_3 ( )

Add migrate column to table export_file_info.

Definition at line 109 of file DBUpdateSteps10.php.

References ilDBConstants\T_INTEGER.

109  : void
110  {
111  if (!$this->db->tableExists("export_file_info")) {
112  return;
113  }
114  if (
115  $this->db->tableColumnExists("export_file_info", "migrated")
116  ) {
117  return;
118  }
119  $this->db->addTableColumn("export_file_info", "migrated", [
120  'type' => ilDBConstants::T_INTEGER,
121  'length' => 4,
122  'default' => 0
123  ]);
124  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Export\Setup\DBUpdateSteps10::$db
protected

Definition at line 29 of file DBUpdateSteps10.php.

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


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