Bug 39452: (follow-up) Use INSERT IGNORE for system preference
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
74a49b117b
commit
b7227e8738
|
|
@ -0,0 +1,21 @@
|
|||
use Modern::Perl;
|
||||
use Koha::Installer::Output qw(say_warning say_success say_info);
|
||||
|
||||
return {
|
||||
bug_number => "39452",
|
||||
description => "Add CardnumberLog Preference",
|
||||
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
|
||||
('CardnumberLog','1',NULL,'If ON, log edit actions on patron cardnumbers','YesNo')
|
||||
}
|
||||
);
|
||||
|
||||
say $out "Added new system preference 'CardnumberLog'";
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue