Bug 30327: Add options for sorting components
[koha.git] / installer / data / mysql / atomicupdate / bug_30327_add_sortComponents_syspref.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "30327",
5     description => "Add ComponentsSortField and ComponentsSortOrder sysprefs",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9         $dbh->do(q{
10             INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11             ('ComponentsSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
12             ('ComponentsSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice')
13         });
14         say $out "Added ComponentsSortField and ComponentsSortOrder sysprefs";
15     },
16 };