From d6dba567c0c7d35844c96af70b637bede9b11e9b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 14 Mar 2023 15:12:32 +0000 Subject: [PATCH] Bug 33217: DB update --- installer/data/mysql/atomicupdate/bug_33217.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_33217.pl diff --git a/installer/data/mysql/atomicupdate/bug_33217.pl b/installer/data/mysql/atomicupdate/bug_33217.pl new file mode 100755 index 0000000000..b68cda4a1d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_33217.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "33217", + description => "Add option to specify sorting for author links", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + $dbh->do(q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('AuthorLinkSortBy','default','call_number|pubdate|acqdate|title','Specify the default field used for sorting when click author links','Choice'), + ('AuthorLinkSortOrder','asc','asc|dsc|az|za','Specify the default sort order for author links','Choice') + }); + say $out "Added new system preferences 'AuthorLinkSortBy' 'AuthorLinkSortOrder'"; + }, +}; -- 2.30.2