3

I have tons of spam accounts in my store (M2.2.2) and I'm curious - is it safe to remove them with well-tested pattern straight from customer_entity table? Since Magento 2 has triggers and it will do cascade remove on DELETE command - I believe it's 100% bulletproof. Am I wrong or not?

1 Answer 1

-3

You can use below queries for truncate customer data

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; TRUNCATE TABLE customer_grid_flat; TRUNCATE TABLE customer_log; TRUNCATE TABLE customer_log; TRUNCATE TABLE customer_visitor; TRUNCATE TABLE persistent_session; TRUNCATE TABLE wishlist; TRUNCATE TABLE wishlist_item; TRUNCATE TABLE wishlist_item_option;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.