From ded8b7f63f260e1725a27430291f242fdad02400 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 18 Aug 2020 13:50:32 +0000 Subject: [PATCH] Bug 25867: DBRev 20.06.00.024 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../atomicupdate/bug_25867_location_renames.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_25867_location_renames.perl diff --git a/Koha.pm b/Koha.pm index cdee61d6dd..62e1293870 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.06.00.023"; +$VERSION = "20.06.00.024"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_25867_location_renames.perl b/installer/data/mysql/atomicupdate/bug_25867_location_renames.perl deleted file mode 100644 index 5a43e7e05b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_25867_location_renames.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - $dbh->do( "UPDATE marc_subfield_structure SET liblibrarian = 'Home library' WHERE liblibrarian = 'Permanent location' - AND tagfield = 952 and tagsubfield = 'a'" ); - $dbh->do( "UPDATE marc_subfield_structure SET libopac = 'Home library' WHERE libopac = 'Permanent location' - AND tagfield = 952 and tagsubfield = 'a'" ); - $dbh->do( "UPDATE marc_subfield_structure SET liblibrarian = 'Current library' WHERE liblibrarian = 'Current location' - AND tagfield = 952 and tagsubfield = 'b'" ); - $dbh->do( "UPDATE marc_subfield_structure SET libopac = 'Current library' WHERE libopac = 'Current location' - AND tagfield = 952 and tagsubfield = 'b'" ); - - NewVersion( $DBversion, 25867, "Update subfield descriptions for 952\$a and 952\$b"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6c335c29b8..bd68424344 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22590,6 +22590,21 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 16371, "Quote of the Day (QOTD) for the staff interface " ); } +$DBversion = '20.06.00.024'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do( "UPDATE marc_subfield_structure SET liblibrarian = 'Home library' WHERE liblibrarian = 'Permanent location' + AND tagfield = 952 and tagsubfield = 'a'" ); + $dbh->do( "UPDATE marc_subfield_structure SET libopac = 'Home library' WHERE libopac = 'Permanent location' + AND tagfield = 952 and tagsubfield = 'a'" ); + $dbh->do( "UPDATE marc_subfield_structure SET liblibrarian = 'Current library' WHERE liblibrarian = 'Current location' + AND tagfield = 952 and tagsubfield = 'b'" ); + $dbh->do( "UPDATE marc_subfield_structure SET libopac = 'Current library' WHERE libopac = 'Current location' + AND tagfield = 952 and tagsubfield = 'b'" ); + + NewVersion( $DBversion, 25867, "Update subfield descriptions for 952\$a and 952\$b"); +} + # 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