From 49a8f288bbd51fdb7a13e5f24479d491ff6d6237 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 --- installer/data/mysql/atomicupdate/bug_17845.perl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_17845.perl b/installer/data/mysql/atomicupdate/bug_17845.perl index a70505df37..a9dc391f60 100644 --- a/installer/data/mysql/atomicupdate/bug_17845.perl +++ b/installer/data/mysql/atomicupdate/bug_17845.perl @@ -2,10 +2,10 @@ $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"} ); SetVersion( $DBversion ); -- 2.20.1