Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move run_/dataset_ schemas updates into Horreum logic #2228

Open
lampajr opened this issue Jan 7, 2025 · 0 comments · May be fixed by #2230
Open

Move run_/dataset_ schemas updates into Horreum logic #2228

lampajr opened this issue Jan 7, 2025 · 0 comments · May be fixed by #2230
Assignees
Labels

Comments

@lampajr
Copy link
Member

lampajr commented Jan 7, 2025

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

@lampajr lampajr added type/feature A new feature area/backend priority/high High priority labels Jan 7, 2025
@lampajr lampajr self-assigned this Jan 7, 2025
@lampajr lampajr linked a pull request Jan 8, 2025 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant