|
@@ -444,6 +444,19 @@ class AddMissingIndices extends Command {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ $output->writeln('<info>Check indices of the oc_mounts table.</info>');
|
|
|
+ if ($schema->hasTable('mounts')) {
|
|
|
+ $table = $schema->getTable('mounts');
|
|
|
+ if (!$table->hasIndex('mounts_class_index')) {
|
|
|
+ $output->writeln('<info>Adding mounts_class_index index to the oc_mounts table, this can take some time...</info>');
|
|
|
+
|
|
|
+ $table->addIndex(['mount_provider_class'], 'mounts_class_index');
|
|
|
+ $this->connection->migrateToSchema($schema->getWrappedSchema());
|
|
|
+ $updated = true;
|
|
|
+ $output->writeln('<info>oc_mounts table updated successfully.</info>');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (!$updated) {
|
|
|
$output->writeln('<info>Done.</info>');
|
|
|
}
|