$subject->addHintForMissingSubject($table->getName(), 'schedulobj_principuri_index');
}
}
+
+ if ($schema->hasTable('properties')) {
+ $table = $schema->getTable('properties');
+ if (!$table->hasIndex('properties_path_index')) {
+ $subject->addHintForMissingSubject($table->getName(), 'properties_path_index');
+ }
+ }
}
);
* @author Robin Appelman <robin@icewind.nl>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Citharel <nextcloud@tcit.fr>
+ * @author Mario Danic <mario@lovelyhq.com>
*
* @license GNU AGPL version 3 or any later version
*
}
}
+ $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>');
}
]);
$table->setPrimaryKey(['id']);
$table->addIndex(['userid'], 'property_index');
+ $table->addIndex(['userid', 'propertypath'], 'properties_path_index');
}
if (!$schema->hasTable('share')) {