Bug 27779: New atomic update syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2021-11-11 15:23:27 -03:00
parent 7f33f06d3b
commit 78532c6f49
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 15 additions and 8 deletions

View File

@ -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");
}

View File

@ -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'
});
},
}