Skip to content
Permalink
Browse files

Bugfix: re-importing an existing remote ics calendar would not cleanu…

…p webcal_entry_categories

- remove webcal_entry_categories when you are deleting from the other tables.
- If you have dangling data in webcal_entry_categories, use the following SQL to cleanup:
`delete from webcal_entry_categories where cal_id not in (select cal_id from webcal_entry);`
  • Loading branch information...
craigk5n committed Jul 24, 2019
1 parent 667bfb3 commit 147699e17426d369ff007d93060f9d9ff50a3149
Showing with 2 additions and 0 deletions.
  1. +2 −0 tools/reload_remotes.php
@@ -166,6 +166,8 @@ function delete_events ( $nid ) {
[$delete_em[$i]] );
dbi_execute ( 'DELETE FROM webcal_entry_repeats_not WHERE cal_id = ?',
[$delete_em[$i]] );
dbi_execute ( 'DELETE FROM webcal_entry_categories WHERE cal_id = ?',
[$delete_em[$i]] );
dbi_execute ( 'DELETE FROM webcal_entry_log WHERE cal_entry_id = ?',
[$delete_em[$i]] );
dbi_execute ( 'DELETE FROM webcal_import_data WHERE cal_id = ?',

0 comments on commit 147699e

Please sign in to comment.
You can’t perform that action at this time.