Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue #2387] Don't cascade delete through current_opportunity_summary (
#2388) ## Summary Fixes #2387 ### Time to review: __5 mins__ ## Changes proposed Remove cascade-deletes from automatically happening on relationships to the current_opportunity_summary table ## Context for reviewers Cascade deletes are useful to automatically delete records across several related tables, but this is definitely a place we don't want it (deleting a current_opportunity_summary says nothing about the opportunity or summary objects needing to be deleted). In our set-current-opportunities script, we sometimes delete the current opportunity summary, which at the moment was fully deleting the opportunity - which we definitely do not want. I adjusted the way the set-current-opportunities test works so that this issue is caught AND THEN I fixed the cascade configuration we had to stop doing it. Without the fix, the tests would fail complaining that the opportunity no longer exists. ## Additional information Found this in the staging environment as the data did not match dev despite having the same initial data - due to some status updates being applied at different times, some records were deleted incorrectly. --------- Co-authored-by: nava-platform-bot <[email protected]>
- Loading branch information