Skip to content

ModuleUninstall

Vadym Honcharuk edited this page Sep 23, 2024 · 7 revisions

Magento 2 Module UnInstall

Here are the SQL queries to run if you plan to uninstall ElasticSuite completely :

DELETE FROM setup_module where module='Smile_ElasticsuiteAdminNotification';
DELETE FROM setup_module where module='Smile_ElasticsuiteAnalytics';

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalog';
DELETE FROM eav_attribute where attribute_code='use_name_in_product_search';
DELETE FROM eav_attribute where attribute_code='is_displayed_in_autocomplete';
DELETE FROM eav_attribute where attribute_code='sort_direction';
ALTER TABLE catalog_eav_attribute DROP COLUMN is_displayed_in_autocomplete;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_used_in_spellcheck;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_min_coverage_rate;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_max_size;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_sort_order;
ALTER TABLE search_query DROP COLUMN is_spellchecked;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_pattern;
ALTER TABLE catalog_eav_attribute DROP COLUMN display_precision;
ALTER TABLE catalog_eav_attribute DROP COLUMN sort_order_asc_missing;
ALTER TABLE catalog_eav_attribute DROP COLUMN sort_order_desc_missing;
ALTER TABLE catalog_eav_attribute DROP COLUMN facet_boolean_logic;
ALTER TABLE catalog_eav_attribute DROP COLUMN is_display_rel_nofollow;
ALTER TABLE catalog_eav_attribute DROP COLUMN include_zero_false_values;
DROP TABLE smile_elasticsuitecatalog_category_filterable_attribute;
DROP TABLE smile_elasticsuitecatalog_search_query_product_position;

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogGraphQl';

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogOptimizer';
DELETE FROM smile_elasticsuite_optimizer;
DELETE FROM smile_elasticsuite_optimizer_search_container;
DROP TABLE smile_elasticsuite_optimizer_limitation;
DROP TABLE smile_elasticsuite_optimizer_search_container;
DROP TABLE smile_elasticsuite_optimizer;

DELETE FROM setup_module where module='Smile_ElasticsuiteCatalogRule';

DELETE FROM setup_module where module='Smile_ElasticsuiteCore';
DROP TABLE smile_elasticsuite_relevance_config_data;

DELETE FROM setup_module where module='Smile_ElasticsuiteIndices';
DELETE FROM setup_module where module='Smile_ElasticsuiteSwatches';

DELETE FROM setup_module where module='Smile_ElasticsuiteThesaurus';
DROP TABLE smile_elasticsuite_thesaurus_expanded_terms;
DROP TABLE smile_elasticsuite_thesaurus_reference_terms;
DROP TABLE smile_elasticsuite_thesaurus_store;
DROP TABLE smile_elasticsuite_thesaurus;

DELETE FROM setup_module where module='Smile_ElasticsuiteTracker';
DROP TABLE elasticsuite_tracker_log_event;
DROP TABLE elasticsuite_tracker_log_customer_link;

DELETE FROM setup_module where module='Smile_ElasticsuiteVirtualCategory';
DELETE FROM eav_attribute where attribute_code='is_virtual_category';
DELETE FROM eav_attribute where attribute_code='virtual_category_root';
DELETE FROM eav_attribute where attribute_code='virtual_rule';
DROP TABLE smile_virtualcategory_catalog_category_product_position;
DELETE FROM eav_attribute where attribute_code='use_store_positions';
DELETE FROM eav_attribute where attribute_code='generate_root_category_subtree';

Please note that you may have to adapt the table names to fit your custom table prefix if needed.

Clone this wiki locally