From 03fac5d1a1ca0ba03c17d84a6f40c3dbd1d5e0b6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 24 Mar 2020 10:54:00 +0000 Subject: [PATCH] Bug 24759: DBRev 19.12.00.051 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../Bug_24759_cleanup_OpacRenewalBranch.perl | 16 ---------------- installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/Bug_24759_cleanup_OpacRenewalBranch.perl diff --git a/Koha.pm b/Koha.pm index 76ad97e375..a30bb4ffb7 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 = "19.12.00.050"; +$VERSION = "19.12.00.051"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/Bug_24759_cleanup_OpacRenewalBranch.perl b/installer/data/mysql/atomicupdate/Bug_24759_cleanup_OpacRenewalBranch.perl deleted file mode 100644 index f447939027..0000000000 --- a/installer/data/mysql/atomicupdate/Bug_24759_cleanup_OpacRenewalBranch.perl +++ /dev/null @@ -1,16 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(q{ - UPDATE systempreferences SET options = 'itemhomebranch|patronhomebranch|checkoutbranch|none' WHERE variable='OpacRenewalBranch' - }); - $dbh->do(q{ - UPDATE systempreferences SET value = "none" WHERE variable='OpacRenewalBranch' - AND value = 'NULL' - }); - $dbh->do(q{ - UPDATE systempreferences SET value = 'opacrenew' WHERE variable='OpacRenewalBranch' - AND value NOT IN ('checkoutbranch','itemhomebranch','opacrenew','patronhomebranch','none') - }); - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24759 - cleanup OpacRenewalBranch)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ddd339d735..fa3f93703e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21211,6 +21211,23 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24854, "Remove IDreamBooks* system preferences"); } +$DBversion = '19.12.00.051'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + UPDATE systempreferences SET options = 'itemhomebranch|patronhomebranch|checkoutbranch|none' WHERE variable='OpacRenewalBranch' + }); + $dbh->do(q{ + UPDATE systempreferences SET value = "none" WHERE variable='OpacRenewalBranch' + AND value = 'NULL' + }); + $dbh->do(q{ + UPDATE systempreferences SET value = 'opacrenew' WHERE variable='OpacRenewalBranch' + AND value NOT IN ('checkoutbranch','itemhomebranch','opacrenew','patronhomebranch','none') + }); + + NewVersion( $DBversion, 24759, "Cleanup OpacRenewalBranch"); +} + # 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