Skip to content

Conversation

@arthanson
Copy link
Contributor

@arthanson arthanson commented Dec 1, 2025

Fixes: #283

FK constraints weren't getting setup correctly as we use managed=False in the creation of the CO. Unfortunately this means we have to have direct SQL to create these. A side effect of this was showing some test issues with the cache so also put in extra cache clearing code that should hopefully fix up the multi-worker cache issues as well.

Now get standard deletion dialog showing related object that will be deleted.

Monosnap Delete Comb? | NetBox 2025-12-01 16-50-53

Need migration to setup FK constraints for any existing models with FK, then code in models.py to check if any newly added fields should have FK constraints added.

@arthanson arthanson changed the title DRAFT: #203 make sure cascade DELETE is applied #203 make sure cascade DELETE is applied Dec 2, 2025
@arthanson arthanson marked this pull request as ready for review December 2, 2025 00:49
@arthanson arthanson requested a review from bctiemann December 2, 2025 00:49
@arthanson arthanson marked this pull request as draft December 2, 2025 15:58
@arthanson arthanson removed the request for review from bctiemann December 2, 2025 15:58
@arthanson arthanson marked this pull request as ready for review December 2, 2025 18:10
@arthanson arthanson requested a review from bctiemann December 2, 2025 18:10
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.

IntegrityError when deleting a CO that is referenced by another CO

2 participants