From 6ccc9d58492a42e1af3b5b735ff5516c773bebdd Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 7 May 2021 10:50:34 +0200 Subject: [PATCH] Revert "Bug 27842: (follow-up) Correct existing serail/subscriptionhistory before deletion" This reverts commit 7fadc22cd0ae1327a33a2467aa9c9e972ef058d0. --- installer/data/mysql/updatedatabase.pl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a4304b2237..b4d2a27e4a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21703,15 +21703,6 @@ if( CheckVersion( $DBversion ) ) { unless ( foreign_key_exists( 'serial', 'serial_ibfk_1' ) ) { my $serials = $dbh->selectall_arrayref(q| - SELECT serialid FROM serial JOIN subscription USING (subscriptionid) WHERE serial.biblionumber != subscription.biblionumber - |, { Slice => {} }); - 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 - |); - } - $serials = $dbh->selectall_arrayref(q| SELECT serialid FROM serial WHERE biblionumber NOT IN (SELECT biblionumber FROM biblio) |, { Slice => {} }); if ( @$serials ) { @@ -21754,9 +21745,6 @@ 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 - |); $dbh->do(q| DELETE FROM subscriptionhistory WHERE biblionumber NOT IN (SELECT biblionumber FROM biblio) |); -- 2.39.5