Created
October 10, 2018 18:00
-
-
Save krabello/2587e912fe3148311b9d0994e854e8da to your computer and use it in GitHub Desktop.
Prestashop Delete * Product Data
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
# All these tables have an id_product primary key | |
TRUNCATE TABLE ps_product; | |
TRUNCATE TABLE ps_product_attachment; | |
TRUNCATE TABLE ps_product_country_tax; | |
TRUNCATE TABLE ps_product_group_reduction_cache; | |
TRUNCATE TABLE ps_product_lang; | |
TRUNCATE TABLE ps_product_sale; | |
TRUNCATE TABLE ps_product_tag; | |
TRUNCATE TABLE ps_category_product; | |
TRUNCATE TABLE ps_feature_product; | |
TRUNCATE TABLE ps_search_index; | |
TRUNCATE TABLE ps_specific_price; | |
TRUNCATE TABLE ps_specific_price_priority; | |
# This one is special, links product to product | |
TRUNCATE TABLE ps_accessory; | |
# Packs | |
TRUNCATE TABLE ps_pack; | |
# All these tables have an id_attachment primary key | |
TRUNCATE TABLE ps_attachment; | |
TRUNCATE TABLE ps_attachment_lang; | |
# All these tables have an id_attribute primary key | |
TRUNCATE TABLE ps_attribute; | |
TRUNCATE TABLE ps_attribute_lang; | |
# All these tables have an id_attribute_group primary key | |
TRUNCATE TABLE ps_attribute_group; | |
TRUNCATE TABLE ps_attribute_group_lang; | |
# All these tables have an id_attribute_impact primary key | |
TRUNCATE TABLE ps_attribute_impact; | |
# All these tables have an id_feature or id_feature_value key | |
TRUNCATE TABLE ps_feature; | |
TRUNCATE TABLE ps_feature_lang; | |
TRUNCATE TABLE ps_feature_value; | |
TRUNCATE TABLE ps_feature_value_lang; | |
# All these tables have an id_customization_field key | |
TRUNCATE TABLE ps_customization_field; | |
TRUNCATE TABLE ps_customization_field_lang; | |
# All these tables have an id_image primary key | |
TRUNCATE TABLE ps_image; | |
TRUNCATE TABLE ps_image_lang; | |
# All these tables have an id_product_attribute primary key | |
TRUNCATE TABLE ps_product_attribute; | |
TRUNCATE TABLE ps_product_attribute_combination; | |
TRUNCATE TABLE ps_product_attribute_image; | |
# All these tables have an id_product_download primary key | |
TRUNCATE TABLE ps_product_download; | |
# All these tables have an id_word primary key | |
TRUNCATE TABLE ps_search_word; | |
# All these tables have an id_tag primary key | |
# TRUNCATE TABLE ps_tag | |
# Empty carts | |
TRUNCATE TABLE ps_cart; | |
TRUNCATE TABLE ps_cart_product; | |
TRUNCATE TABLE ps_customization; | |
TRUNCATE TABLE ps_customized_data; | |
# Delete stock movements | |
TRUNCATE TABLE ps_stock_mvt; | |
# Delete features | |
TRUNCATE TABLE ps_feature; | |
TRUNCATE TABLE ps_feature_lang; | |
TRUNCATE TABLE ps_feature_product; | |
TRUNCATE TABLE ps_feature_shop; | |
TRUNCATE TABLE ps_feature_value; | |
TRUNCATE TABLE ps_feature_value_lang; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment