From b0a783a8a8428ad657b8b58a341474718c021203 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Mar 2020 10:56:08 +0100 Subject: [PATCH] Bug 17845: Remove the column if it exists Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_17845.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_17845.perl b/installer/data/mysql/atomicupdate/bug_17845.perl index 375adc5de3..a9dc391f60 100644 --- a/installer/data/mysql/atomicupdate/bug_17845.perl +++ b/installer/data/mysql/atomicupdate/bug_17845.perl @@ -2,8 +2,8 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { $dbh->do( "DROP TABLE IF EXISTS printers" ); - if( !column_exists( 'branches', 'branchprinter' ) ) { - $dbh->do( "ALTER TABLE branches DROP COLUMN branchprinter" ); + if( column_exists( 'branches', 'branchprinter' ) ) { + $dbh->do( "ALTER TABLE branches DROP COLUMN branchprinter" ); } $dbh->do(qq{ DELETE FROM systempreferences WHERE variable = "printcirculationslips"} ); -- 2.39.5