From c0a03d34cafd28eaa07e565109b448d09c04d398 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 26 Oct 2021 15:44:19 +0200 Subject: [PATCH] Bug 11175: DBRev 21.06.00.037 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_11175.perl | 9 --------- installer/data/mysql/db_revs/210600037.pl | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_11175.perl create mode 100755 installer/data/mysql/db_revs/210600037.pl diff --git a/Koha.pm b/Koha.pm index 19463095c8..e6db8c3daf 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.036"; +$VERSION = "21.06.00.037"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_11175.perl b/installer/data/mysql/atomicupdate/bug_11175.perl deleted file mode 100644 index fda51788e4..0000000000 --- a/installer/data/mysql/atomicupdate/bug_11175.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do("INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('ShowComponentRecords', 'nowhere', 'nowhere|staff|opac|both','In which record detail pages to show list of the component records, as linked via 773','Choice')"); - - $dbh->do("INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('MaxComponentRecords', '300', '','Max number of component records to display','Integer')"); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 11175: Show component records in detail views)\n"; -} diff --git a/installer/data/mysql/db_revs/210600037.pl b/installer/data/mysql/db_revs/210600037.pl new file mode 100755 index 0000000000..13fee12b29 --- /dev/null +++ b/installer/data/mysql/db_revs/210600037.pl @@ -0,0 +1,19 @@ +use Modern::Perl; + +return { + bug_number => "11175", + description => "Show component records in detail views", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('ShowComponentRecords', 'nowhere', 'nowhere|staff|opac|both','In which record detail pages to show list of the component records, as linked via 773','Choice') + }); + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) + VALUES ('MaxComponentRecords', '300', '','Max number of component records to display','Integer') + }); + }, +} -- 2.39.5