[Koha-bugs] [Bug 13515] Table messages is missing FK constraints and is never cleaned up

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 18 16:47:45 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13515

--- Comment #3 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 83367
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83367&action=edit
Bug 13515: Add a foreign key constraint to messages.borrowernumber

This patch adds a missing foreign key constraint to
mesages.borrowernumber.
To create it sucessfully the entries from the messages table that are
not linked with an existing patron will be removed.

Test plan:
0/ Do not apply the patch
1/ Add messages to different patrons
2/ Delete one of the patron's record
3/ Have a look at the messages table and notice that the messages for
the deleted patron's record still appear
4/ Apply the patch and execute the update DB entry
5/ Have a look again at the messages table and notice that the messages
for the deleted patron's record have been removed
6/ Delete a patron that have messages
7/ Notice that now the messages are deleted when the patron's record is
deleted

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list