From 9d93235fca455dc7ad17bcb8421052b0fcd4da4b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 4 Mar 2015 12:26:34 +0100 Subject: [PATCH] Bug 5338: Use insert ignore to avoid a warning if 'SER' already exists --- installer/data/mysql/updatedatabase.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 18b4411..54f0c09 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9796,11 +9796,11 @@ if(CheckVersion($DBversion)) { $DBversion = "3.19.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q| - INSERT INTO authorised_values (category, authorised_value, lib) VALUES + INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES ('REPORT_GROUP', 'SER', 'Serials') |); - print "Upgrade to $DBversion done (Bug 5338 - Add Serial to the report groups)\n"; + print "Upgrade to $DBversion done (Bug 5338 - Add Serial to the report groups if does not exist)\n"; SetVersion ($DBversion); } -- 2.1.0