ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilECSUpdateSteps8.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 protected ilDBInterface $db;
29
30 public function prepare(ilDBInterface $db): void
31 {
32 $this->db = $db;
33 }
34
38 public function step_1(): void
39 {
40 if (!$this->db->tableExists('ecs_user_consent')) {
41 $this->db->createTable('ecs_user_consent', [
42 'usr_id' => [
44 'length' => 4,
45 'notnull' => true
46 ],
47 'mid' => [
49 'length' => 4,
50 'notnull' => true,
51 ]
52 ]);
53 $this->db->addPrimaryKey('ecs_user_consent', ['usr_id', 'mid']);
54 }
55 }
56
57 public function step_2(): void
58 {
59 if (!$this->db->tableColumnExists('ecs_part_settings', 'username_placeholders')) {
60 $this->db->addTableColumn(
61 'ecs_part_settings',
62 'username_placeholders',
63 [
64 'type' => ilDBConstants::T_TEXT,
65 'notnull' => false,
66 'length' => 500,
67 'default' => null
68 ]
69 );
70 }
71 }
72
73 public function step_3(): void
74 {
75 if (!$this->db->tableColumnExists('ecs_part_settings', 'incoming_auth_type')) {
76 $this->db->addTableColumn(
77 'ecs_part_settings',
78 'incoming_auth_type',
79 [
80 'type' => ilDBConstants::T_TEXT,
81 'notnull' => true,
82 'length' => 1,
83 'default' => 0
84 ]
85 );
86 }
87 }
88
89 public function step_4(): void
90 {
91 if (!$this->db->tableColumnExists('ecs_part_settings', 'incoming_local_accounts')) {
92 $this->db->addTableColumn(
93 'ecs_part_settings',
94 'incoming_local_accounts',
95 [
97 'notnull' => true,
98 'length' => 1,
99 'default' => 1
100 ]
101 );
102 }
103 }
104
105 public function step_5(): void
106 {
107 if (!$this->db->tableColumnExists('ecs_part_settings', 'outgoing_auth_mode')) {
108 $this->db->addTableColumn(
109 'ecs_part_settings',
110 'outgoing_auth_mode',
111 [
112 'type' => ilDBConstants::T_TEXT,
113 'notnull' => false,
114 'length' => 64,
115 'default' => ''
116 ]
117 );
118 }
119 }
120
121 public function step_6(): void
122 {
123 if ($this->db->tableColumnExists('ecs_part_settings', 'outgoing_auth_mode')) {
124 $this->db->renameTableColumn(
125 'ecs_part_settings',
126 'outgoing_auth_mode',
127 'outgoing_auth_modes'
128 );
129 }
130 }
131
132 public function step_7(): void
133 {
134 if (!$this->db->tableColumnExists('ecs_user_consent', 'server_id')) {
135 $this->db->addTableColumn(
136 'ecs_user_consent',
137 'server_id',
138 [
139 'type' => ilDBConstants::T_INTEGER,
140 'length' => 4,
141 'notnull' => true
142 ]
143 );
144 }
145 }
146}
Class ilECSUpdateSteps8 contains update steps for release 8.
prepare(ilDBInterface $db)
step_1()
Add consent table.
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...