From 0bc9f82779a9bb4338d4e1f1d77613d864d42b34 Mon Sep 17 00:00:00 2001
From: Mark Tompsett <mtompset@hotmail.com>
Date: Tue, 17 Apr 2018 17:13:18 +0000
Subject: [PATCH] Bug 18736: Follow to prevent duplicate run noise

TEST PLAN
---------
update the database twice
-- noise
apply patch
update the database
-- no noise
---
 installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl b/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl
index 717e56f..1f3e249 100644
--- a/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl
+++ b/installer/data/mysql/atomicupdate/bug18736_add_rounding_syspref.perl
@@ -1,6 +1,6 @@
 $DBversion = 'XXX';  # will be replaced by the RM
 if( CheckVersion( $DBversion ) ) {
-    $dbh->do( "INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OrderPriceRounding',NULL,'Local preference for rounding orders before calculations to ensure correct calculations','|nearest_cent','Choice')" );
+    $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OrderPriceRounding',NULL,'Local preference for rounding orders before calculations to ensure correct calculations','|nearest_cent','Choice')" );
 
     SetVersion( $DBversion );
     print "Upgrade to $DBversion done (Bug 18736 - Add syspref to control order rounding)\n";
-- 
2.1.4