From d0ff4d20753e433a6ce5f345529fc3e7a4f40b91 Mon Sep 17 00:00:00 2001 From: 1iyc <5212514+liycone@user.noreply.gitee.com> Date: Wed, 16 Oct 2024 10:28:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=85=E5=BA=93SQL?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BB=A5=E5=88=A0=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增清库SQL脚本,旨在删除数据库中的所有历史数据。脚本中包含了对多个表的TRUNCATE操作,涉及act、po、pro、re、sm、wm等多个模块的数据。此操作将清除各表中的所有 --- 清库sql.sql | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 清库sql.sql diff --git a/清库sql.sql b/清库sql.sql new file mode 100644 index 0000000..a44f26b --- /dev/null +++ b/清库sql.sql @@ -0,0 +1,72 @@ + + +# 删除所有的历史数据: +TRUNCATE TABLE act_hi_actinst; +TRUNCATE TABLE act_hi_attachment; +TRUNCATE TABLE act_hi_comment; +TRUNCATE TABLE act_hi_detail; +TRUNCATE TABLE act_hi_entitylink;TRUNCATE TABLE act_hi_identitylink; +TRUNCATE TABLE act_hi_procinst; +TRUNCATE TABLE act_hi_taskinst; +TRUNCATE TABLE act_hi_tsk_log; +TRUNCATE TABLE act_hi_varinst; + +TRUNCATE TABLE po_details; +TRUNCATE TABLE po_inquiry; +TRUNCATE TABLE po_message; +TRUNCATE TABLE po_purchase; +TRUNCATE TABLE po_purchase_approve; +TRUNCATE TABLE po_purchase_approve_line; +TRUNCATE TABLE po_purchase_line; +TRUNCATE TABLE po_purchase_record; +TRUNCATE TABLE po_quotation; +TRUNCATE TABLE po_sm_print; +TRUNCATE TABLE po_sm_print_line; +TRUNCATE TABLE po_vendor_score; +TRUNCATE TABLE po_vendor_score_line; +TRUNCATE TABLE po_vendor_score_template; +TRUNCATE TABLE pro_feedback; +TRUNCATE TABLE pro_feedback_new; +TRUNCATE TABLE pro_mrp; + +TRUNCATE TABLE pro_task; +TRUNCATE TABLE pro_task_issue; +TRUNCATE TABLE pro_trans_consume; +TRUNCATE TABLE pro_trans_order; +TRUNCATE TABLE pro_user_workstation; +TRUNCATE TABLE pro_workorder; +TRUNCATE TABLE pro_workorder_bom; +TRUNCATE TABLE pro_workorder_detail; +TRUNCATE TABLE pro_workorder_feedback; +TRUNCATE TABLE pro_workorder_feedback_line; +TRUNCATE TABLE pro_workorder_process; +TRUNCATE TABLE pro_workorder_record; +TRUNCATE TABLE pro_workrecord; +TRUNCATE TABLE re_reverse_audit; +TRUNCATE TABLE sm_sales; +TRUNCATE TABLE sm_sales_line; +TRUNCATE TABLE sm_sales_record; + +TRUNCATE TABLE wm_product_salse; +TRUNCATE TABLE wm_product_salse_line; +TRUNCATE TABLE wm_item_recpt; +TRUNCATE TABLE wm_item_recpt_line; + +TRUNCATE TABLE wm_issue_header; +TRUNCATE TABLE wm_product_recpt; +TRUNCATE TABLE wm_product_recpt_line; +TRUNCATE TABLE wm_product_recpt_line_copy; +TRUNCATE TABLE wm_records; +TRUNCATE TABLE wm_stock_pandian; +TRUNCATE TABLE wm_stock_pandian_line; +TRUNCATE TABLE wm_material_stock_start_period; +TRUNCATE TABLE wm_material_stock; + + +TRUNCATE TABLE wm_rt_vendor; +TRUNCATE TABLE wm_rt_vendor_line; + + +TRUNCATE TABLE wm_rt_issue; +TRUNCATE TABLE wm_rt_issue_line; +