uninstall.sql 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. -- TABLES
  2. DROP TABLE IF EXISTS `bx_stream_streams`, `bx_stream_covers`, `bx_stream_photos_resized`, `bx_stream_cmts`, `bx_stream_cmts_notes`, `bx_stream_votes`, `bx_stream_votes_track`, `bx_stream_reactions`, `bx_stream_reactions_track`, `bx_stream_views_track`, `bx_stream_meta_keywords`, `bx_stream_meta_locations`, `bx_stream_meta_mentions`, `bx_stream_reports`, `bx_stream_reports_track`, `bx_stream_scores`, `bx_stream_scores_track`, `bx_stream_polls`, `bx_stream_polls_answers`, `bx_stream_polls_answers_votes`, `bx_stream_polls_answers_votes_track`;
  3. -- STORAGES & TRANSCODERS
  4. DELETE FROM `sys_objects_storage` WHERE `object` LIKE 'bx_stream_%';
  5. DELETE FROM `sys_storage_tokens` WHERE `object` LIKE 'bx_stream_%';
  6. DELETE FROM `sys_objects_transcoder` WHERE `object` LIKE 'bx_stream_%';
  7. DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` LIKE 'bx_stream_%';
  8. DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` LIKE 'bx_stream_%';
  9. -- FORMS
  10. DELETE FROM `sys_objects_form` WHERE `module` = 'bx_stream';
  11. DELETE FROM `sys_form_displays` WHERE `module` = 'bx_stream';
  12. DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_stream';
  13. DELETE FROM `sys_form_display_inputs` WHERE `display_name` LIKE 'bx_stream_%';
  14. -- PRE-VALUES
  15. DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_stream';
  16. DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_stream_cats');
  17. -- CATEGORIES
  18. DELETE FROM `sys_categories` WHERE `module` = 'bx_stream';
  19. DELETE FROM `sys_categories2objects` WHERE `module` = 'bx_stream';
  20. -- COMMENTS
  21. DELETE FROM `sys_objects_cmts` WHERE `Name` LIKE 'bx_stream%';
  22. -- VOTES
  23. DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_stream', 'bx_stream_reactions', 'bx_stream_poll_answers');
  24. -- SCORES
  25. DELETE FROM `sys_objects_score` WHERE `name` = 'bx_stream';
  26. -- REPORTS
  27. DELETE FROM `sys_objects_report` WHERE `name` = 'bx_stream';
  28. -- VIEWS
  29. DELETE FROM `sys_objects_view` WHERE `name` = 'bx_stream';
  30. -- FEATURED
  31. DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_stream';
  32. -- CONTENT INFO
  33. DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_stream', 'bx_stream_cmts');
  34. DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_stream');
  35. -- SEARCH EXTENDED
  36. DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_stream';
  37. -- LOGS
  38. DELETE FROM `sys_objects_logs` WHERE `module` = 'bx_stream';
  39. -- STUDIO: page & widget
  40. DELETE FROM `tp`, `tw`, `twb`, `tpw`
  41. 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`
  42. WHERE `tp`.`name` = 'bx_stream';