ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDataCollectionDBUpdateSteps11 Class Reference
+ Inheritance diagram for ilDataCollectionDBUpdateSteps11:
+ Collaboration diagram for ilDataCollectionDBUpdateSteps11:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
- 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 21 of file class.ilDataCollectionDBUpdateSteps11.php.

Member Function Documentation

◆ prepare()

ilDataCollectionDBUpdateSteps11::prepare ( ilDBInterface  $db)

Definition at line 25 of file class.ilDataCollectionDBUpdateSteps11.php.

25 : void
26 {
27 $this->db = $db;
28 }

References $db.

◆ step_1()

ilDataCollectionDBUpdateSteps11::step_1 ( )

Definition at line 30 of file class.ilDataCollectionDBUpdateSteps11.php.

30 : void
31 {
32 if ($this->db->tableColumnExists('il_dcl_field', 'is_unique')) {
33 $st = $this->db->queryF(
34 'SELECT id FROM il_dcl_field WHERE is_unique = %s AND datatype_id IN (%s, %s, %s, %s)',
35 [
41 ],
42 [
43 1,
48 ]
49 );
50 while ($row = $this->db->fetchAssoc($st)) {
51 $this->db->insert(
52 'il_dcl_field_prop',
53 [
54 "id" => [ilDBConstants::T_INTEGER, $this->db->nextId('il_dcl_field_prop')],
55 "field_id" => [ilDBConstants::T_INTEGER, (int) $row['id']],
57 "value" => [ilDBConstants::T_TEXT, '1'],
58 ]
59 );
60 }
61 $this->db->dropTableColumn('il_dcl_field', 'is_unique');
62 }
63 }
const INPUTFORMAT_TEXT_SELECTION
const INPUTFORMAT_DATE_SELECTION

References ilDclDatatype\INPUTFORMAT_DATE_SELECTION, ilDclDatatype\INPUTFORMAT_ILIAS_REF, ilDclDatatype\INPUTFORMAT_TEXT, ilDclDatatype\INPUTFORMAT_TEXT_SELECTION, ilDclBaseFieldModel\PROP_UNIQUE, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

◆ step_2()

ilDataCollectionDBUpdateSteps11::step_2 ( )

Definition at line 65 of file class.ilDataCollectionDBUpdateSteps11.php.

65 : void
66 {
67 if (!$this->db->tableColumnExists('il_dcl_tableview', 'role_limitation')) {
68 $this->db->addTableColumn('il_dcl_tableview', 'role_limitation', [
70 'length' => 1,
71 'notnull' => true,
72 'default' => 0
73 ]);
74 $this->db->manipulateF('UPDATE il_dcl_tableview SET role_limitation = %s', [ilDBConstants::T_INTEGER], [1]);
75 }
76 }

References ilDBConstants\T_INTEGER.

◆ step_3()

ilDataCollectionDBUpdateSteps11::step_3 ( )

Definition at line 78 of file class.ilDataCollectionDBUpdateSteps11.php.

78 : void
79 {
80 $query = 'SELECT id FROM il_dcl_datatype WHERE id = %s';
81 if ($this->db->fetchAssoc($this->db->queryF($query, [ilDBConstants::T_INTEGER], [ilDclDatatype::INPUTFORMAT_DATETIME])) === null) {
82 $this->db->insert('il_dcl_datatype', [
84 'title' => [ilDBConstants::T_TEXT, 'datetime'],
85 'storage_location' => [ilDBConstants::T_INTEGER, 3],
86 'sort' => [ilDBConstants::T_INTEGER, 52],
87 ]);
88 }
89 if ($this->db->fetchAssoc($this->db->queryF($query, [ilDBConstants::T_INTEGER], [ilDclDatatype::INPUTFORMAT_DATETIME_SELECTION])) === null) {
90 $this->db->insert('il_dcl_datatype', [
92 'title' => [ilDBConstants::T_TEXT, 'datetime_selection'],
93 'storage_location' => [ilDBConstants::T_INTEGER, 1],
94 'sort' => [ilDBConstants::T_INTEGER, 54],
95 ]);
96 }
97 }
const INPUTFORMAT_DATETIME_SELECTION

References ilDclDatatype\INPUTFORMAT_DATETIME, ilDclDatatype\INPUTFORMAT_DATETIME_SELECTION, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

◆ step_4()

ilDataCollectionDBUpdateSteps11::step_4 ( )

Definition at line 99 of file class.ilDataCollectionDBUpdateSteps11.php.

99 : void
100 {
101 if (!$this->db->tableExists('il_dcl_notification')) {
102 $this->db->createTable('il_dcl_notification', [
103 'obj_id' => [
104 'type' => 'integer',
105 'length' => 4,
106 'notnull' => true
107 ],
108 'usr_id' => [
109 'type' => 'integer',
110 'length' => 4,
111 'notnull' => true
112 ],
113 'setting' => [
114 'type' => 'integer',
115 'length' => 4,
116 'notnull' => true
117 ],
118 ]);
119 $this->db->addPrimaryKey('il_dcl_notification', ['obj_id', 'usr_id', 'setting']);
120 }
121 }

Field Documentation

◆ $db

ilDBInterface ilDataCollectionDBUpdateSteps11::$db
protected

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

Referenced by prepare().


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