Add uid_owner and uid_initiator share tabe indices
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
28eaacd59f
commit
b82cbe04df
|
@ -70,6 +70,12 @@ class Application extends App {
|
||||||
if (!$table->hasIndex('parent_index')) {
|
if (!$table->hasIndex('parent_index')) {
|
||||||
$subject->addHintForMissingSubject($table->getName(), 'parent_index');
|
$subject->addHintForMissingSubject($table->getName(), 'parent_index');
|
||||||
}
|
}
|
||||||
|
if (!$table->hasIndex('uid_owner')) {
|
||||||
|
$subject->addHintForMissingSubject($table->getName(), 'uid_owner');
|
||||||
|
}
|
||||||
|
if (!$table->hasIndex('uid_initiator')) {
|
||||||
|
$subject->addHintForMissingSubject($table->getName(), 'uid_initiator');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($schema->hasTable('filecache')) {
|
if ($schema->hasTable('filecache')) {
|
||||||
|
|
|
@ -98,6 +98,22 @@ class AddMissingIndices extends Command {
|
||||||
$updated = true;
|
$updated = true;
|
||||||
$output->writeln('<info>Share table updated successfully.</info>');
|
$output->writeln('<info>Share table updated successfully.</info>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$table->hasIndex('uid_owner')) {
|
||||||
|
$output->writeln('<info>Adding additional owner index to the share table, this can take some time...</info>');
|
||||||
|
$table->addIndex(['uid_owner'], 'owner_index');
|
||||||
|
$this->connection->migrateToSchema($schema->getWrappedSchema());
|
||||||
|
$updated = true;
|
||||||
|
$output->writeln('<info>Share table updated successfully.</info>');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$table->hasIndex('uid_initiator')) {
|
||||||
|
$output->writeln('<info>Adding additional initiator index to the share table, this can take some time...</info>');
|
||||||
|
$table->addIndex(['uid_initiator'], 'initiator_index');
|
||||||
|
$this->connection->migrateToSchema($schema->getWrappedSchema());
|
||||||
|
$updated = true;
|
||||||
|
$output->writeln('<info>Share table updated successfully.</info>');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($schema->hasTable('filecache')) {
|
if ($schema->hasTable('filecache')) {
|
||||||
|
|
|
@ -403,6 +403,8 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
|
||||||
$table->addIndex(['token'], 'token_index');
|
$table->addIndex(['token'], 'token_index');
|
||||||
$table->addIndex(['share_with'], 'share_with_index');
|
$table->addIndex(['share_with'], 'share_with_index');
|
||||||
$table->addIndex(['parent'], 'parent_index');
|
$table->addIndex(['parent'], 'parent_index');
|
||||||
|
$table->addIndex(['uid_owner'], 'owner_index');
|
||||||
|
$table->addIndex(['uid_initiator'], 'initiator_index');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$schema->hasTable('jobs')) {
|
if (!$schema->hasTable('jobs')) {
|
||||||
|
|
Loading…
Reference in New Issue