Before firing below queries, I advice you to take backup of your database. Because, it’s always a good habit to save your data.
I performed an audit on all tables.
Below list of the tables should be truncated, if you wish to clear test data.
1 |
SET FOREIGN_KEY_CHECKS = 0; |
Truncate order tables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
TRUNCATE TABLE `gift_message`; TRUNCATE TABLE `quote`; TRUNCATE TABLE `quote_address`; TRUNCATE TABLE `quote_address_item`; TRUNCATE TABLE `quote_id_mask`; TRUNCATE TABLE `quote_item`; TRUNCATE TABLE `quote_item_option`; TRUNCATE TABLE `quote_payment`; TRUNCATE TABLE `quote_shipping_rate`; TRUNCATE TABLE `reporting_orders`; TRUNCATE TABLE `sales_bestsellers_aggregated_daily`; TRUNCATE TABLE `sales_bestsellers_aggregated_monthly`; TRUNCATE TABLE `sales_bestsellers_aggregated_yearly`; TRUNCATE TABLE `sales_creditmemo`; TRUNCATE TABLE `sales_creditmemo_comment`; TRUNCATE TABLE `sales_creditmemo_grid`; TRUNCATE TABLE `sales_creditmemo_item`; TRUNCATE TABLE `sales_invoice`; TRUNCATE TABLE `sales_invoiced_aggregated`; TRUNCATE TABLE `sales_invoiced_aggregated_order`; TRUNCATE TABLE `sales_invoice_comment`; TRUNCATE TABLE `sales_invoice_grid`; TRUNCATE TABLE `sales_invoice_item`; TRUNCATE TABLE `sales_order`; TRUNCATE TABLE `sales_order_address`; TRUNCATE TABLE `sales_order_aggregated_created`; TRUNCATE TABLE `sales_order_aggregated_updated`; TRUNCATE TABLE `sales_order_grid`; TRUNCATE TABLE `sales_order_item`; TRUNCATE TABLE `sales_order_payment`; TRUNCATE TABLE `sales_order_status_history`; TRUNCATE TABLE `sales_order_tax`; TRUNCATE TABLE `sales_order_tax_item`; TRUNCATE TABLE `sales_payment_transaction`; TRUNCATE TABLE `sales_refunded_aggregated`; TRUNCATE TABLE `sales_refunded_aggregated_order`; TRUNCATE TABLE `sales_shipment`; TRUNCATE TABLE `sales_shipment_comment`; TRUNCATE TABLE `sales_shipment_grid`; TRUNCATE TABLE `sales_shipment_item`; TRUNCATE TABLE `sales_shipment_track`; TRUNCATE TABLE `sales_shipping_aggregated`; TRUNCATE TABLE `sales_shipping_aggregated_order`; TRUNCATE TABLE `tax_order_aggregated_created`; TRUNCATE TABLE `tax_order_aggregated_updated`; |
Truncate Customer tables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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`; |
Truncate Review tables
1 2 3 4 |
TRUNCATE TABLE `review`; TRUNCATE TABLE `review_detail`; TRUNCATE TABLE `review_entity_summary`; TRUNCATE TABLE `review_store`; |
Truncate Product tables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
TRUNCATE TABLE `cataloginventory_stock_item`; TRUNCATE TABLE `cataloginventory_stock_status`; TRUNCATE TABLE `cataloginventory_stock_status_idx`; TRUNCATE TABLE `cataloginventory_stock_status_tmp`; TRUNCATE TABLE `catalog_category_product`; TRUNCATE TABLE `catalog_category_product_index`; TRUNCATE TABLE `catalog_category_product_index_tmp`; TRUNCATE TABLE `catalog_compare_item`; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_product_bundle_price_index`; TRUNCATE TABLE `catalog_product_bundle_selection`; TRUNCATE TABLE `catalog_product_bundle_selection_price`; TRUNCATE TABLE `catalog_product_bundle_stock_index`; TRUNCATE TABLE `catalog_product_entity`; TRUNCATE TABLE `catalog_product_entity_datetime`; TRUNCATE TABLE `catalog_product_entity_decimal`; TRUNCATE TABLE `catalog_product_entity_gallery`; TRUNCATE TABLE `catalog_product_entity_int`; TRUNCATE TABLE `catalog_product_entity_media_gallery`; TRUNCATE TABLE `catalog_product_entity_media_gallery_value`; TRUNCATE TABLE `catalog_product_entity_media_gallery_value_to_entity`; TRUNCATE TABLE `catalog_product_entity_media_gallery_value_video`; TRUNCATE TABLE `catalog_product_entity_text`; TRUNCATE TABLE `catalog_product_entity_tier_price`; TRUNCATE TABLE `catalog_product_entity_varchar`; TRUNCATE TABLE `catalog_product_index_eav`; TRUNCATE TABLE `catalog_product_index_eav_decimal`; TRUNCATE TABLE `catalog_product_index_eav_decimal_idx`; TRUNCATE TABLE `catalog_product_index_eav_decimal_tmp`; TRUNCATE TABLE `catalog_product_index_eav_idx`; TRUNCATE TABLE `catalog_product_index_eav_tmp`; TRUNCATE TABLE `catalog_product_index_price`; TRUNCATE TABLE `catalog_product_index_price_bundle_idx`; TRUNCATE TABLE `catalog_product_index_price_bundle_opt_idx`; TRUNCATE TABLE `catalog_product_index_price_bundle_opt_tmp`; TRUNCATE TABLE `catalog_product_index_price_bundle_sel_idx`; TRUNCATE TABLE `catalog_product_index_price_bundle_sel_tmp`; TRUNCATE TABLE `catalog_product_index_price_bundle_tmp`; TRUNCATE TABLE `catalog_product_index_price_cfg_opt_agr_idx`; TRUNCATE TABLE `catalog_product_index_price_cfg_opt_agr_tmp`; TRUNCATE TABLE `catalog_product_index_price_cfg_opt_idx`; TRUNCATE TABLE `catalog_product_index_price_cfg_opt_tmp`; TRUNCATE TABLE `catalog_product_index_price_downlod_idx`; TRUNCATE TABLE `catalog_product_index_price_downlod_tmp`; TRUNCATE TABLE `catalog_product_index_price_final_idx`; TRUNCATE TABLE `catalog_product_index_price_final_tmp`; TRUNCATE TABLE `catalog_product_index_price_idx`; TRUNCATE TABLE `catalog_product_index_price_opt_agr_idx`; TRUNCATE TABLE `catalog_product_index_price_opt_agr_tmp`; TRUNCATE TABLE `catalog_product_index_price_opt_idx`; TRUNCATE TABLE `catalog_product_index_price_opt_tmp`; TRUNCATE TABLE `catalog_product_index_price_tmp`; TRUNCATE TABLE `catalog_product_index_tier_price`; TRUNCATE TABLE `catalog_product_index_website`; TRUNCATE TABLE `catalog_product_link`; TRUNCATE TABLE `catalog_product_link_attribute_decimal`; TRUNCATE TABLE `catalog_product_link_attribute_int`; TRUNCATE TABLE `catalog_product_link_attribute_varchar`; TRUNCATE TABLE `catalog_product_option`; TRUNCATE TABLE `catalog_product_option_price`; TRUNCATE TABLE `catalog_product_option_title`; TRUNCATE TABLE `catalog_product_option_type_price`; TRUNCATE TABLE `catalog_product_option_type_title`; TRUNCATE TABLE `catalog_product_option_type_value`; TRUNCATE TABLE `catalog_product_relation`; TRUNCATE TABLE `catalog_product_super_attribute`; TRUNCATE TABLE `catalog_product_super_attribute_label`; TRUNCATE TABLE `catalog_product_super_link`; TRUNCATE TABLE `catalog_product_website`; TRUNCATE TABLE `catalog_url_rewrite_product_category`; TRUNCATE TABLE `downloadable_link`; TRUNCATE TABLE `downloadable_link_price`; TRUNCATE TABLE `downloadable_link_purchased`; TRUNCATE TABLE `downloadable_link_purchased_item`; TRUNCATE TABLE `downloadable_link_title`; TRUNCATE TABLE `downloadable_sample`; TRUNCATE TABLE `downloadable_sample_title`; TRUNCATE TABLE `product_alert_price`; TRUNCATE TABLE `product_alert_stock`; TRUNCATE TABLE `report_compared_product_index`; TRUNCATE TABLE `report_viewed_product_aggregated_daily`; TRUNCATE TABLE `report_viewed_product_aggregated_monthly`; TRUNCATE TABLE `report_viewed_product_aggregated_yearly`; TRUNCATE TABLE `report_viewed_product_index`; |
1 |
SET FOREIGN_KEY_CHECKS = 1; |
[crayon-63d3ef1be4d72947492226/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.