From f4fdc2afa58fcb7036bcfe0f7b69b56d89bd05b1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 11 May 2020 11:33:32 +0100 Subject: [PATCH] Bug 25389: Catch LOST_RETURNED in DB update 19.12.00.021 An errant update from bug 22563 could lead to cases of LOST_RETURNED as aposed to LOST_RETURN as an account_credit_type. This patch adds code to deal with those cases to the update for bug 24592 --- installer/data/mysql/updatedatabase.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4b38a60862..a00f661372 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20755,6 +20755,8 @@ if( CheckVersion( $DBversion ) ) { credit_type_code = 'LOST_FOUND' WHERE credit_type_code = 'LOST_RETURN' + OR + credit_type_code = 'LOST_RETURNED' }); # Migrate LOST + RETURNED to LOST + FOUND @@ -20770,6 +20772,11 @@ if( CheckVersion( $DBversion ) ) { }); # Drop LOST_RETURNED credit type + $dbh->do(qq{ + DELETE FROM account_credit_types WHERE code = 'LOST_RETURNED' + }); + + # Drop LOST_RETURN credit type $dbh->do(qq{ DELETE FROM account_credit_types WHERE code = 'LOST_RETURN' }); -- 2.20.1