From 78532c6f49f6daa67d714ddb78c3cce5b6cf4141 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 11 Nov 2021 15:23:27 -0300 Subject: [PATCH] Bug 27779: New atomic update syntax Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/atomicupdate/bug_27779.perl | 8 -------- installer/data/mysql/atomicupdate/bug_27779.pl | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_27779.perl create mode 100755 installer/data/mysql/atomicupdate/bug_27779.pl diff --git a/installer/data/mysql/atomicupdate/bug_27779.perl b/installer/data/mysql/atomicupdate/bug_27779.perl deleted file mode 100644 index c762799800..0000000000 --- a/installer/data/mysql/atomicupdate/bug_27779.perl +++ /dev/null @@ -1,8 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - # REFUND - $dbh->do( "UPDATE account_credit_types SET description = 'Refund' WHERE code = 'REFUND'" ); - - NewVersion( $DBversion, 27779, "Simplify credit descriptions"); -} diff --git a/installer/data/mysql/atomicupdate/bug_27779.pl b/installer/data/mysql/atomicupdate/bug_27779.pl new file mode 100755 index 0000000000..f99c08d481 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_27779.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "27779", + description => "Simplify credit descriptions", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{ + UPDATE account_credit_types + SET description = 'Refund' WHERE code = 'REFUND' + }); + }, +} -- 2.39.5