dev_clear_biz_orders.sql 969 B

123456789101112131415161718192021222324252627
  1. -- 清空客户订单及关联数据(仅开发/调试使用,切勿在生产执行)
  2. -- 执行前请自行备份。MySQL:source 本文件 或 mysql ... < dev_clear_biz_orders.sql
  3. SET FOREIGN_KEY_CHECKS = 0;
  4. TRUNCATE TABLE `biz_order_status_log_his`;
  5. TRUNCATE TABLE `biz_order_status_log`;
  6. TRUNCATE TABLE `biz_order_item`;
  7. TRUNCATE TABLE `biz_order_his`;
  8. TRUNCATE TABLE `biz_order_adjust_his`;
  9. TRUNCATE TABLE `biz_order_adjust`;
  10. TRUNCATE TABLE `biz_wechat_pay`;
  11. TRUNCATE TABLE `biz_refund_his`;
  12. TRUNCATE TABLE `biz_refund`;
  13. TRUNCATE TABLE `biz_settlement_his`;
  14. TRUNCATE TABLE `biz_settlement`;
  15. TRUNCATE TABLE `biz_invoice`;
  16. TRUNCATE TABLE `biz_deliverer_review_his`;
  17. TRUNCATE TABLE `biz_deliverer_review`;
  18. TRUNCATE TABLE `biz_delivery_warning_his`;
  19. TRUNCATE TABLE `biz_delivery_warning`;
  20. TRUNCATE TABLE `biz_delivery_task_item`;
  21. TRUNCATE TABLE `biz_delivery_task_his`;
  22. TRUNCATE TABLE `biz_delivery_task`;
  23. TRUNCATE TABLE `biz_order`;
  24. SET FOREIGN_KEY_CHECKS = 1;