[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
Fri Dec 21 14:06:36 CET 2018


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

Devinim <kohadevinim at devinim.com.tr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #83367|0                           |1
        is obsolete|                            |

--- Comment #5 from Devinim <kohadevinim at devinim.com.tr> ---
Created attachment 83463
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83463&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

Signed-off-by: Devinim <kohadevinim at devinim.com.tr>

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


More information about the Koha-bugs mailing list