Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid expensive index recreation #3694

Merged
merged 5 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<repair-steps>
<pre-migration>
<step>OCA\Polls\Migration\RepairSteps\RemoveObsoleteMigrations</step>
<step>OCA\Polls\Migration\RepairSteps\RemoveIndices</step>
</pre-migration>
<post-migration>
<step>OCA\Polls\Migration\RepairSteps\DropOrphanedTables</step>
Expand Down
12 changes: 9 additions & 3 deletions lib/Command/Db/Rebuild.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2021 Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
/**
* SPDX-FileCopyrightText: 2021 Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Polls\Command\Db;
Expand All @@ -23,6 +23,12 @@ class Rebuild extends Command {
protected array $operationHints = [
'All polls tables will get checked against the current schema.',
'NO data migration will be executed, so make sure you have a backup of your database.',
'',
'*****************************',
'** Please understand **',
'*****************************',
'The process will also recreate all indices and foreign key constraints.',
'This can lead to a database performance impact on the app after the recreation is done.',
];

public function __construct(
Expand Down