Attempt to create index only once

pull/37/head
Varun Patil 2022-09-08 09:43:56 -07:00
parent 5f2bd0eb7a
commit 3fa8aa736f
1 changed files with 4 additions and 4 deletions

View File

@ -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;