Skip to content

fix: clean up related records when deleting entities#769

Open
anonymoususer72041 wants to merge 6 commits into
opencats:masterfrom
anonymoususer72041:fix/entity-delete-cleanup
Open

fix: clean up related records when deleting entities#769
anonymoususer72041 wants to merge 6 commits into
opencats:masterfrom
anonymoususer72041:fix/entity-delete-cleanup

Conversation

@anonymoususer72041
Copy link
Copy Markdown
Contributor

This PR adds missing cleanup for related records when deleting candidates, companies, contacts and job orders.

Previously, deleting these entities could leave orphaned references behind in related tables such as activities, calendar events, saved list entries, attachments, extra field values, candidate tags, candidate/job order history, company departments and questionnaire history. The affected delete flows now remove directly owned related records and reset remaining references according to the existing schema semantics.

A migration has been added to clean up orphaned references that may already have accumulated in existing installations.

Regression coverage has been added for candidate, company, contact and job order deletion cleanup.

@anonymoususer72041
Copy link
Copy Markdown
Contributor Author

Note: Follow-up needed once #768 is merged

@anonymoususer72041 anonymoususer72041 force-pushed the fix/entity-delete-cleanup branch from 7dd2d59 to 89d563f Compare May 4, 2026 12:18
@anonymoususer72041 anonymoususer72041 force-pushed the fix/entity-delete-cleanup branch from 89d563f to b1c23cc Compare May 4, 2026 12:55
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.

1 participant