diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-18 10:25:19 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:20:30 +0100 |
commit | 14f00208e284d8f28594677d3ecf26a7647e6cdd (patch) | |
tree | 63ac9b884c4aab394dfc45366a61ee91d307cd71 /apps/user_ldap/lib/Migration | |
parent | c4d8bd9c0532f4acaf5b0d8e625dff875fad43f4 (diff) | |
download | nextcloud-server-14f00208e284d8f28594677d3ecf26a7647e6cdd.tar.gz nextcloud-server-14f00208e284d8f28594677d3ecf26a7647e6cdd.zip |
Add the columns and alter the index in Version1010Date20200630192842
This is to ensure new installations do not need to go through migration
history.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib/Migration')
-rw-r--r-- | apps/user_ldap/lib/Migration/Version1010Date20200630192842.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php index e2c78ed59f8..8263cbae157 100644 --- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php +++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php @@ -60,8 +60,12 @@ class Version1010Date20200630192842 extends SimpleMigrationStep { 'length' => 255, 'default' => '', ]); + $table->addColumn('ldap_dn_hash', Types::STRING, [ + 'notnull' => false, + 'length' => 64, + ]); $table->setPrimaryKey(['owncloud_name']); - $table->addUniqueIndex(['ldap_dn'], 'ldap_dn_users'); + $table->addUniqueIndex(['ldap_dn_hash'], 'ldap_user_dn_hashes'); } if (!$schema->hasTable('ldap_group_mapping')) { @@ -81,8 +85,12 @@ class Version1010Date20200630192842 extends SimpleMigrationStep { 'length' => 255, 'default' => '', ]); - $table->setPrimaryKey(['ldap_dn']); - $table->addUniqueIndex(['owncloud_name'], 'owncloud_name_groups'); + $table->addColumn('ldap_dn_hash', Types::STRING, [ + 'notnull' => false, + 'length' => 64, + ]); + $table->setPrimaryKey(['owncloud_name']); + $table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes'); } if (!$schema->hasTable('ldap_group_members')) { |