Last active
March 5, 2020 09:27
-
-
Save xi-ao/5d7a122dafea9dc460a32d2d3c77b68c to your computer and use it in GitHub Desktop.
Purge jobs executions from Rundeck H2 Database
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 PUBLIC.REFERENCED_EXECUTION; | |
DELETE FROM PUBLIC.BASE_REPORT; | |
DELETE FROM WORKFLOW_WORKFLOW_STEP wws | |
WHERE wws.WORKFLOW_COMMANDS_ID IN ( | |
SELECT WORKFLOW_id FROM EXECUTION | |
); | |
DELETE FROM WORKFLOW_STEP ws | |
WHERE ws.ID NOT IN ( | |
SELECT wws.WORKFLOW_STEP_ID FROM WORKFLOW_WORKFLOW_STEP wws | |
); | |
DELETE FROM EXECUTION; | |
DELETE FROM WORKFLOW w | |
WHERE w.ID NOT IN ( | |
SELECT wws.WORKFLOW_COMMANDS_ID FROM WORKFLOW_WORKFLOW_STEP wws | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment