Bug 13188: (QA follow-up) Modernise atomicupdate

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Martin Renvoize 2021-09-24 16:26:14 +01:00 committed by Fridolin Somers
parent 2e1affddfb
commit 66058aa8e8
1 changed files with 15 additions and 8 deletions

View File

@ -1,9 +1,16 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$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','multiple'
FROM (SELECT value FROM systempreferences WHERE variable="PatronSelfRegistrationBorrowerMandatoryField") tmp
});
NewVersion($DBversion, 13188, "Allow configuration of required fields when a patron is editing their information via the OPAC");
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','multiple'
FROM (SELECT value FROM systempreferences WHERE variable="PatronSelfRegistrationBorrowerMandatoryField") tmp
});
},
}