From 4bfc2584e02f3233fed8c8f329205d712f3bfe0b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 8 Apr 2021 10:15:04 +0000 Subject: [PATCH] Bug 27069: DBRev 20.12.00.027 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_27069.perl | 17 ----------------- installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_27069.perl diff --git a/Koha.pm b/Koha.pm index 2799a5acb3..be18e52f8c 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.12.00.026"; +$VERSION = "20.12.00.027"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_27069.perl b/installer/data/mysql/atomicupdate/bug_27069.perl deleted file mode 100644 index 854c051346..0000000000 --- a/installer/data/mysql/atomicupdate/bug_27069.perl +++ /dev/null @@ -1,17 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - - $dbh->do(q{ - UPDATE circulation_rules - SET - rule_value = CASE - WHEN rule_value='0' THEN 'not_allowed' - WHEN rule_value='1' THEN 'from_home_library' - WHEN rule_value='2' THEN 'from_any_library' - WHEN rule_value='3' THEN 'from_local_hold_group' - END - WHERE rule_name='holdallowed' AND rule_value >= 0 AND rule_value <= 3; - }); - - NewVersion( $DBversion, 27069, "Change holdallowed values from numbers to strings"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index cc649d193a..eded08fe05 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -23749,6 +23749,24 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 26498, "Bug 26498 - Add option to set a default expire date for holds at reservation time"); } +$DBversion = '20.12.00.027'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q{ + UPDATE circulation_rules + SET + rule_value = CASE + WHEN rule_value='0' THEN 'not_allowed' + WHEN rule_value='1' THEN 'from_home_library' + WHEN rule_value='2' THEN 'from_any_library' + WHEN rule_value='3' THEN 'from_local_hold_group' + END + WHERE rule_name='holdallowed' AND rule_value >= 0 AND rule_value <= 3; + }); + + NewVersion( $DBversion, 27069, "Change holdallowed values from numbers to strings"); +} + # 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