From a3296e18ae6ab08cb895f3b3b6650a14d5d1e50a Mon Sep 17 00:00:00 2001 From: Daku Date: Wed, 11 May 2016 14:49:22 +0100 Subject: [PATCH] create index for has_children --- ext/relatationships/main.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/relatationships/main.php b/ext/relatationships/main.php index 5bbfe0b0..90875300 100644 --- a/ext/relatationships/main.php +++ b/ext/relatationships/main.php @@ -21,6 +21,12 @@ class Relationships extends Extension { $config->set_int("ext_relationships_version", 1); log_info("relationships", "extension installed"); } + if ($config->get_int("ext_relationships_version") < 2){ + $database->execute("CREATE INDEX images__has_children ON images(has_children)"); + + $config->set_int("ext_relationships_version", 2); + log_info("relationships", "extension updated"); + } } public function onImageInfoSet(ImageInfoSetEvent $event) {