ILIAS  release_8 Revision v8.24
ilECSUpdateSteps8.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types=1);
19
26{
27 protected ilDBInterface $db;
28
29 public function prepare(ilDBInterface $db): void
30 {
31 $this->db = $db;
32 }
33
37 public function step_1(): void
38 {
39 if (!$this->db->tableExists('ecs_user_consent')) {
40 $this->db->createTable('ecs_user_consent', [
41 'usr_id' => [
43 'length' => 4,
44 'notnull' => true
45 ],
46 'mid' => [
48 'length' => 4,
49 'notnull' => true,
50 ]
51 ]);
52 $this->db->addPrimaryKey('ecs_user_consent', ['usr_id', 'mid']);
53 }
54 }
55
56 public function step_2(): void
57 {
58 if (!$this->db->tableColumnExists('ecs_part_settings', 'username_placeholders')) {
59 $this->db->addTableColumn(
60 'ecs_part_settings',
61 'username_placeholders',
62 [
63 'type' => ilDBConstants::T_TEXT,
64 'notnull' => false,
65 'length' => 500,
66 'default' => null
67 ]
68 );
69 }
70 }
71
72 public function step_3(): void
73 {
74 if (!$this->db->tableColumnExists('ecs_part_settings', 'incoming_auth_type')) {
75 $this->db->addTableColumn(
76 'ecs_part_settings',
77 'incoming_auth_type',
78 [
79 'type' => ilDBConstants::T_TEXT,
80 'notnull' => true,
81 'length' => 1,
82 'default' => 0
83 ]
84 );
85 }
86 }
87
88 public function step_4(): void
89 {
90 if (!$this->db->tableColumnExists('ecs_part_settings', 'incoming_local_accounts')) {
91 $this->db->addTableColumn(
92 'ecs_part_settings',
93 'incoming_local_accounts',
94 [
96 'notnull' => true,
97 'length' => 1,
98 'default' => 1
99 ]
100 );
101 }
102 }
103
104 public function step_5(): void
105 {
106 if (!$this->db->tableColumnExists('ecs_part_settings', 'outgoing_auth_mode')) {
107 $this->db->addTableColumn(
108 'ecs_part_settings',
109 'outgoing_auth_mode',
110 [
111 'type' => ilDBConstants::T_TEXT,
112 'notnull' => false,
113 'length' => 64,
114 'default' => ''
115 ]
116 );
117 }
118 }
119
120 public function step_6(): void
121 {
122 if ($this->db->tableColumnExists('ecs_part_settings', 'outgoing_auth_mode')) {
123 $this->db->renameTableColumn(
124 'ecs_part_settings',
125 'outgoing_auth_mode',
126 'outgoing_auth_modes'
127 );
128 }
129 }
130
131 public function step_7(): void
132 {
133 if (!$this->db->tableColumnExists('ecs_user_consent', 'server_id')) {
134 $this->db->addTableColumn(
135 'ecs_user_consent',
136 'server_id',
137 [
138 'type' => ilDBConstants::T_INTEGER,
139 'length' => 4,
140 'notnull' => true
141 ]
142 );
143 }
144 }
145}
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...