Skip to content

Commit bca864d

Browse files
Merge pull request #49677 from nextcloud/fix/db/systag-by-objectid-index-new-installation
fix(db): Create the systag_by_objectid index for new installations
2 parents 41c5364 + 73079a6 commit bca864d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

core/Migrations/Version13000Date20170718121200.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,8 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
730730
$table->setPrimaryKey(['objecttype', 'objectid', 'systemtagid'], 'som_pk');
731731
// $table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping');
732732
$table->addIndex(['systemtagid', 'objecttype'], 'systag_by_tagid');
733+
// systag_by_objectid was added later and might be missing in older deployments
734+
$table->addIndex(['objectid'], 'systag_by_objectid');
733735
}
734736

735737
if (!$schema->hasTable('systemtag_group')) {

0 commit comments

Comments
 (0)