Koha/installer/data/mysql/db_revs/211200002.pl
Fridolin Somers c403c972ca Bug 13188: DBRev 21.12.00.002
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2021-12-14 09:48:51 -10:00

21 lines
981 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "13188",
description => "Allow configuration of required fields when a patron is editing their information via the OPAC",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
SELECT 'PatronSelfModificationMandatoryField', value, NULL, 'Define the required fields when a patron is editing their information via the OPAC','free'
FROM (SELECT value FROM systempreferences WHERE variable='PatronSelfRegistrationBorrowerMandatoryField') tmp
});
my ($syspref_value) = $dbh->selectrow_array(q{
SELECT value FROM systempreferences WHERE variable='PatronSelfModificationMandatoryField'
});
say $out "Added new system preference 'PatronSelfModificationMandatoryField' with value '$syspref_value'";
},
}