From 7d2b6a3f3506102dc7cd8ccc729f96579f753fae 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. Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- 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.39.2