Remove Cart2Quote for Magento2 from database

Make sure to backup the database prior to executing any of the following commands.

Execute the following statements to remove all Cart2Quote references from your database:

Note: in this script there is no table prefix used

SET FOREIGN_KEY_CHECKS=0;
--
-- Remove the module from setup_module table
--
DELETE FROM `setup_module` WHERE `setup_module`.`module` = "Cart2Quote_Quotation";
--
-- Remove Cart2Quote configuration from core_config_data
--
DELETE FROM `core_config_data` WHERE `path` LIKE "cart2quote_%";
--
-- Remove Sequence information used for the increment id's
--
DELETE FROM `sales_sequence_profile` WHERE `meta_id` IN (SELECT `meta_id` FROM `sales_sequence_meta` WHERE `entity_type` LIKE "quote");
DELETE FROM `sales_sequence_meta` WHERE `entity_type` LIKE "quote";
--
-- Remove the increment id tables per store
-- NOTE: add the statement "DROP TABLE IF EXISTS `sequence_quote_{store_id}`;" per store id
--
DROP TABLE IF EXISTS `sequence_quote_0`;

--
-- Remove all the Cart2Quote tables
--
DROP TABLE IF EXISTS `quotation_quote`;
DROP TABLE IF EXISTS `quotation_quote_status`;
DROP TABLE IF EXISTS `quotation_quote_status_history`;
DROP TABLE IF EXISTS `quotation_quote_status_label`;
DROP TABLE IF EXISTS `quotation_quote_status_state`;
DROP TABLE IF EXISTS `quotation_quote_tier_item`;

--
-- Remove the column "linked_quotation_id" from the "quote" table
--
ALTER TABLE `quote` DROP COLUMN `linked_quotation_id`;


SET FOREIGN_KEY_CHECKS=1;

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk