From b531cd1c8a6922e3c9196e690e2cd9cf7850cc26 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 --- installer/data/mysql/atomicupdate/bug_21336a.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_21336a.perl b/installer/data/mysql/atomicupdate/bug_21336a.perl index 2ac9f76585..ad45908965 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"; } -- 2.20.1