diff --git a/core/Migrations/Version28000Date20230803221055.php b/core/Migrations/Version28000Date20230803221055.php index 8878a6f6cce9b..799eb15e06e91 100644 --- a/core/Migrations/Version28000Date20230803221055.php +++ b/core/Migrations/Version28000Date20230803221055.php @@ -52,9 +52,10 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $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) {