From 9e5f3d5cc4d6c1803c922435aedffc133fc54feb Mon Sep 17 00:00:00 2001 From: Simon Hobbs Date: Fri, 4 Jun 2021 00:32:04 +1000 Subject: [PATCH] Add revision_id index for certain joins, drupal.org/node/3211894/edit. --- src/Storage/DbalNestedSetSchema.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Storage/DbalNestedSetSchema.php b/src/Storage/DbalNestedSetSchema.php index d8e57b66..a30f07e5 100644 --- a/src/Storage/DbalNestedSetSchema.php +++ b/src/Storage/DbalNestedSetSchema.php @@ -23,6 +23,7 @@ public function create() { $tree->addColumn("depth", "integer", ["unsigned" => TRUE]); $tree->setPrimaryKey(['id', 'revision_id']); + $tree->addIndex(['revision_id']); $tree->addIndex(['id', 'revision_id', 'left_pos', 'right_pos', 'depth']); $tree->addIndex(['left_pos', 'right_pos']); $tree->addIndex(['right_pos']);