Bug 13515: Fix constraint name before deleting it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2019-02-14 17:19:08 -03:00 committed by Nick Clemens
parent 11b9bb3da9
commit 1f23384475

View 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