-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add repair job to deleted duplicated cached messages
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
- Loading branch information
1 parent
617fbb8
commit 7075e64
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Mail\Migration; | ||
|
||
use OCA\Mail\Db\MessageMapper; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\IRepairStep; | ||
|
||
class DeleteDuplicateUids implements IRepairStep { | ||
public function __construct( | ||
private MessageMapper $messageMapper, | ||
) { | ||
} | ||
|
||
public function getName(): string { | ||
return 'Delete duplicated cached messages'; | ||
} | ||
|
||
public function run(IOutput $output): void { | ||
$this->messageMapper->deleteDuplicateUids(); | ||
} | ||
} |