Bug 13515: Fix constraint name before deleting it
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 14 Feb 2019 20:19:08 +0000 (17:19 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 25 Feb 2019 22:39:01 +0000 (22:39 +0000)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1f23384475214cf291afe081aaa2ef6d18767ed8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit edd9be57b8046f4bdac7d7d1757d0108aeee9462)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

installer/data/mysql/atomicupdate/bug_13515.perl

index 837ae45..7a97061 100644 (file)
@@ -1,7 +1,7 @@
 $DBversion = 'XXX';  # will be replaced by the RM
 if( CheckVersion( $DBversion ) ) {
 
-    unless( foreign_key_exists( 'messages', 'borrowernumber' ) ) {
+    unless( foreign_key_exists( 'messages', 'messages_borrowernumber' ) ) {
         $dbh->do(q|
             DELETE m FROM messages m
             LEFT JOIN borrowers b ON m.borrowernumber=b.borrowernumber