Skip to content

Instantly share code, notes, and snippets.

@skazhikadyadya
Forked from ProxiBlue/EE-TO-CE_Downgrade
Last active March 22, 2020 16:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save skazhikadyadya/a55954f85c56361bd696a812cb13af09 to your computer and use it in GitHub Desktop.
Downgrade script for magento EE to CE #magento
#!/bin/bash
#first param = db user, second param = db name
rm -rf app/code/core/Enterprise
rm -rf downloader/template/enterprise
rm -rf app/design/install/default/enterprise
rm -rf app/design/frontend/enterprise
rm -rf app/design/adminhtml/default/default/layout/enterprise
rm -rf app/design/adminhtml/default/default/template/enterprise
rm -f app/locale/en_US/Enterprise_*.xml
rm -rf skin/adminhtml/default/enterprise
rm -rf skin/frontend/enterprise
rm -rf skin/install/default/enterprise
rm -f app/etc/modules/Enterprise_*.xml
rm -f app/etc/enterprise.xml
rm -rf app/locale/en_US/template/email/enterprise/
rm -rf js/enterprise
rm -rf errors/enterprise
rm -f LICENSE_EE.txt
rm -f LICENSE_EE.html
mysql -u $1 -p -C $2 <<QUERY_INPUT
DELETE FROM eav_attribute WHERE source_model LIKE 'enterprise_%';
DELETE FROM eav_attribute WHERE backend_model LIKE 'enterprise_%';
DELETE FROM eav_attribute WHERE attribute_code IN ('gift_wrapping_available', 'gift_wrapping_price');
UPDATE eav_attribute SET backend_table = NULL WHERE attribute_code = 'url_key';
TRUNCATE TABLE core_url_rewrite;
SELECT @entity_type_id:=entity_type_id FROM eav_entity_type WHERE entity_type_code = 'catalog_product';
SELECT @attribute_id:=attribute_id FROM eav_attribute WHERE attribute_code = 'url_key' AND entity_type_id = @entity_type_id;
DELETE FROM cron_schedule WHERE job_code like 'enterprise%';
DELETE FROM core_config_data where path like '%enterprise%'
QUERY_INPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment