uninstall.sql 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. -- TABLES
  2. DROP TABLE IF EXISTS `bx_stories_entries`, `bx_stories_files`, `bx_stories_photos_resized`, `bx_stories_entries_media`, `bx_stories_cmts`, `bx_stories_cmts_notes`, `bx_stories_votes`, `bx_stories_votes_track`, `bx_stories_reactions`, `bx_stories_reactions_track`, `bx_stories_views_track`, `bx_stories_meta_keywords`, `bx_stories_meta_mentions`, `bx_stories_reports`, `bx_stories_reports_track`, `bx_stories_scores`, `bx_stories_scores_track`;
  3. -- STORAGES & TRANSCODERS
  4. DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_stories_files' OR `object` = 'bx_stories_photos_resized';
  5. DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_stories_files' OR `object` = 'bx_stories_photos_resized';
  6. DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_stories_preview', 'bx_stories_browse', 'bx_stories_big', 'bx_stories_video_poster_browse', 'bx_stories_video_poster_preview', 'bx_stories_video_poster_big', 'bx_stories_video_mp4', 'bx_stories_video_mp4_hd', 'bx_stories_proxy_preview', 'bx_stories_proxy_browse', 'bx_stories_proxy_cover');
  7. DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_stories_preview', 'bx_stories_browse', 'bx_stories_big', 'bx_stories_video_poster_browse', 'bx_stories_video_poster_preview', 'bx_stories_video_poster_big', 'bx_stories_video_mp4', 'bx_stories_video_mp4_hd');
  8. DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_stories_preview', 'bx_stories_browse', 'bx_stories_big', 'bx_stories_video_poster_browse', 'bx_stories_video_poster_preview', 'bx_stories_video_poster_big', 'bx_stories_video_mp4', 'bx_stories_video_mp4_hd');
  9. DELETE FROM `sys_transcoder_videos_files` WHERE `transcoder_object` IN('bx_stories_video_mp4', 'bx_stories_video_mp4_hd');
  10. -- FORMS
  11. DELETE FROM `sys_objects_form` WHERE `module` = 'bx_stories';
  12. DELETE FROM `sys_form_displays` WHERE `module` = 'bx_stories';
  13. DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_stories';
  14. DELETE FROM `sys_form_display_inputs` WHERE `display_name` LIKE 'bx_stories%';
  15. -- COMMENTS
  16. DELETE FROM `sys_objects_cmts` WHERE `Name` LIKE 'bx_stories%';
  17. -- VOTES
  18. DELETE FROM `sys_objects_vote` WHERE `Name` LIKE 'bx_stories%';
  19. -- SCORES
  20. DELETE FROM `sys_objects_score` WHERE `name` LIKE 'bx_stories%';
  21. -- REPORTS
  22. DELETE FROM `sys_objects_report` WHERE `name` LIKE 'bx_stories%';
  23. -- VIEWS
  24. DELETE FROM `sys_objects_view` WHERE `name` LIKE 'bx_stories%';
  25. -- CONTENT INFO
  26. DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_stories', 'bx_stories_cmts');
  27. DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_stories');
  28. -- SEARCH EXTENDED
  29. DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_stories';
  30. -- STUDIO: page & widget
  31. DELETE FROM `tp`, `tw`, `twb`, `tpw`
  32. 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`
  33. WHERE `tp`.`name` = 'bx_stories';