From 3fa8aa736ffc16a75b9fd3e46f127dacb5b84788 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 8 Sep 2022 09:43:56 -0700 Subject: [PATCH] Attempt to create index only once --- lib/Migration/Version000000Date20220812163631.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Migration/Version000000Date20220812163631.php b/lib/Migration/Version000000Date20220812163631.php index 93cc582f..641cacb1 100644 --- a/lib/Migration/Version000000Date20220812163631.php +++ b/lib/Migration/Version000000Date20220812163631.php @@ -76,11 +76,11 @@ class Version000000Date20220812163631 extends SimpleMigrationStep { $table->addIndex(['uid'], 'memories_uid_index'); $table->addIndex(['uid', 'dayid'], 'memories_ud_index'); $table->addUniqueIndex(['uid', 'fileid'], 'memories_day_uf_ui'); - } - if ($schema->hasTable('filecache')) { - $table = $schema->getTable('filecache'); - $table->addIndex(['path'], 'memories_path_index'); + if ($schema->hasTable('filecache')) { + $table = $schema->getTable('filecache'); + $table->addIndex(['path'], 'memories_path_index'); + } } return $schema;