diff options
Diffstat (limited to 'core/Command/Db/AddMissingIndices.php')
-rw-r--r-- | core/Command/Db/AddMissingIndices.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index 0bb6658e85e..02c89992105 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -221,6 +221,19 @@ class AddMissingIndices extends Command { } } + $output->writeln('<info>Check indices of the calendarobjects_props table.</info>'); + if ($schema->hasTable('calendarobjects_props')) { + $table = $schema->getTable('calendarobjects_props'); + if (!$table->hasIndex('calendarobject_calid_index')) { + $output->writeln('<info>Adding calendarobject_calid_index index to the calendarobjects_props table, this can take some time...</info>'); + + $table->addIndex(['calendarid', 'calendartype'], 'calendarobject_calid_index'); + $this->connection->migrateToSchema($schema->getWrappedSchema()); + $updated = true; + $output->writeln('<info>calendarobjects_props table updated successfully.</info>'); + } + } + if (!$updated) { $output->writeln('<info>Done.</info>'); } |