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: add ModelRepository#_UNSTABLE_bulkDestroy and manual ON DELETE handling #17078

Merged
merged 10 commits into from
Apr 2, 2024

Conversation

ephys
Copy link
Member

@ephys ephys commented Feb 11, 2024

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description Of Change

This PR introduces ModelRepository#_UNSTABLE_bulkDestroy, as part of the migration to repositories & general rewrite of Model

This PR also introduces the manualOnDelete option in both _UNSTABLE_bulkDestroy and _UNSTABLE_destroy.

This PR only implements that part of the code that relies on DELETE queries, as the rest will require implementing _UNSTABLE_update first, which depends on #17063

Closes #2586

@ephys ephys requested a review from a team as a code owner February 25, 2024 19:18
@WikiRik
Copy link
Member

WikiRik commented Feb 25, 2024

There are still a few TODOs and commented out code here. Is that all going to be fixed when _UNSTABLE_update is implemented? Maybe we should wait for that and split the new manualOnDelete option for _UNSTABLE_destroy to another PR

@ephys
Copy link
Member Author

ephys commented Feb 25, 2024

_UNSTABLE_update cannot be done until #17063 is merged, so this PR would be blocked for a while even though the base feature is ready. I'm also trying to do smaller PRs to slowly build the feature instead of providing it in one massive PR, and implementing delete methods was a much smaller task than implementing update first, which lets me introduce the base concepts before introducing the huge method that update is going to be (as, itself, requires things like a new validator, another big task)

@ephys ephys requested a review from WikiRik March 17, 2024 09:28
@ephys ephys requested a review from a team as a code owner March 18, 2024 23:04
Copy link
Member

@WikiRik WikiRik left a comment

Choose a reason for hiding this comment

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

Plenty of TODOs, but it's better to merge this now instead of having it blocked for a while.

@ephys ephys requested a review from WikiRik April 2, 2024 10:18
@WikiRik WikiRik merged commit 45ac01a into main Apr 2, 2024
51 checks passed
@WikiRik WikiRik deleted the ephys/bulk-destroy branch April 2, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To document
Development

Successfully merging this pull request may close these issues.

onDelete cascade for paranoid tables
2 participants