To enable calendar in our production server we need to ensure that we can purge all data from our systems in case we need it (for GPRD requirements)
(edit 2023-05-24 extend proposal with @tcit advices)
I’ve tried a couple of methods:
- A user can delete all its information just removing the calendar (it will remain on trash bin)
- An admin can purge al calendar information of a user using occ dav:remove-calendar uid name (use --force to avoid trash bin)
- An admin can purge all information of user including calendars removing the user itself
- Finally, I’ve tested to truncate all calendar related tables from database. Even with deck & calendars active, method seems to work fine and is able to recreate Deck cards dates. (extended with @tcit advices)
truncate table oc_calendar_appt_configs;
truncate table oc_calendar_appt_bookings;
truncate table oc_calendar_invitations;
truncate table oc_calendar_reminders;
truncate table oc_calendar_resources;
truncate table oc_calendar_resources_md;
truncate table oc_calendar_rooms;
truncate table oc_calendar_rooms_md;
truncate table oc_calendarchanges;
truncate table oc_calendarobjects;
truncate table oc_calendarobjects_props;
truncate table oc_calendars;
truncate table oc_calendarsubscriptions;
truncate table oc_schedulingobjects;
delete from oc_properties where propertypath like 'calendars/%';
delete from oc_dav_shares where type = 'calendar';
delete from oc_preferences where appid = 'dav';
delete from oc_preferences where appid = 'calendar';
delete from oc_activity where app = 'dav';
delete from oc_activity_mq where amq_appid = 'dav';
delete from oc_activity_mq where amq_appid = 'calendar';
Is method 4 a safe way to purge all calendar data? Is there any other deep way to drop/truncate tables and recreates structures?