chore(dao): Add explicit ON DELETE CASCADE for ownership#24628
Conversation
There was a problem hiding this comment.
I'm not really sure why the reports were refetched as opposed to using the items provides. Note after removing the need to remove the owners this logic simply reduced to the BaseDAO.delete method and thus is unnecessary.
There was a problem hiding this comment.
No need to initialize this.
There was a problem hiding this comment.
Same logic as before, but using the more generalized shared constraints logic.
There was a problem hiding this comment.
Using uppercase for consistency.
There was a problem hiding this comment.
Databases don't have owners so this line was a red herring.
38ca4e8 to
8e2b3d8
Compare
Codecov Report
@@ Coverage Diff @@
## master #24628 +/- ##
==========================================
+ Coverage 68.97% 69.05% +0.08%
==========================================
Files 1907 1908 +1
Lines 74153 74168 +15
Branches 8182 8177 -5
==========================================
+ Hits 51148 51219 +71
+ Misses 20882 20829 -53
+ Partials 2123 2120 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
8e2b3d8 to
a2f826b
Compare
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = "6d05b0a70c89" | ||
| down_revision = "240d23c7f86f" |
There was a problem hiding this comment.
@john-bodley Use the latest f92a3124dd66 revision
Also update Create Date in filename in order to have this file after f92a3124dd66 in migrations/versions folder.
There was a problem hiding this comment.
@EugeneTorap I've updated the SHA. AFAIK we typically don't update the date associated with the filename, i.e., there's no guarantee that these revisions are in chronological order, i.e., they merely serves as a guide. cc @craig-rueda for guidance.
There was a problem hiding this comment.
I would say that updating the filename is fine. Ideally the filename would be somewhat close to the date that the PR is merged as to keep things somewhat sorted.
…_for_owners_references.py to 2023-07-11_15-51_6d05b0a70c89_add_on_delete_cascade_for_owners_references.py
SUMMARY
Per SIP-92 Proposal for restructuring the Python code base #24331 organized all the DAOs to be housed within a shared folder—the result of which highlighted numerous inconsistencies, repetition, and inefficiencies.
This PR is somewhat akin to #24488 where explicit
ON DELETE CASCADEoperations are set for the ownership associations.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
CI.
ADDITIONAL INFORMATION