清理所有业务表数据.sql 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. -- Active: 1735094924500@@192.168.110.85@3306@xiaoding_test
  2. /**
  3. * 清空表数据
  4. */
  5. -- 禁用外键检查
  6. SET FOREIGN_KEY_CHECKS = 0;
  7. TRUNCATE TABLE agent_info_records;
  8. TRUNCATE TABLE agent_infos;
  9. TRUNCATE TABLE agent_project;
  10. TRUNCATE TABLE agent_project_cate;
  11. TRUNCATE TABLE agent_real_auth_records;
  12. TRUNCATE TABLE member_address;
  13. TRUNCATE TABLE member_social_accounts;
  14. TRUNCATE TABLE member_users;
  15. TRUNCATE TABLE order_comments;
  16. TRUNCATE TABLE order_dist_records;
  17. TRUNCATE TABLE order_exc_records;
  18. TRUNCATE TABLE order_grab_records;
  19. TRUNCATE TABLE order_records;
  20. TRUNCATE TABLE project_cate;
  21. TRUNCATE TABLE shop_auth_records;
  22. TRUNCATE TABLE shop_coach_services;
  23. TRUNCATE TABLE shop_infos;
  24. TRUNCATE TABLE shop_services;
  25. TRUNCATE TABLE user_feedbacks;
  26. TRUNCATE TABLE wallet_payment_records;
  27. TRUNCATE TABLE wallet_refund_records;
  28. TRUNCATE TABLE wallet_split_records;
  29. TRUNCATE TABLE wallet_trans_records;
  30. TRUNCATE TABLE wallet_withdraw_records;
  31. TRUNCATE TABLE agent_info_records;
  32. TRUNCATE TABLE agent_project;
  33. TRUNCATE TABLE agent_project_cate;
  34. TRUNCATE TABLE agent_real_auth_records;
  35. TRUNCATE TABLE coupon_info;
  36. TRUNCATE TABLE member_address;
  37. TRUNCATE TABLE member_bad_behaviors;
  38. TRUNCATE TABLE member_social_accounts;
  39. TRUNCATE TABLE member_users;
  40. TRUNCATE TABLE order_comments;
  41. TRUNCATE TABLE order_dist_records;
  42. TRUNCATE TABLE order_exc_records;
  43. TRUNCATE TABLE order_grab_records;
  44. TRUNCATE TABLE order_records;
  45. TRUNCATE TABLE project_cate;
  46. TRUNCATE TABLE shop_auth_records;
  47. TRUNCATE TABLE shop_coach_services;
  48. TRUNCATE TABLE shop_infos;
  49. TRUNCATE TABLE shop_services;
  50. TRUNCATE TABLE user_feedbacks;
  51. TRUNCATE TABLE wallet_payment_records;
  52. TRUNCATE TABLE wallet_refund_records;
  53. TRUNCATE TABLE wallet_split_records;
  54. TRUNCATE TABLE wallet_trans_records;
  55. TRUNCATE TABLE wallet_withdraw_records;
  56. TRUNCATE TABLE agent_info_records;
  57. TRUNCATE TABLE agent_infos;
  58. TRUNCATE TABLE agent_project;
  59. TRUNCATE TABLE agent_project_cate;
  60. TRUNCATE TABLE agent_real_auth_records;
  61. TRUNCATE TABLE coach_alerts;
  62. TRUNCATE TABLE coach_comment_tags;
  63. TRUNCATE TABLE coach_flow_orders;
  64. TRUNCATE TABLE coach_info_records;
  65. TRUNCATE TABLE coach_locations;
  66. TRUNCATE TABLE coach_order_comment_tags;
  67. TRUNCATE TABLE coach_order_comments;
  68. TRUNCATE TABLE coach_project;
  69. TRUNCATE TABLE coach_qual_records;
  70. TRUNCATE TABLE coach_real_records;
  71. TRUNCATE TABLE coach_schedules;
  72. TRUNCATE TABLE coach_scores;
  73. TRUNCATE TABLE coach_statistics;
  74. TRUNCATE TABLE coach_users;
  75. TRUNCATE TABLE coupon_info;
  76. TRUNCATE TABLE member_address;
  77. TRUNCATE TABLE member_bad_behaviors;
  78. TRUNCATE TABLE member_social_accounts;
  79. TRUNCATE TABLE member_users;
  80. TRUNCATE TABLE order_comments;
  81. TRUNCATE TABLE order_dist_records;
  82. TRUNCATE TABLE order_exc_records;
  83. TRUNCATE TABLE order_grab_records;
  84. TRUNCATE TABLE order_records;
  85. TRUNCATE TABLE project_cate;
  86. TRUNCATE TABLE setting_groups;;
  87. SET FOREIGN_KEY_CHECKS = 1;
  88. /*
  89. select table_name from information_schema.TABLES where `TABLE_SCHEMA` = 'xiaoding_test'
  90. and `TABLE_NAME` like 'coach_%' and `TABLE_TYPE` = 'BASE TABLE'
  91. or ( `TABLE_NAME` like 'agent_%' or `TABLE_NAME` like 'coupon_%' or
  92. `TABLE_NAME` like 'order_%' or `TABLE_NAME` like 'user_%' or `TABLE_NAME` like 'member_%'
  93. or `TABLE_NAME` like 'project_%' or `TABLE_NAME` like 'setting_%' or `TABLE_NAME` like 'shop_%'
  94. or `TABLE_NAME` like 'wallet_%' );
  95. */