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

Feat: 459 submitted reports are immutable #2807

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

pbastia
Copy link
Contributor

@pbastia pbastia commented Feb 7, 2025

Work done:

  • Added function to generate a trigger for a model, + tests
  • Added triggers to relevant models
  • Test that all cascading models from a report version have the proper triggers
  • Test that each model can't be updated if their report version is submitted

Housekeeping:

  • A few models were missing an 'id' PKEY and were incorrectly using their report_version as pkey. A couple of migrations to remove those models and recreate them properly were necessary

@pbastia pbastia force-pushed the feat/459-submitted-reports-are-immutable branch from a8301ee to 53672fc Compare February 7, 2025 23:02
yield f"rel{str(i)}"


def immutable_report_version_trigger(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This generates SQL to apply as a trigger.
The entire expected SQL can be found in the test file for this method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant