From b2c5d03cd20c2bfc03598a01b87ff453dbc817f4 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Thu, 17 Feb 2022 19:58:32 +0000 Subject: [PATCH] Bug 29495: DBRev 20.11.14.002 Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit 7e1e62d69b64c318562306ae15d9cd674e0a1529) Signed-off-by: Victor Grousset/tuxayo --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_29495.perl | 10 ---------- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 3 files changed, 12 insertions(+), 11 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_29495.perl diff --git a/Koha.pm b/Koha.pm index 0661725c01..7eedb704dc 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "20.11.14.001"; +$VERSION = "20.11.14.002"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_29495.perl b/installer/data/mysql/atomicupdate/bug_29495.perl deleted file mode 100644 index 1ba2e5ecd3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_29495.perl +++ /dev/null @@ -1,10 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - if ( foreign_key_exists( 'return_claims', 'issue_id' ) ) { - $dbh->do(q{ - ALTER TABLE return_claims DROP FOREIGN KEY issue_id - }); - } - - NewVersion( $DBversion, 29495, "Issue link is lost in return claims when using 'MarkLostItemsAsReturned'"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2fd203b5ad..3b54f06a67 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23757,6 +23757,17 @@ if ( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "29457", "WARNING: You may have some incorrect manager_id's recorded against account cancellation lines, please see bugzilla for details. NOTE: You may already have this bugfix applied at an earlier upgrade."); } +$DBversion = '20.11.14.002'; +if ( CheckVersion( $DBversion ) ) { + if ( foreign_key_exists( 'return_claims', 'issue_id' ) ) { + $dbh->do(q{ + ALTER TABLE return_claims DROP FOREIGN KEY issue_id + }); + } + + NewVersion( $DBversion, 29495, "Issue link is lost in return claims when using 'MarkLostItemsAsReturned'"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5