uninstall.sql 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. -- TABLES
  2. DROP TABLE IF EXISTS `bx_persons_data`,`bx_persons_pictures`, `bx_persons_pictures_resized`, `bx_persons_cmts`, `bx_persons_cmts_notes`, `bx_persons_views_track`, `bx_persons_votes`, `bx_persons_votes_track`, `bx_persons_reactions`, `bx_persons_reactions_track`, `bx_persons_favorites_track`, `bx_persons_reports`, `bx_persons_reports_track`, `bx_persons_meta_keywords`, `bx_persons_meta_locations`, `bx_persons_meta_mentions`, `bx_persons_scores`, `bx_persons_scores_track`, `bx_persons_skills`;
  3. -- PROFILES
  4. DELETE FROM sys_profiles WHERE `type` = 'bx_persons';
  5. -- STORAGES & TRANSCODERS
  6. DELETE FROM `sys_objects_storage` WHERE `object` IN('bx_persons_pictures', 'bx_persons_pictures_resized');
  7. DELETE FROM `sys_storage_tokens` WHERE `object` IN('bx_persons_pictures', 'bx_persons_pictures_resized');
  8. DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_persons_icon', 'bx_persons_thumb', 'bx_persons_avatar', 'bx_persons_avatar_big', 'bx_persons_picture', 'bx_persons_cover', 'bx_persons_cover_thumb', 'bx_persons_gallery', 'bx_persons_badge');
  9. DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_persons_icon', 'bx_persons_thumb', 'bx_persons_avatar', 'bx_persons_avatar_big', 'bx_persons_picture', 'bx_persons_cover', 'bx_persons_cover_thumb', 'bx_persons_gallery', 'bx_persons_badge');
  10. DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_persons_icon', 'bx_persons_thumb', 'bx_persons_avatar', 'bx_persons_avatar_big', 'bx_persons_picture', 'bx_persons_cover', 'bx_persons_cover_thumb', 'bx_persons_gallery', 'bx_persons_badge');
  11. -- FORMS
  12. DELETE FROM `sys_objects_form` WHERE `module` = 'bx_persons';
  13. DELETE FROM `sys_form_displays` WHERE `module` = 'bx_persons';
  14. DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_persons';
  15. DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN('bx_person_add', 'bx_person_delete', 'bx_person_edit', 'bx_person_edit_cover', 'bx_person_edit_badge', 'bx_person_view', 'bx_person_view_full', 'bx_person_skills', 'bx_person_skills_view');
  16. -- COMMENTS
  17. DELETE FROM `sys_objects_cmts` WHERE `Name` LIKE 'bx_persons%';
  18. -- VIEWS
  19. DELETE FROM `sys_objects_view` WHERE `name` = 'bx_persons';
  20. -- VOTES
  21. DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_persons', 'bx_persons_reactions');
  22. -- SCORES
  23. DELETE FROM `sys_objects_score` WHERE `name` = 'bx_persons';
  24. -- FAFORITES
  25. DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_persons';
  26. -- FEATURED
  27. DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_persons';
  28. -- REPORTS
  29. DELETE FROM `sys_objects_report` WHERE `name` = 'bx_persons';
  30. -- CONTENT INFO
  31. DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_persons', 'bx_persons_cmts');
  32. DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_persons');
  33. -- SEARCH EXTENDED
  34. DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_persons';
  35. -- STUDIO PAGE & WIDGET
  36. DELETE FROM `tp`, `tw`, `twb`, `tpw`
  37. 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`
  38. WHERE `tp`.`name` = 'bx_persons';