]> git.koha-community.org Git - koha.git/commit
Bug 13515: Add a foreign key constraint to messages.borrowernumber
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 18 Dec 2018 15:43:00 +0000 (12:43 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 25 Feb 2019 22:36:49 +0000 (22:36 +0000)
commit5bf05679527b2519827f02e7ec59bbd372db1d24
tree87c9d79110623ecbd23b57e866cfbbf08a3dd3c0
parent964ce524640f0dc1129ac2edc96b01af8c638adf
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@devinim.com.tr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0daa02a961be828d5c38b6933c91ee79853f95c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a224d0598e0ef037c879201375e36e9f640dc1ed)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug_13515.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql