From 5e1894c94813f10efa0c0d0454958ce19b890742 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 29 Mar 2019 08:30:06 +0000 Subject: [PATCH] Bug 21336: (QA follow-up) Add column_exists in db revision As requested by Josef on comment70. Test plan: Run db revision twice. No warnings. Signed-off-by: Marcel de Rooy Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- installer/data/mysql/atomicupdate/bug_21336a.perl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_21336a.perl b/installer/data/mysql/atomicupdate/bug_21336a.perl index 2ac9f76..ad45908 100644 --- a/installer/data/mysql/atomicupdate/bug_21336a.perl +++ b/installer/data/mysql/atomicupdate/bug_21336a.perl @@ -1,7 +1,7 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { - $dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ); - $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ); + $dbh->do( "ALTER TABLE borrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('borrowers', 'flgAnonymized'); + $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN flgAnonymized tinyint DEFAULT 0" ) if !column_exists('deletedborrowers', 'flgAnonymized'); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 21336 - Add field flgAnonymized)\n"; } -- 1.7.2.5