-
-
Save yregaieg/817ccf9f7421140e0e408215814fbe49 to your computer and use it in GitHub Desktop.
Delete all historic process instances and related historic data for workflows completed before a specific date (MySQL / MariaDB)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from act_hi_actinst where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_attachment where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_comment where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_detail where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_identitylink where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_varinst where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_taskinst where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'); | |
delete from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment