Bug 28138: (follow-up) New atomic update

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Fridolin Somers 2022-03-11 13:06:45 -10:00
parent a7139af17a
commit effefacf30
2 changed files with 15 additions and 9 deletions

View file

@ -1,9 +0,0 @@
$DBversion = 'XXX';
if ( CheckVersion($DBversion) ) {
$dbh->do(q{
INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
VALUES ('RequirePaymentType','0','','Require staff to select a payment type when a payment is made','YesNo')
});
NewVersion( $DBversion, '28138', 'Add system preference RequirePaymentType');
}

View file

@ -0,0 +1,15 @@
use Modern::Perl;
return {
bug_number => "28138",
description => "Add system preference RequirePaymentType",
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 ('RequirePaymentType','0','','Require staff to select a payment type when a payment is made','YesNo')
});
},
};