亲测可用:activiti清库脚本

activiti工作流开发中经常要用到清库操作,因为外键及其它原因导致清的不彻底或者清的姿势不对系统崩掉。
在测试了n个网上的清库版本后,经过修改整合,出来一套可用的成品:
DELETE FROM act_hi_taskinst
DELETE FROM act_ru_identitylink
DELETE FROM act_ru_task
DELETE FROM act_hi_identitylink
DELETE FROM act_hi_procinst
DELETE FROM act_hi_varinst
DELETE FROM act_ru_variable
DELETE FROM act_ru_execution
--清空部署流程
-- DELETE FROM act_re_procdef
-- DELETE FROM act_re_deployment

--清空流程在途数据
DELETE FROM act_ru_task
DELETE FROM act_ru_execution
DELETE FROM act_ru_identitylink
DELETE FROM act_ru_variable
--清空流程历史数据
DELETE FROM act_hi_identitylink
DELETE FROM act_hi_taskinst
DELETE FROM act_hi_procinst
DELETE FROM act_hi_varinst
DELETE FROM act_hi_comment
DELETE FROM act_hi_actinst
--清空流程模型
DELETE FROM act_re_model
DELETE FROM act_ge_bytearray

【亲测可用:activiti清库脚本】ps:清库部分语句如果表无法清空,按报的信息先清关联表即可。

    推荐阅读