From 82b2a0d91d6cecc86ba3a11087d4a08f0379122e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 1 Oct 2021 14:40:44 -0400 Subject: [PATCH] Bug 29073: DBRev 21.05.05.001 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_29073.pl | 17 ----------------- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 3 files changed, 10 insertions(+), 18 deletions(-) delete mode 100755 installer/data/mysql/atomicupdate/bug_29073.pl diff --git a/Koha.pm b/Koha.pm index caf6ee3875..526b1949bf 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 = "21.05.04.000"; +$VERSION = "21.05.04.001"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_29073.pl b/installer/data/mysql/atomicupdate/bug_29073.pl deleted file mode 100755 index ef06a3e8f0..0000000000 --- a/installer/data/mysql/atomicupdate/bug_29073.pl +++ /dev/null @@ -1,17 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "29073", - description => "Make DefaultHoldExpirationdate use 1/0 values", - up => sub { - my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here - $dbh->do(q{ - UPDATE systempreferences SET value = IF(value = 'yes',1,0) - WHERE variable = 'DefaultHoldExpirationdate'; - }); - # Print useful stuff here - say $out "DefaultHoldExpirationdate values updated"; - }, -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index d5790a76f2..a640d837fe 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24471,6 +24471,15 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, "", "Koha 21.05.04 release" ); } +$DBversion = '21.05.04.001'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + UPDATE systempreferences SET value = IF(value = 'yes',1,0) + WHERE variable = 'DefaultHoldExpirationdate'; + }); + NewVersion( $DBversion, "29073", "Make DefaultHoldExpirationdate use 1/0 values" ); +} + # 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