From 9e54aa5216a1f32c5d48a3d07a7c99801260cfd6 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 5 Dec 2024 17:49:13 +0100 Subject: [PATCH] fix(db): Create the systag_by_objectid index for new installations Signed-off-by: Christoph Wurst --- core/Migrations/Version13000Date20170718121200.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 819eb84f11845..fff993f75548f 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -730,6 +730,8 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op $table->setPrimaryKey(['objecttype', 'objectid', 'systemtagid'], 'som_pk'); // $table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping'); $table->addIndex(['systemtagid', 'objecttype'], 'systag_by_tagid'); + // systag_by_objectid was added later and might be missing in older deployments + $table->addIndex(['objectid'], 'systag_by_objectid'); } if (!$schema->hasTable('systemtag_group')) {