diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-04 12:27:44 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:20:29 +0100 |
commit | ce5192a46163992e7270b6532b60f0e8c3ded2e4 (patch) | |
tree | cbe41f162a9ff8b4e611953120a1bc8365a4e31c /apps/user_ldap/lib/Migration | |
parent | 9a1df9ddca45a2d20bc748b18a986166e2fa809c (diff) | |
download | nextcloud-server-ce5192a46163992e7270b6532b60f0e8c3ded2e4.tar.gz nextcloud-server-ce5192a46163992e7270b6532b60f0e8c3ded2e4.zip |
Fixed migration step for user_ldap
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/Version1130Date20211102154716.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php index dbf53cf66b5..198a79ef095 100644 --- a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php +++ b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php @@ -43,8 +43,7 @@ class Version1130Date20211102154716 extends SimpleMigrationStep { $changeSchema = false; foreach (['ldap_user_mapping', 'ldap_group_mapping'] as $tableName) { $table = $schema->getTable($tableName); - $column = $table->getColumn('ldap_dn_hash'); - if (!$column) { + if (!$table->hasColumn('ldap_dn_hash')) { $table->addColumn('ldap_dn_hash', Types::STRING, [ 'notnull' => true, 'length' => 64, @@ -76,6 +75,7 @@ class Version1130Date20211102154716 extends SimpleMigrationStep { $changeSchema = true; } if ($table->getPrimaryKeyColumns() !== ['owncloud_name']) { + $table->dropPrimaryKey(); $table->setPrimaryKey(['owncloud_name']); $changeSchema = true; } |