Skip to content

Instantly share code, notes, and snippets.

@michelbrito
Last active December 2, 2016 19:42

Revisions

  1. michelbrito revised this gist Sep 19, 2014. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion delete_all_customers.sql
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    SET FOREIGN_KEY_CHECKS = 0;

    TRUNCATE TABLE `customer_address_entity`;
    TRUNCATE TABLE `customer_address_entity_datetime`;
    TRUNCATE TABLE `customer_address_entity_decimal`;
    @@ -9,4 +11,6 @@ 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`;
    TRUNCATE TABLE `customer_entity_varchar`;

    SET FOREIGN_KEY_CHECKS = 1;
  2. michelbrito created this gist Feb 11, 2011.
    12 changes: 12 additions & 0 deletions delete_all_customers.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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`;