-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mario Danic <[email protected]>
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
* @author Robin Appelman <[email protected]> | ||
* @author Roeland Jago Douma <[email protected]> | ||
* @author Thomas Citharel <[email protected]> | ||
* @author Mario Danic <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
|
@@ -254,6 +255,19 @@ private function addCoreIndexes(OutputInterface $output) { | |
} | ||
} | ||
|
||
$output->writeln('<info>Check indices of the oc_properties table.</info>'); | ||
if ($schema->hasTable('properties')) { | ||
$table = $schema->getTable('properties'); | ||
if (!$table->hasIndex('properties_path_index')) { | ||
$output->writeln('<info>Adding properties_path_index index to the oc_properties table, this can take some time...</info>'); | ||
|
||
$table->addIndex(['userid', 'propertypath'], 'properties_path_index'); | ||
$this->connection->migrateToSchema($schema->getWrappedSchema()); | ||
$updated = true; | ||
$output->writeln('<info>oc_properties table updated successfully.</info>'); | ||
} | ||
} | ||
|
||
if (!$updated) { | ||
$output->writeln('<info>Done.</info>'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters