Skip to content

Commit

Permalink
Remove orphaned calendar data from deleted subscriptions
Browse files Browse the repository at this point in the history
Closes #16833. Ref #13511

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld committed Aug 22, 2019
1 parent 148c6e6 commit 5b1f59c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ public function run(IOutput $output) {
$orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendars', 'calendarid');
$output->info(sprintf('%d changes without a calendar have been cleaned up', $orphanItems));

$orphanItems = $this->removeOrphanChildren('calendarobjects_props', 'calendarsubscriptions', 'objectid');
$output->info(sprintf('%d properties from cached events without a calendar subscription have been cleaned up', $orphanItems));
$orphanItems = $this->removeOrphanChildren('calendarobjects', 'calendarsubscriptions', 'calendarid');
$output->info(sprintf('%d cached events without a calendar subscription have been cleaned up', $orphanItems));
$orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendarsubscriptions', 'calendarid');
$output->info(sprintf('%d changes without a calendar subscription have been cleaned up', $orphanItems));

$orphanItems = $this->removeOrphanChildren('cards', 'addressbooks', 'addressbookid');
$output->info(sprintf('%d contacts without an addressbook have been cleaned up', $orphanItems));
$orphanItems = $this->removeOrphanChildren('cards_properties', 'cards', 'cardid');
Expand Down

0 comments on commit 5b1f59c

Please sign in to comment.