Bug 13533

Summary: Table suggestions is missing FK constraints / borrowernumbers are kept on deletion of patron
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: DatabaseAssignee: Galen Charlton <gmcharlt>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5334
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13484
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 5334    

Description Katrin Fischer 2015-01-07 16:28:48 UTC
The suggestions table never clears the borrowernumbers referenced in 
- suggestedby
- managedby 
- acceptedby
- rejectedby

suggestedby is usually a patron not a staff user, I think on deletion of the patron it would make sense to set it to NULL. Maybe also for the other 3?

There is also no FK on
- budgetid
- branchcode
Comment 1 Katrin Fischer 2015-01-08 14:42:27 UTC
*** Bug 10633 has been marked as a duplicate of this bug. ***
Comment 2 Martin Renvoize (ashimema) 2019-02-20 16:44:42 UTC
Sorry Katrin, I didn't spot this one before creating a new one which adds the constraints... hopefully you agree with the ones added there?

*** This bug has been marked as a duplicate of bug 22368 ***