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

Update functions and triggers #491

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Update functions and triggers #491

wants to merge 5 commits into from

Conversation

ponceta
Copy link
Member

@ponceta ponceta commented Nov 11, 2024

General

  • Fix a bug
  • Add a feature
  • Maintenance / sustainability
  • Add Documentation

Describe your changes

This aims to fix #485

  • Rename symbology_on_reach_delete into modification_on_reach_delete
  • Reorganize files in application (draft)

Screenshots

Issue ticket number and link

#485

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • CI Tests are green
  • The documentation is up to date with the proposed change.
  • My work is ready for review

Checklist before merge

  • A review has been performed
  • Comments are resolved
  • Documentation is ready

Rename geometry_functions
rename modification_on_reach_delete.
Move triggers to triggers.
@ponceta ponceta added datamodel Concerns the datamodel fix Fixing something not working app_schema Concerns the application schema labels Nov 11, 2024
@ponceta ponceta self-assigned this Nov 11, 2024
ponceta and others added 3 commits November 11, 2024 13:33
Add triggers to triggers and network functions to functions
Set triggers and defaults before inheritance view creation
@ponceta
Copy link
Member Author

ponceta commented Nov 19, 2024

@domi4484 @cymed @3nids could you review it :

  • From the code organisation perspective (good / bad / what to adapt?)
  • From the functions content (are the actual functions clear enough, should they be adapted into smaller pieces?)
  • Should we separate triggers from functions (as proposed) ?
  • Should we separate trigger functions from functions ?
  • From the upgrade mechanics perspective (9A/9B)

This is already great because a single python instruction can rebuild the whole app and the whole app is cleaned by dropping cascade the app schema

image

Copy link
Contributor

@domi4484 domi4484 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ponceta from the code perspective it looks good to me.
For the other questions I am missing some postgres expertise to anwer yet.
In any case whatever comes out from the other questions, this changes doesn't put any limit in future decisions and should be safe to merge

Copy link
Contributor

@3nids 3nids left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the trigger file creation, this looks good to me.

I am not sure if I missed something important regarding this, but the main point is function renaming to clearly separate symbology from core netowrk business logic, is this correct?

@@ -0,0 +1,73 @@
-- only update -> insert and delete are handled by reach trigger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of separating the code which create the trigger from the ones which create the trigger functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app_schema Concerns the application schema datamodel Concerns the datamodel fix Fixing something not working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deleting reaches: disabling symbology triggers leaves dead data in the database (reach_points etc)
3 participants