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

141 handle contact and data record deletes with root #143

Merged
merged 6 commits into from
Aug 1, 2024

Conversation

witash
Copy link
Contributor

@witash witash commented Aug 1, 2024

@njuguna-n this is an alternative to #142 which uses the document_metadata table and cascading FK deletes to manage downstream models, instead of adding deleted columns to all the downstream models.

Copy link
Contributor

@njuguna-n njuguna-n left a comment

Choose a reason for hiding this comment

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

Nice! I like the idea of using the document_metadata model better and I like how you have updated the tests which is why I was adding the deleted column in the downstream models.

Left one comment about updating the clause in data_record and contact models.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a clause checking if the doc is deleted so that we don't copy it only to delete in the post hook clause. Same for the contact model

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, added

Copy link
Contributor

@njuguna-n njuguna-n 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

@witash witash merged commit b2c3ac5 into main Aug 1, 2024
3 checks passed
@witash witash deleted the 141-handle-contact-and-data-record-deletes-with-root branch August 1, 2024 09:15
@medic-ci
Copy link

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants