diff --git a/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changelog.xml b/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changelog.xml index ba6323d9a6..43b42a0322 100644 --- a/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changelog.xml +++ b/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changelog.xml @@ -130,4 +130,5 @@ + diff --git a/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changesets/20241218_alter_audit_workflow_status_trigger_frequency.xml b/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changesets/20241218_alter_audit_workflow_status_trigger_frequency.xml new file mode 100644 index 0000000000..0b9c88405d --- /dev/null +++ b/core/src/main/resources/org/broadinstitute/dsde/rawls/liquibase/changesets/20241218_alter_audit_workflow_status_trigger_frequency.xml @@ -0,0 +1,24 @@ + + + + + DROP TRIGGER IF EXISTS after_workflow_update; + + + CREATE TRIGGER after_workflow_update + AFTER UPDATE ON WORKFLOW + FOR EACH ROW + BEGIN + IF NEW.STATUS != OLD.STATUS THEN + INSERT INTO AUDIT_WORKFLOW_STATUS + (workflow_id, status, timestamp) + VALUES + (NEW.ID, NEW.STATUS, NEW.STATUS_LAST_CHANGED); + END IF; + END + + +