Bug 9468: followup insert ignore
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 20 Apr 2015 09:14:59 +0000 (11:14 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 5 Nov 2015 13:47:33 +0000 (10:47 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/updatedatabase.pl

index fb3df40..2446527 100755 (executable)
@@ -11324,10 +11324,10 @@ if ( CheckVersion($DBversion) ) {
 $DBversion = "3.19.00.XXX";
 if ( CheckVersion($DBversion) ) {
     foreach my $format (@{ GetSupportList() }) {
-        $dbh->do(
-            q/INSERT INTO authorised_values (category, authorised_value, lib, lib_opac, imageurl)
-            VALUES (?, ?, ?, ?, ?)/,
-            {},
+        $dbh->do(q|
+            INSERT IGNORE INTO authorised_values (category, authorised_value, lib, lib_opac, imageurl)
+            VALUES (?, ?, ?, ?, ?)
+        |, {},
             'SUGGEST_FORMAT', $format->{itemtype}, $format->{description}, $format->{description}, $format->{imageurl}
         );
     }