diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php
index 820997593661c..b30fa43ab3917 100644
--- a/core/Command/Db/AddMissingIndices.php
+++ b/core/Command/Db/AddMissingIndices.php
@@ -84,12 +84,20 @@ private function addShareTableIndicies(OutputInterface $output) {
if ($schema->hasTable('share')) {
$table = $schema->getTable('share');
if (!$table->hasIndex('share_with_index')) {
- $output->writeln('Adding additional index to the share table, this can take some time...');
+ $output->writeln('Adding additional share_with index to the share table, this can take some time...');
$table->addIndex(['share_with'], 'share_with_index');
$this->connection->migrateToSchema($schema->getWrappedSchema());
$updated = true;
$output->writeln('Share table updated successfully.');
}
+
+ if (!$table->hasIndex('parent_index')) {
+ $output->writeln('Adding additional parent index to the share table, this can take some time...');
+ $table->addIndex(['parent'], 'parent_index');
+ $this->connection->migrateToSchema($schema->getWrappedSchema());
+ $updated = true;
+ $output->writeln('Share table updated successfully.');
+ }
}
if (!$updated) {
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php
index 139129eb60096..05623e435c3be 100644
--- a/core/Migrations/Version13000Date20170718121200.php
+++ b/core/Migrations/Version13000Date20170718121200.php
@@ -401,6 +401,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
$table->addIndex(['file_source'], 'file_source_index');
$table->addIndex(['token'], 'token_index');
$table->addIndex(['share_with'], 'share_with_index');
+ $table->addIndex(['parent'], 'parent_index');
}
if (!$schema->hasTable('jobs')) {