在使用activiti 的时候会经常遇到需要清空数据库中的数据,因此本文重点讲解如何解决该问题。
再删除数据的时候,需要注意有主外键约束的问题?下面罗列的DDL可以结合自身的业务需求进行灵活改造。
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`;