From aaf79e3348bb8612587acdc77673c0da1e0cb906 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 14 Apr 2023 09:32:35 +0000 Subject: [PATCH] Bug 32450: (QA follow-up) Polishing atomic update Database comment. Variable names. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- .../atomicupdate/bug_32450-add_debit_type_flag.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl b/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl index 404747061e..bd77117efb 100755 --- a/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl +++ b/installer/data/mysql/atomicupdate/bug_32450-add_debit_type_flag.pl @@ -9,7 +9,9 @@ return { if( !column_exists( 'account_debit_types', 'restricts_checkouts' ) ) { $dbh->do(q{ - ALTER TABLE account_debit_types ADD COLUMN `restricts_checkouts` tinyint(1) NOT NULL DEFAULT 1 AFTER `archived` + ALTER TABLE account_debit_types ADD COLUMN `restricts_checkouts` tinyint(1) NOT NULL DEFAULT 1 + COMMENT 'boolean flag to denote if the noissuescharge syspref for this debit type is active' + AFTER `archived`; }); say $out "Added column 'account_debit_types.restricts_checkouts'"; @@ -20,7 +22,7 @@ return { # Hardcoded values from sub non_issues_charges my @holds = ('RESERVE'); - my @renewals = ('RENT', 'RENT_DAILY', 'RENT_RENEW', 'RENT_DAILY_RENEW'); + my @rentals = ('RENT', 'RENT_DAILY', 'RENT_RENEW', 'RENT_DAILY_RENEW'); my @manual; my $sth = $dbh->prepare("SELECT code FROM account_debit_types WHERE is_system = 0"); $sth->execute; @@ -51,7 +53,7 @@ return { my @debit_types_to_update; if($_ eq 'ManInvInNoissuesCharge') { push @debit_types_to_update, @manual}; - if($_ eq 'RentalsInNoissuesCharge') { push @debit_types_to_update, @renewals}; + if($_ eq 'RentalsInNoissuesCharge') { push @debit_types_to_update, @rentals}; if($_ eq 'HoldsInNoissuesCharge') { push @debit_types_to_update, @holds}; my $string = join(",", map { $dbh->quote($_) } @debit_types_to_update); @@ -74,4 +76,4 @@ return { } }, -}; \ No newline at end of file +}; -- 2.39.5