Skip to content

Commit 574b98d

Browse files
committed
refactor: migrate app repair steps to new interface
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 92b2cda commit 574b98d

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

apps/dav/appinfo/info.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
<step>OCA\DAV\Migration\RemoveOrphanEventsAndContacts</step>
4848
<step>OCA\DAV\Migration\RemoveClassifiedEventActivity</step>
4949
<step>OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions</step>
50+
<!-- expensive steps -->
51+
<step>OCA\DAV\Migration\DeleteSchedulingObjects</step>
52+
<step>OCA\DAV\Migration\RemoveObjectProperties</step>
5053
</post-migration>
5154
<live-migration>
5255
<step>OCA\DAV\Migration\ChunkCleanup</step>

apps/dav/lib/Migration/DeleteSchedulingObjects.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
use OCP\AppFramework\Utility\ITimeFactory;
1414
use OCP\BackgroundJob\IJobList;
1515
use OCP\Migration\IOutput;
16-
use OCP\Migration\IRepairStep;
16+
use OCP\Migration\IRepairStepExpensive;
1717

18-
class DeleteSchedulingObjects implements IRepairStep {
18+
class DeleteSchedulingObjects implements IRepairStepExpensive {
1919
public function __construct(
2020
private IJobList $jobList,
2121
private ITimeFactory $time,

apps/dav/lib/Migration/RemoveObjectProperties.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
use OCP\DB\QueryBuilder\IQueryBuilder;
1010
use OCP\IDBConnection;
1111
use OCP\Migration\IOutput;
12-
use OCP\Migration\IRepairStep;
12+
use OCP\Migration\IRepairStepExpensive;
1313

14-
class RemoveObjectProperties implements IRepairStep {
14+
class RemoveObjectProperties implements IRepairStepExpensive {
1515
private const RESOURCE_TYPE_PROPERTY = '{DAV:}resourcetype';
1616
private const ME_CARD_PROPERTY = '{http://calendarserver.org/ns/}me-card';
1717
private const CALENDAR_TRANSP_PROPERTY = '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp';

apps/files_sharing/appinfo/info.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Turning the feature off removes shared files and folders on the server for all s
4242
<step>OCA\Files_Sharing\Migration\OwncloudGuestShareType</step>
4343
<step>OCA\Files_Sharing\Migration\SetPasswordColumn</step>
4444
<step>OCA\Files_Sharing\Migration\SetAcceptedStatus</step>
45+
<!-- expensive steps -->
46+
<step>OCA\Files_Sharing\Repair\CleanupShareTarget</step>
4547
</post-migration>
4648
</repair-steps>
4749

lib/private/Repair.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
use OC\Repair\RepairInvalidShares;
5757
use OC\Repair\RepairLogoDimension;
5858
use OC\Repair\RepairMimeTypes;
59-
use OCA\DAV\Migration\DeleteSchedulingObjects;
60-
use OCA\DAV\Migration\RemoveObjectProperties;
61-
use OCA\Files_Sharing\Repair\CleanupShareTarget;
6259
use OCP\EventDispatcher\IEventDispatcher;
6360
use OCP\IConfig;
6461
use OCP\IDBConnection;

0 commit comments

Comments
 (0)