Activiti清库脚本

发布时间:2019-08-18 16:13:17阅读:(158)

在Activiti开发中,经常会产生大量垃圾数据,这时候就需要清理Activiti数据库,但是Activiti数据库中存在大量外键约束,所以就需要按顺序删除相关数据,具体顺序如下:

DELETE  FROM  act_hi_attachment;
DELETE FROM act_hi_comment;
DELETE FROM act_hi_detail;
DELETE FROM act_hi_actinst;
DELETE FROM act_hi_identitylink;
DELETE FROM act_hi_procinst;
DELETE FROM act_hi_taskinst;
DELETE FROM act_hi_varinst;
DELETE FROM act_ru_identitylink;
DELETE FROM act_ru_task;
DELETE FROM act_ru_variable;
DELETE FROM act_ru_execution WHERE PARENT_ID_ IS NOT NULL AND IS_SCOPE_=0;
DELETE FROM act_ru_execution WHERE PARENT_ID_ IS NOT NULL AND IS_SCOPE_=1;
DELETE FROM act_ru_execution;
标签:Avitiviti

发表评论

评论列表(有0条评论158人围观)
暂无评论