From e1cc1ab902f4153d2de9f926798403f5c05c3e5e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 4 Sep 2020 17:04:53 +0100 Subject: [PATCH] Bug 26268: (QA follow-up) Split DB update checks This patch splits the DB update such that the 'paidfor' field is checked for distinctly in the deleteditems table rather than assuming if it exists in the items table it will also exist in deleteditems. We also correct the check as highlights by Julian. --- installer/data/mysql/atomicupdate/bug_26268.perl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/atomicupdate/bug_26268.perl b/installer/data/mysql/atomicupdate/bug_26268.perl index 09790bff21..a5769225e4 100644 --- a/installer/data/mysql/atomicupdate/bug_26268.perl +++ b/installer/data/mysql/atomicupdate/bug_26268.perl @@ -1,8 +1,11 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { - if( !column_exists( 'items', 'paidfor' ) ) { + if( column_exists( 'items', 'paidfor' ) ) { $dbh->do(q|ALTER TABLE items DROP COLUMN paidfor|); + } + + if ( column_exists( 'deleteditems', 'paidfor' ) ) { $dbh->do(q|ALTER TABLE deleteditems DROP COLUMN paidfor|); } -- 2.20.1