From effefacf302271128b36337ba11c5c416189683e Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 11 Mar 2022 13:06:45 -1000 Subject: [PATCH] Bug 28138: (follow-up) New atomic update Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- .../add-system-preference-RequirePaymentType.perl | 9 --------- installer/data/mysql/atomicupdate/bug_28138.pl | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl create mode 100755 installer/data/mysql/atomicupdate/bug_28138.pl diff --git a/installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl b/installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl deleted file mode 100644 index 5ba51c1a38..0000000000 --- a/installer/data/mysql/atomicupdate/add-system-preference-RequirePaymentType.perl +++ /dev/null @@ -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'); -} diff --git a/installer/data/mysql/atomicupdate/bug_28138.pl b/installer/data/mysql/atomicupdate/bug_28138.pl new file mode 100755 index 0000000000..94f95a02b2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28138.pl @@ -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') + }); + }, +}; -- 2.39.5