ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LDAPBindPasswordFieldMigration.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\LDAP\Setup;
22 
24 use ilDBInterface;
25 
27 {
28  private ilDBInterface $db;
29 
30  public function prepare(ilDBInterface $db): void
31  {
32  $this->db = $db;
33  }
34 
35  public function step_1(): void
36  {
37  if ($this->db->tableColumnExists('ldap_server_settings', 'bind_pass')) {
38  $this->db->modifyTableColumn(
39  'ldap_server_settings',
40  'bind_pass',
41  [
42  'type' => 'text',
43  'length' => 100,
44  'notnull' => false,
45  'default' => null
46  ]
47  );
48  }
49  if ($this->db->tableColumnExists('ldap_server_settings', 'role_bind_pass')) {
50  $this->db->modifyTableColumn(
51  'ldap_server_settings',
52  'role_bind_pass',
53  [
54  'type' => 'text',
55  'length' => 100,
56  'notnull' => false,
57  'default' => null
58  ]
59  );
60  }
61  }
62 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null