diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2023-11-02 02:02:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 02:02:27 +0100 |
commit | 82f23fbfe140d179910df408d1e3124318b83e64 (patch) | |
tree | 3316ff5c95a92d6b5390d65a6c881131628c5bcc /core | |
parent | 58c983122901c6716d3b4e70ae24126d4bb6663b (diff) | |
parent | a075c85eef0bc18bb442eb887327cf4d7651ea69 (diff) | |
download | nextcloud-server-82f23fbfe140d179910df408d1e3124318b83e64.tar.gz nextcloud-server-82f23fbfe140d179910df408d1e3124318b83e64.zip |
Merge pull request #41230 from nextcloud/indexFix
fix: add index on migration only if needed
Diffstat (limited to 'core')
-rw-r--r-- | core/Migrations/Version28000Date20230803221055.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Migrations/Version28000Date20230803221055.php b/core/Migrations/Version28000Date20230803221055.php index 8878a6f6cce..799eb15e06e 100644 --- a/core/Migrations/Version28000Date20230803221055.php +++ b/core/Migrations/Version28000Date20230803221055.php @@ -52,9 +52,10 @@ class Version28000Date20230803221055 extends SimpleMigrationStep { $column = $table->getColumn('user_id'); $column->setNotnull(false); - $table->addIndex(['user_id', 'app_id', 'identifier'], 'tp_tasks_uid_appid_ident'); - - $changed = true; + if (!$table->hasIndex('tp_tasks_uid_appid_ident')) { + $table->addIndex(['user_id', 'app_id', 'identifier'], 'tp_tasks_uid_appid_ident'); + $changed = true; + } } if ($changed) { |