Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shopware Database Clean: Remove Customers and Orders.
#https://docs.shopware.com/de/shopware-5-de/tutorials-und-faq/sql-tipps-tricks
SET foreign_key_checks = 0;
TRUNCATE `s_user`;
TRUNCATE `s_user_addresses`;
TRUNCATE `s_user_addresses_attributes`;
TRUNCATE `s_user_attributes`;
TRUNCATE `s_user_billingaddress`;
TRUNCATE `s_user_billingaddress_attributes`;
TRUNCATE `s_user_shippingaddress`;
TRUNCATE `s_user_shippingaddress_attributes`;
TRUNCATE `s_order`;
TRUNCATE `s_order_attributes`;
TRUNCATE `s_order_basket`;
TRUNCATE `s_order_basket_attributes`;
TRUNCATE `s_order_billingaddress`;
TRUNCATE `s_order_billingaddress_attributes`;
TRUNCATE `s_order_comparisons`;
TRUNCATE `s_order_details`;
TRUNCATE `s_order_details_attributes`;
TRUNCATE `s_order_documents`;
TRUNCATE `s_order_documents_attributes`;
TRUNCATE `s_order_esd`;
TRUNCATE `s_order_history`;
TRUNCATE `s_order_notes`;
TRUNCATE `s_order_shippingaddress`;
TRUNCATE `s_order_shippingaddress_attributes`;
TRUNCATE `s_statistics_currentusers`;
TRUNCATE `s_statistics_pool`;
TRUNCATE `s_statistics_referer`;
TRUNCATE `s_statistics_search`;
TRUNCATE `s_statistics_visitors`;
TRUNCATE magnalister_amazon_prepare;
TRUNCATE magnalister_orders;
TRUNCATE s_emarketing_lastarticles;
TRUNCATE s_emarketing_referer;
TRUNCATE s_es_backlog;
TRUNCATE s_statistics_article_impression;
#TRUNCATE s_core_config_mails;
TRUNCATE s_core_payment_instance;
TRUNCATE s_customer_search_index;
TRUNCATE s_plugin_swag_fuzzy_statistics;
TRUNCATE s_search_index;
SET foreign_key_checks = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.