Changed foreign key constraints from CASCADE to RESTRICT for: - agent_tokens.organization_id - agent_assignments.agent_token_id **Problem:** Deleting an organization would cascade delete all agent tokens, which would then cascade delete all agent assignments, causing silent data loss without any audit trail. **Solution:** Use RESTRICT instead of CASCADE - this prevents deletion if there are dependent records, forcing explicit cleanup and preventing accidental data loss. **Impact:** - Organizations cannot be deleted if they have agent tokens - Agent tokens cannot be deleted if they have active assignments - User must explicitly clean up dependencies first This provides better data integrity and prevents accidental data loss. Fixes Medium Bug #15 from reliability audit. |
||
|---|---|---|
| .. | ||
| gettext | ||
| mibs | ||
| profiles | ||
| proto | ||
| repo | ||
| static | ||