我正在寻找一个在MySql上运行的脚本,以删除(截断表格)PrestaShop 1.4.9版本数据库中所有测试数据(客户,订单,购物车等)。谢谢! Pascal
我正在寻找一个在MySql上运行的脚本,以删除(截断表格)PrestaShop 1.4.9版本数据库中所有测试数据(客户,订单,购物车等)。谢谢! Pascal
安装 Prestashop Cleaner 后,在配置中您可以选择删除目录、订单和客户。
对于1.5.6.2(可能适用于1.5.6*,甚至可能适用于1.5.*):
TRUNCATE `ps_access`;
TRUNCATE `ps_address`;
TRUNCATE `ps_alias`;
TRUNCATE `ps_attribute`;
TRUNCATE `ps_attribute_group`;
TRUNCATE `ps_attribute_group_lang`;
TRUNCATE `ps_attribute_group_shop`;
TRUNCATE `ps_attribute_lang`;
TRUNCATE `ps_attribute_shop`;
TRUNCATE `ps_carrier`;
TRUNCATE `ps_carrier_group`;
TRUNCATE `ps_carrier_lang`;
TRUNCATE `ps_carrier_shop`;
TRUNCATE `ps_carrier_tax_rules_group_shop`;
TRUNCATE `ps_carrier_zone`;
TRUNCATE `ps_cart`;
TRUNCATE `ps_cart_product`;
TRUNCATE `ps_category`;
TRUNCATE `ps_category_group`;
TRUNCATE `ps_category_lang`;
TRUNCATE `ps_category_product`;
TRUNCATE `ps_category_shop`;
TRUNCATE `ps_cms`;
TRUNCATE `ps_cms_block`;
TRUNCATE `ps_cms_block_lang`;
TRUNCATE `ps_cms_block_page`;
TRUNCATE `ps_cms_block_shop`;
TRUNCATE `ps_cms_category`;
TRUNCATE `ps_cms_category_lang`;
TRUNCATE `ps_cms_lang`;
TRUNCATE `ps_cms_shop`;
TRUNCATE `ps_connections`;
TRUNCATE `ps_contact_lang`;
TRUNCATE `ps_contact_shop`;
TRUNCATE `ps_customer`;
TRUNCATE `ps_customer_group`;
TRUNCATE `ps_delivery`;
TRUNCATE `ps_feature`;
TRUNCATE `ps_feature_lang`;
TRUNCATE `ps_feature_shop`;
TRUNCATE `ps_feature_value`;
TRUNCATE `ps_feature_value_lang`;
TRUNCATE `ps_guest`;
TRUNCATE `ps_homeslider`;
TRUNCATE `ps_homeslider_slides`;
TRUNCATE `ps_homeslider_slides_lang`;
TRUNCATE `ps_image`;
TRUNCATE `ps_image_lang`;
TRUNCATE `ps_image_shop`;
TRUNCATE `ps_image_type`;
TRUNCATE `ps_manufacturer`;
TRUNCATE `ps_manufacturer_lang`;
TRUNCATE `ps_manufacturer_shop`;
TRUNCATE `ps_orders`;
TRUNCATE `ps_order_carrier`;
TRUNCATE `ps_order_cart_rule`;
TRUNCATE `ps_order_detail`;
TRUNCATE `ps_order_detail_tax`;
TRUNCATE `ps_order_history`;
TRUNCATE `ps_order_invoice`;
TRUNCATE `ps_order_invoice_payment`;
TRUNCATE `ps_order_invoice_tax`;
TRUNCATE `ps_order_message`;
TRUNCATE `ps_order_message_lang`;
TRUNCATE `ps_order_return_state`;
TRUNCATE `ps_order_return_state_lang`;
TRUNCATE `ps_order_state`;
TRUNCATE `ps_order_state_lang`;
TRUNCATE `ps_page`;
TRUNCATE `ps_page_type`;
TRUNCATE `ps_product`;
TRUNCATE `ps_product_attribute`;
TRUNCATE `ps_product_attribute_combination`;
TRUNCATE `ps_product_attribute_image`;
TRUNCATE `ps_product_attribute_shop`;
TRUNCATE `ps_product_lang`;
TRUNCATE `ps_product_shop`;
TRUNCATE `ps_product_supplier`;
TRUNCATE `ps_product_tag`;
TRUNCATE `ps_range_price`;
TRUNCATE `ps_range_weight`;
TRUNCATE `ps_reinsurance`;
TRUNCATE `ps_reinsurance_lang`;
TRUNCATE `ps_scene`;
TRUNCATE `ps_scene_category`;
TRUNCATE `ps_scene_lang`;
TRUNCATE `ps_scene_products`;
TRUNCATE `ps_scene_shop`;
TRUNCATE `ps_search_index`;
TRUNCATE `ps_search_word`;
TRUNCATE `ps_specific_price`;
TRUNCATE `ps_stock_available`;
TRUNCATE `ps_stock_mvt_reason`;
TRUNCATE `ps_stock_mvt_reason_lang`;
TRUNCATE `ps_store`;
TRUNCATE `ps_store_shop`;
TRUNCATE `ps_supplier`;
TRUNCATE `ps_supplier_lang`;
TRUNCATE `ps_supplier_shop`;
TRUNCATE `ps_supply_order_state`;
TRUNCATE `ps_supply_order_state_lang`;
TRUNCATE `ps_tag`;
在开始之前,我们会提供一个干净、可用的数据库。
PrestaShop Cleaner
是存储库中提供的免费模块,只需几个点击即可完成所需任务。 - Ivan