Skip to content

Commit 85d2c7e

Browse files
authored
Merge pull request #12312 from nextcloud/bugfix/11527/fix-index-name
Fix index names
2 parents 0f1edd5 + 4d20c42 commit 85d2c7e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

core/Application.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ function(GenericEvent $event) use ($container) {
7070
if (!$table->hasIndex('parent_index')) {
7171
$subject->addHintForMissingSubject($table->getName(), 'parent_index');
7272
}
73-
if (!$table->hasIndex('uid_owner')) {
74-
$subject->addHintForMissingSubject($table->getName(), 'uid_owner');
73+
if (!$table->hasIndex('owner_index')) {
74+
$subject->addHintForMissingSubject($table->getName(), 'owner_index');
7575
}
76-
if (!$table->hasIndex('uid_initiator')) {
77-
$subject->addHintForMissingSubject($table->getName(), 'uid_initiator');
76+
if (!$table->hasIndex('initiator_index')) {
77+
$subject->addHintForMissingSubject($table->getName(), 'initiator_index');
7878
}
7979
}
8080

core/Command/Db/AddMissingIndices.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ private function addShareTableIndicies(OutputInterface $output) {
9999
$output->writeln('<info>Share table updated successfully.</info>');
100100
}
101101

102-
if (!$table->hasIndex('uid_owner')) {
102+
if (!$table->hasIndex('owner_index')) {
103103
$output->writeln('<info>Adding additional owner index to the share table, this can take some time...</info>');
104104
$table->addIndex(['uid_owner'], 'owner_index');
105105
$this->connection->migrateToSchema($schema->getWrappedSchema());
106106
$updated = true;
107107
$output->writeln('<info>Share table updated successfully.</info>');
108108
}
109109

110-
if (!$table->hasIndex('uid_initiator')) {
110+
if (!$table->hasIndex('initiator_index')) {
111111
$output->writeln('<info>Adding additional initiator index to the share table, this can take some time...</info>');
112112
$table->addIndex(['uid_initiator'], 'initiator_index');
113113
$this->connection->migrateToSchema($schema->getWrappedSchema());

0 commit comments

Comments
 (0)