From e52cc698fadf12670f493990042533f3b4bc3cd8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 30 Aug 2021 17:08:58 +0200 Subject: [PATCH] Bug 26302: DBRev 21.06.00.019 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_26302.perl | 9 --------- installer/data/mysql/db_revs/210600019.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_26302.perl create mode 100755 installer/data/mysql/db_revs/210600019.pl diff --git a/Koha.pm b/Koha.pm index fdeb021ba5..8b7fcc8a7c 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.06.00.018"; +$VERSION = "21.06.00.019"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_26302.perl b/installer/data/mysql/atomicupdate/bug_26302.perl deleted file mode 100644 index 0fc7689cfe..0000000000 --- a/installer/data/mysql/atomicupdate/bug_26302.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do(q| - INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES - ('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), - ('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer') - |); - NewVersion( $DBversion, 26302, "Add preferences OPACResultsMaxItems and OPACResultsMaxItemsUnavailable"); -} diff --git a/installer/data/mysql/db_revs/210600019.pl b/installer/data/mysql/db_revs/210600019.pl new file mode 100755 index 0000000000..d42f5e8193 --- /dev/null +++ b/installer/data/mysql/db_revs/210600019.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "26302", + description => "Add system preferences OPACResultsMaxItems and OPACResultsMaxItemsUnavailable"); + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES + ('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), + ('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer') + |); + }, +} -- 2.39.5