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

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 23 of file class.ilBookingManagerDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::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 27 of file class.ilBookingManagerDBUpdateSteps.php.

References ILIAS\Setup\ilBookingManagerDBUpdateSteps\$db.

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

◆ step_1()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_1 ( )

Definition at line 32 of file class.ilBookingManagerDBUpdateSteps.php.

32  : void
33  {
34  if (!$this->db->indexExistsByFields('booking_reservation', ['context_obj_id'])) {
35  $this->db->addIndex('booking_reservation', ['context_obj_id'], 'i5');
36  }
37  }

◆ step_2()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_2 ( )

Definition at line 39 of file class.ilBookingManagerDBUpdateSteps.php.

39  : void
40  {
41  if (!$this->db->indexExistsByFields('booking_schedule', ['pool_id'])) {
42  $this->db->addIndex('booking_schedule', ['pool_id'], 'i1');
43  }
44  }

◆ step_3()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_3 ( )

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

46  : void
47  {
48  if (!$this->db->indexExistsByFields('booking_object', ['schedule_id'])) {
49  $this->db->addIndex('booking_object', ['schedule_id'], 'i2');
50  }
51  }

◆ step_4()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_4 ( )

Definition at line 53 of file class.ilBookingManagerDBUpdateSteps.php.

References ILIAS\Setup\ilBookingManagerDBUpdateSteps\$db.

53  : void
54  {
55  $db = $this->db;
56  if (!$db->tableExists("book_sel_object")) {
57  $fields = array(
58  "user_id" => array(
59  "type" => "integer",
60  "notnull" => true,
61  "length" => 4,
62  "default" => 0
63  ),
64  "object_id" => array(
65  "type" => "integer",
66  "notnull" => true,
67  "length" => 4,
68  "default" => 0
69  )
70  );
71  $db->createTable("book_sel_object", $fields);
72  $db->addPrimaryKey("book_sel_object", ["user_id", "object_id"]);
73  }
74  }
tableExists(string $table_name)
addPrimaryKey(string $table_name, array $primary_keys)
createTable(string $table_name, array $fields, bool $drop_table=false, bool $ignore_erros=false)

◆ step_5()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_5 ( )

Definition at line 76 of file class.ilBookingManagerDBUpdateSteps.php.

References ILIAS\Setup\ilBookingManagerDBUpdateSteps\$db, and ilDBInterface\addTableColumn().

76  : void
77  {
78  $db = $this->db;
79  if (!$db->tableColumnExists("book_sel_object", "pool_id")) {
80  $db->addTableColumn("book_sel_object", "pool_id", [
81  "type" => "integer",
82  "notnull" => true,
83  "length" => 4,
84  "default" => 0
85  ]);
86  }
87  }
tableColumnExists(string $table_name, string $column_name)
addTableColumn(string $table_name, string $column_name, array $attributes)
+ Here is the call graph for this function:

◆ step_6()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_6 ( )

Definition at line 89 of file class.ilBookingManagerDBUpdateSteps.php.

References ILIAS\Setup\ilBookingManagerDBUpdateSteps\$db, and ilDBInterface\addTableColumn().

89  : void
90  {
91  $db = $this->db;
92  if (!$db->tableColumnExists("booking_settings", "messages")) {
93  $db->addTableColumn("booking_settings", "messages", [
94  "type" => "integer",
95  "notnull" => true,
96  "length" => 4,
97  "default" => 0
98  ]);
99  }
100  }
tableColumnExists(string $table_name, string $column_name)
addTableColumn(string $table_name, string $column_name, array $attributes)
+ Here is the call graph for this function:

◆ step_7()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_7 ( )

Definition at line 102 of file class.ilBookingManagerDBUpdateSteps.php.

References ILIAS\Setup\ilBookingManagerDBUpdateSteps\$db, and ilDBInterface\addTableColumn().

102  : void
103  {
104  $db = $this->db;
105  if (!$db->tableColumnExists("booking_reservation", "message")) {
106  $db->addTableColumn("booking_reservation", "message", [
107  "type" => "text",
108  "notnull" => true,
109  "length" => 4000,
110  "default" => ""
111  ]);
112  }
113  }
tableColumnExists(string $table_name, string $column_name)
addTableColumn(string $table_name, string $column_name, array $attributes)
+ Here is the call graph for this function:

◆ step_8()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_8 ( )

Definition at line 115 of file class.ilBookingManagerDBUpdateSteps.php.

References null.

115  : void
116  {
117  if (!$this->db->tableColumnExists('booking_object', 'obj_info_rid')) {
118  $this->db->addTableColumn(
119  'booking_object',
120  'obj_info_rid',
121  [
122  'type' => 'text',
123  'notnull' => false,
124  'length' => 64,
125  'default' => null
126  ]
127  );
128  }
129  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ step_9()

ILIAS\Setup\ilBookingManagerDBUpdateSteps::step_9 ( )

Definition at line 131 of file class.ilBookingManagerDBUpdateSteps.php.

References null.

131  : void
132  {
133  if (!$this->db->tableColumnExists('booking_object', 'book_info_rid')) {
134  $this->db->addTableColumn(
135  'booking_object',
136  'book_info_rid',
137  [
138  'type' => 'text',
139  'notnull' => false,
140  'length' => 64,
141  'default' => null
142  ]
143  );
144  }
145  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

Field Documentation

◆ $db


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