1
0

uninstall.sql 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. SET @sName = 'bx_timeline';
  2. DROP TABLE IF EXISTS `bx_timeline_events`, `bx_timeline_events_slice`, `bx_timeline_events2users`, `bx_timeline_handlers`;
  3. DROP TABLE IF EXISTS `bx_timeline_ef_links`, `bx_timeline_ef_photos`, `bx_timeline_ef_videos`, `bx_timeline_ef_files`, `bx_timeline_ef_polls`;
  4. DROP TABLE IF EXISTS `bx_timeline_mute`;
  5. DROP TABLE IF EXISTS `bx_timeline_photos`, `bx_timeline_photos_processed`, `bx_timeline_photos2events`;
  6. DROP TABLE IF EXISTS `bx_timeline_videos`, `bx_timeline_videos_processed`, `bx_timeline_videos2events`;
  7. DROP TABLE IF EXISTS `bx_timeline_files`, `bx_timeline_files2events`;
  8. DROP TABLE IF EXISTS `bx_timeline_links`, `bx_timeline_links2events`;
  9. DROP TABLE IF EXISTS `bx_timeline_reposts_track`;
  10. DROP TABLE IF EXISTS `bx_timeline_comments`;
  11. DROP TABLE IF EXISTS `bx_timeline_views_track`;
  12. DROP TABLE IF EXISTS `bx_timeline_votes`, `bx_timeline_votes_track`, `bx_timeline_reactions`, `bx_timeline_reactions_track`;
  13. DROP TABLE IF EXISTS `bx_timeline_meta_keywords`, `bx_timeline_meta_locations`, `bx_timeline_meta_mentions`;
  14. DROP TABLE IF EXISTS `bx_timeline_reports`, `bx_timeline_reports_track`;
  15. DROP TABLE IF EXISTS `bx_timeline_hot_track`;
  16. DROP TABLE IF EXISTS `bx_timeline_scores`, `bx_timeline_scores_track`;
  17. DROP TABLE IF EXISTS `bx_timeline_cmts_notes`;
  18. DROP TABLE IF EXISTS `bx_timeline_polls`, `bx_timeline_polls_answers`, `bx_timeline_polls_answers_votes`, `bx_timeline_polls_answers_votes_track`;
  19. -- STORAGES, TRANSCODERS, UPLOADERS
  20. DELETE FROM `sys_objects_uploader` WHERE `object` LIKE 'bx_timeline%';
  21. DELETE FROM `sys_objects_storage` WHERE `object` LIKE 'bx_timeline%';
  22. DELETE FROM `sys_objects_transcoder` WHERE `object` LIKE 'bx_timeline%';
  23. DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` LIKE 'bx_timeline%';
  24. DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` LIKE 'bx_timeline%';
  25. DELETE FROM `sys_transcoder_videos_files` WHERE `transcoder_object` LIKE 'bx_timeline%';
  26. -- Forms All
  27. DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN (SELECT `display_name` FROM `sys_form_displays` WHERE `module` = @sName);
  28. DELETE FROM `sys_form_inputs` WHERE `module` = @sName;
  29. DELETE FROM `sys_form_displays` WHERE `module` = @sName;
  30. DELETE FROM `sys_objects_form` WHERE `module` = @sName;
  31. -- COMMENTS
  32. DELETE FROM `sys_objects_cmts` WHERE `Name` IN ('bx_timeline', 'bx_timeline_notes');
  33. -- VIEWS
  34. DELETE FROM `sys_objects_view` WHERE `name` = 'bx_timeline' LIMIT 1;
  35. -- VOTES
  36. DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_timeline', 'bx_timeline_reactions', 'bx_timeline_poll_answers');
  37. -- SCORES
  38. DELETE FROM `sys_objects_score` WHERE `name` = 'bx_timeline';
  39. -- REPORTS
  40. DELETE FROM `sys_objects_report` WHERE `Name` = 'bx_timeline' LIMIT 1;
  41. -- CONTENT INFO
  42. DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_timeline', 'bx_timeline_cmts');
  43. -- STUDIO PAGE & WIDGET
  44. DELETE FROM `tp`, `tw`, `twb`, `tpw`
  45. USING `sys_std_pages` AS `tp` LEFT JOIN `sys_std_widgets` AS `tw` ON `tp`.`id` = `tw`.`page_id` LEFT JOIN `sys_std_widgets_bookmarks` AS `twb` ON `tw`.`id` = `twb`.`widget_id` LEFT JOIN `sys_std_pages_widgets` AS `tpw` ON `tw`.`id` = `tpw`.`widget_id`
  46. WHERE `tp`.`name` = @sName;