Skip to content

Commit

Permalink
fix(postgres): Use a unique index name
Browse files Browse the repository at this point in the history
ts_session is already used in Talk since Nextcloud 22.
Unluckily in Postgres index names have to be unique inside the database,
not only per table.

Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot-nextcloud[bot] committed Jul 20, 2023
1 parent 4662268 commit 9b595cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Listeners/AddMissingIndicesListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public function handle(Event $event): void {
return;
}

$event->addMissingIndex('text_steps', 'ts_session', ['session_id']);
$event->addMissingIndex('text_steps', 'textstep_session', ['session_id']);
}
}
2 changes: 1 addition & 1 deletion lib/Migration/Version010000Date20190617184535.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
$table->setPrimaryKey(['id']);
$table->addIndex(['document_id'], 'rd_steps_did_idx');
$table->addIndex(['version'], 'rd_steps_version_idx');
$table->addIndex(['session_id'], 'ts_session');
$table->addIndex(['session_id'], 'textstep_session');
}
return $schema;
}
Expand Down

0 comments on commit 9b595cb

Please sign in to comment.