Skip to content

Instantly share code, notes, and snippets.

@jessedobbelaere
Last active June 21, 2016 19:03
Show Gist options
  • Save jessedobbelaere/cca210875f2ebf58853f to your computer and use it in GitHub Desktop.
Save jessedobbelaere/cca210875f2ebf58853f to your computer and use it in GitHub Desktop.
Fork CMS 3.6.6 uninstall.sql demo
-- Execute these queries to uninstall the module (used for development)
-- Use PHPMyAdmin's search functionality to see if all references to your module got deleted.
-- Drop module tables
DROP TABLE IF EXISTS video;
-- Remove from backend navigation
DELETE FROM backend_navigation WHERE label LIKE '%video%';
DELETE FROM backend_navigation WHERE url LIKE '%video%';
-- Remove from groups_rights
DELETE FROM groups_rights_actions WHERE module = 'video';
DELETE FROM groups_rights_modules WHERE module = 'video';
-- Remove from locale
DELETE FROM locale WHERE module = 'video';
DELETE FROM locale WHERE module = 'core' AND name LIKE '%video%';
-- Remove from modules
DELETE FROM modules WHERE name = 'video';
DELETE FROM modules_extras WHERE module = 'video';
DELETE FROM modules_settings WHERE module = 'video';
DELETE FROM modules_tags WHERE module = 'video';
-- Remove from search
DELETE FROM search_modules WHERE module = 'video';
-- Remove from Meta (not a good idea maybe)
# DELETE FROM meta WHERE keywords = '%video%';
@Diewy
Copy link

Diewy commented Oct 16, 2014

The last line can delete a whole lot more than just the module meta data.

@jessedobbelaere
Copy link
Author

True, indeed a bit dangerous, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment