fix: cascade delete child features when parent is removed #55

Open
Charon wants to merge 0 commits from feat/fix-parent-feature-cascade into dev
Member

Summary

  • Changes the self-referential FK on entitlement_features.parent_feature_id from nullOnDelete() to cascadeOnDelete()
  • Prevents orphaned child features when a parent feature is deleted
  • Children that belong to a pool have no meaning without their parent, so cascade deletion is the correct behaviour

Fixes #40

Migration

Adds 2026_03_24_000000_fix_parent_feature_cascade_delete.php which drops and re-creates the FK constraint. Fully reversible via down().

## Summary - Changes the self-referential FK on `entitlement_features.parent_feature_id` from `nullOnDelete()` to `cascadeOnDelete()` - Prevents orphaned child features when a parent feature is deleted - Children that belong to a pool have no meaning without their parent, so cascade deletion is the correct behaviour Fixes #40 ## Migration Adds `2026_03_24_000000_fix_parent_feature_cascade_delete.php` which drops and re-creates the FK constraint. Fully reversible via `down()`.
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/fix-parent-feature-cascade:feat/fix-parent-feature-cascade
git checkout feat/fix-parent-feature-cascade

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/fix-parent-feature-cascade
git checkout feat/fix-parent-feature-cascade
git rebase dev
git checkout dev
git merge --ff-only feat/fix-parent-feature-cascade
git checkout feat/fix-parent-feature-cascade
git rebase dev
git checkout dev
git merge --no-ff feat/fix-parent-feature-cascade
git checkout dev
git merge --squash feat/fix-parent-feature-cascade
git checkout dev
git merge --ff-only feat/fix-parent-feature-cascade
git checkout dev
git merge feat/fix-parent-feature-cascade
git push origin dev
Sign in to join this conversation.
No description provided.