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

Add cascade on case foreign key #4188

Merged
merged 7 commits into from
Feb 12, 2025
Merged

Add cascade on case foreign key #4188

merged 7 commits into from
Feb 12, 2025

Conversation

islean
Copy link
Contributor

@islean islean commented Feb 7, 2025

Description

Closes #4023. Only the case deletion does not cascade. This PR makes it so.

Added

Changed

Fixed

  • Deleting a case cascades even in the SQL database

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b add-case-sample-cascading -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@islean
Copy link
Contributor Author

islean commented Feb 7, 2025

Ran in stage:

image
image

After downgrade:

image
image

@islean
Copy link
Contributor Author

islean commented Feb 7, 2025

Adding a case sample entry linked to a dummy case:

image

Removing the case removes the entry:

image

But the sample is still there ✅

@islean islean marked this pull request as ready for review February 7, 2025 12:37
@islean islean requested a review from a team as a code owner February 7, 2025 12:37
Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

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

Looks good 💯 In the issue #4023 you also mention the sample table, is that already solved?

@islean
Copy link
Contributor Author

islean commented Feb 7, 2025

Looks good 💯 In the issue #4023 you also mention the sample table, is that already solved?

As far as I can tell - yes
image

@islean islean merged commit babde80 into master Feb 12, 2025
9 checks passed
@islean islean deleted the add-case-sample-cascading branch February 12, 2025 08:14
@islean
Copy link
Contributor Author

islean commented Feb 12, 2025

Deployed to Hasta:

INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 0037f4bf9be3 -> 6f368f57df4a, Add case sample cascading
[isak.ohlsson@hasta:~] [P_base] $ 

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.

Bug: Cascading to CaseSample table not set up
2 participants