mirror of
https://github.com/nextcloud/server.git
synced 2026-02-19 02:38:40 -05:00
fix: add index on migration only if needed
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
489624bb3a
commit
91c92f533e
1 changed files with 3 additions and 1 deletions
|
|
@ -52,7 +52,9 @@ class Version28000Date20230803221055 extends SimpleMigrationStep {
|
|||
$column = $table->getColumn('user_id');
|
||||
$column->setNotnull(false);
|
||||
|
||||
$table->addIndex(['user_id', 'app_id', 'identifier'], 'tp_tasks_uid_appid_ident');
|
||||
if (!$table->hasIndex('tp_tasks_uid_appid_ident')) {
|
||||
$table->addIndex(['user_id', 'app_id', 'identifier'], 'tp_tasks_uid_appid_ident');
|
||||
}
|
||||
|
||||
$changed = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue