Skip to content

Commit 5b1f59c

Browse files
committed
Remove orphaned calendar data from deleted subscriptions
Closes #16833. Ref #13511 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
1 parent 148c6e6 commit 5b1f59c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ public function run(IOutput $output) {
5555
$orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendars', 'calendarid');
5656
$output->info(sprintf('%d changes without a calendar have been cleaned up', $orphanItems));
5757

58+
$orphanItems = $this->removeOrphanChildren('calendarobjects_props', 'calendarsubscriptions', 'objectid');
59+
$output->info(sprintf('%d properties from cached events without a calendar subscription have been cleaned up', $orphanItems));
60+
$orphanItems = $this->removeOrphanChildren('calendarobjects', 'calendarsubscriptions', 'calendarid');
61+
$output->info(sprintf('%d cached events without a calendar subscription have been cleaned up', $orphanItems));
62+
$orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendarsubscriptions', 'calendarid');
63+
$output->info(sprintf('%d changes without a calendar subscription have been cleaned up', $orphanItems));
64+
5865
$orphanItems = $this->removeOrphanChildren('cards', 'addressbooks', 'addressbookid');
5966
$output->info(sprintf('%d contacts without an addressbook have been cleaned up', $orphanItems));
6067
$orphanItems = $this->removeOrphanChildren('cards_properties', 'cards', 'cardid');

0 commit comments

Comments
 (0)