From c5116ab2ff3fc85b89a82316f869c25146660cb6 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Fri, 7 May 2021 09:58:09 +0200 Subject: [PATCH] Bug 28298: fix DB update 19.12.00.076 Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart (cherry picked from commit 1426cfce0e63409f7130fe9e7d510c90c11a356c) Signed-off-by: Fridolin Somers --- installer/data/mysql/updatedatabase.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9bc57f9d8e..69436e4149 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21708,7 +21708,7 @@ if( CheckVersion( $DBversion ) ) { if ( @$serials ) { push @warnings, q|WARNING - The following serials will be updated, they were attached to a different biblionumber than their related subscription: | . join ", ", map { $_->{serialid} } @$serials; $dbh->do(q| - UPDATE serial JOIN subscription USING (subcriptionid) SET serial.biblionumber = subscription.biblionumber WHERE serial.biblionumber != subscription.biblionumber + UPDATE serial JOIN subscription USING (subscriptionid) SET serial.biblionumber = subscription.biblionumber WHERE serial.biblionumber != subscription.biblionumber |); } $serials = $dbh->selectall_arrayref(q| @@ -21755,7 +21755,7 @@ if( CheckVersion( $DBversion ) ) { unless ( foreign_key_exists( 'subscriptionhistory', 'subscription_history_ibfk_1' ) ) { $dbh->do(q| - UPDATE subscriptionhistory JOIN subscription USING (subcriptionid) SET subscriptionhistory.biblionumber = subscription.biblionumber WHERE subscriptionhistory.biblionumber != subscription.biblionumber + UPDATE subscriptionhistory JOIN subscription USING (subscriptionid) SET subscriptionhistory.biblionumber = subscription.biblionumber WHERE subscriptionhistory.biblionumber != subscription.biblionumber |); $dbh->do(q| DELETE FROM subscriptionhistory WHERE biblionumber NOT IN (SELECT biblionumber FROM biblio) -- 2.39.5