fix: entitlement_features.parent_feature_id nullOnDelete orphans child features #40
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-tenant#40
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In
Migrations/0001_01_01_000000_create_tenant_tables.php(line 141-142), the self-referential FK onentitlement_features.parent_feature_idusesnullOnDelete():Impact
If a parent feature is deleted, all child features have their
parent_feature_idsilently set toNULL. This breaks:can()method in EntitlementService uses parent features for limit aggregation)Acceptance Criteria
cascadeOnDelete()and add testDiscovered during automated scan (issue #3)
Charon referenced this issue2026-02-20 23:57:34 +00:00