Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-11-18 12:40:55 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-12-14 18:50:49 +0300
commita51e366b0a94be295466d5cc325d1625d0fd845c (patch)
tree93ccbfa92caa8e3db192689aa2a49e5b3c7dc211
parent2a726a33e8feba9e0bf51d0e5b3dd3503c3206e0 (diff)
Add an index for directory_uuid as well
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--apps/user_ldap/lib/Migration/Version1010Date20200630192842.php2
-rw-r--r--apps/user_ldap/lib/Migration/Version1130Date20211102154716.php8
2 files changed, 10 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
index 7d82df70d8f..c065eca0fa0 100644
--- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
+++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
@@ -66,6 +66,7 @@ class Version1010Date20200630192842 extends SimpleMigrationStep {
]);
$table->setPrimaryKey(['owncloud_name']);
$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_user_dn_hashes');
+ $table->addUniqueIndex(['directory_uuid'], 'ldap_user_directory_uuid');
}
if (!$schema->hasTable('ldap_group_mapping')) {
@@ -91,6 +92,7 @@ class Version1010Date20200630192842 extends SimpleMigrationStep {
]);
$table->setPrimaryKey(['owncloud_name']);
$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes');
+ $table->addUniqueIndex(['directory_uuid'], 'ldap_group_directory_uuid');
}
if (!$schema->hasTable('ldap_group_members')) {
diff --git a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
index 829e0d5a58c..144efad0ead 100644
--- a/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
+++ b/apps/user_ldap/lib/Migration/Version1130Date20211102154716.php
@@ -64,6 +64,10 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_user_dn_hashes');
$changeSchema = true;
}
+ if (!$table->hasIndex('ldap_user_directory_uuid')) {
+ $table->addUniqueIndex(['directory_uuid'], 'ldap_user_directory_uuid');
+ $changeSchema = true;
+ }
} else {
if ($table->hasIndex('owncloud_name_groups')) {
$table->dropIndex('owncloud_name_groups');
@@ -73,6 +77,10 @@ class Version1130Date20211102154716 extends SimpleMigrationStep {
$table->addUniqueIndex(['ldap_dn_hash'], 'ldap_group_dn_hashes');
$changeSchema = true;
}
+ if (!$table->hasIndex('ldap_group_directory_uuid')) {
+ $table->addUniqueIndex(['directory_uuid'], 'ldap_group_directory_uuid');
+ $changeSchema = true;
+ }
if (!$table->hasPrimaryKey() || ($table->getPrimaryKeyColumns() !== ['owncloud_name'])) {
$table->dropPrimaryKey();
$table->setPrimaryKey(['owncloud_name']);