[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
Wed Dec 26 17:46:33 CET 2018


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

Alex Arnaud <alex.arnaud at biblibre.com> changed:

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

--- Comment #7 from Alex Arnaud <alex.arnaud at biblibre.com> ---
Created attachment 83509
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=83509&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: Nazlı Çetin <nazli at devinim.com.tr>
Signed-off-by: Alex Arnaud <alex.arnaud at biblibre.com>

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


More information about the Koha-bugs mailing list