Created
May 6, 2013 13:19
-
-
Save yireo/5525071 to your computer and use it in GitHub Desktop.
Vm2Mage SQL-file to wipe out all Magento customers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Disable foreign key checks temporarily -- | |
SET SQL_MODE=''; | |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'; | |
-- Reset all vm2mage information | |
TRUNCATE TABLE `vm2mage_categories`; | |
-- Reset all customer information | |
TRUNCATE TABLE `customer_address_entity`; | |
TRUNCATE TABLE `customer_address_entity_datetime`; | |
TRUNCATE TABLE `customer_address_entity_decimal`; | |
TRUNCATE TABLE `customer_address_entity_int`; | |
TRUNCATE TABLE `customer_address_entity_text`; | |
TRUNCATE TABLE `customer_address_entity_varchar`; | |
TRUNCATE TABLE `customer_entity`; | |
TRUNCATE TABLE `customer_entity_datetime`; | |
TRUNCATE TABLE `customer_entity_decimal`; | |
TRUNCATE TABLE `customer_entity_int`; | |
TRUNCATE TABLE `customer_entity_text`; | |
TRUNCATE TABLE `customer_entity_varchar`; | |
-- Re-enable foreign key checks -- | |
SET SQL_MODE=IFNULL(@OLD_SQL_MODE,''); | |
SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS,0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment