Skip to content

Move run_/dataset_ schemas updates into Horreum logic #2228

Open
@lampajr

Description

Feature idea.

Right now some of the run_schemas and dataset_schemas updates are managed by Postgres triggers. Move their logic into the Horreum codebase such that we don't rely on db triggers anymore for those activities.

Affected entities:

event_object_table trigger_name event_manipulation action_statement action_timing
dataset             ds_after_insert             INSERT             EXECUTE FUNCTION ds_after_dataset_insert_func()   AFTER
run                 rs_after_run_untrash       UPDATE             EXECUTE FUNCTION rs_after_run_update()             AFTER
run                 rs_after_run_update         INSERT             EXECUTE FUNCTION rs_after_run_update()             AFTER
run                 rs_after_run_update         UPDATE             EXECUTE FUNCTION rs_after_run_update()             AFTER
schema             before_schema_update       UPDATE             EXECUTE FUNCTION before_schema_update_func()       BEFORE

Describe the solution you'd like

Move the logic that updates the run_schemas and dataset_schemas tables and related into Horreum, i.e., do NOT rely on database triggers.

As part of this effort, ensure the above triggers and functions get removed.

Additional information

n/a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions