-- 历史流程实例
delete from act_hi_actinst;
-- 历史流程附件
delete from act_hi_attachment;
-- 历史说明性信息
delete from act_hi_comment;
-- 历史流程运行中细节信息
delete from act_hi_detail;
-- 历史参与人员表
delete from act_hi_entitylink;
-- 历史流程中的用户关系
delete from act_hi_identitylink;
-- 历史流程实例
delete from act_hi_procinst;
-- 历史人物实例
delete from act_hi_taskinst;
-- 每一次执行（execution）可能带上的数据
delete from act_hi_tsk_log;
-- 历史流程变量
delete from act_hi_varinst;


-- 运行中的流程实例
delete from act_ru_actinst;
-- 正在运行的任务表
delete from act_ru_deadletter_job;
delete from act_ru_entitylink;
-- 运行时事件
delete from act_ru_event_subscr;
-- 历史作业表
delete from act_ru_history_job;
-- 运行时用户关系
delete from act_ru_identitylink;
-- 运行时作业表
delete from act_ru_job;
-- 暂停作业表
delete from act_ru_suspended_job;
-- 运行时任务表
delete from act_ru_task;
-- 定时作业表
delete from act_ru_timer_job;
-- 运行时变量表
delete from act_ru_variable;
-- 运行时流程执行实例
update act_ru_execution set REV_ = '2';
update act_ru_execution set parent_id_ = null;
delete from act_ru_execution;


-- 系统业务表与flowable关联字段
-- 考核评价
update t_assessment set process_definition_id = null, process_instance_id = null, state = '0';
-- 设备检查/整改/持续整改
update t_device_inspection set process_definition_id = null, process_instance_id = null, ins_process_definition_id = null, ins_process_instance_id = null, rec_process_definition_id = null, rec_process_instance_id = null, state = '0';
-- 设备检查明细
update t_device_inspection_line set process_definition_id = null, process_instance_id = null, state = '0';
-- 值班备勤
update t_duty_records set process_definition_id = null, process_instance_id = null, state = '0';
-- 现场检查
update t_inspection set process_definition_id = null, process_instance_id = null, state = '0';
-- 现场检查整改
update t_inspection_line set process_definition_id = null, process_instance_id = null, state = '0';
-- 案件材料报送
update t_prevent_material set process_definition_id = null, process_instance_id = null, state = '0';
-- 风险提示
update t_prevent_risk set process_definition_id = null, process_instance_id = null, state = '0';
-- 警情处理
update t_scc_alarm_push set process_definition_id = null, process_instance_id = null, state = '0';
-- 联系接警记录
update t_scc_answer_alarm set process_definition_id = null, process_instance_id = null, state = '0';
-- 非现场检查
update t_scc_check set process_definition_id = null, process_instance_id = null, state = '0';
-- 非现场检查整改
update t_scc_unlocale_check set process_definition_id = null, process_instance_id = null, state = '0';
-- 非现场检查整改明细
update t_scc_unlocale_check_line set process_definition_id = null, process_instance_id = null, state = '0';
-- 教育培训/应急演练
update t_task_handin set process_definition_id = null, process_instance_id = null, state = '0';


