From d8960dcee6fd648dba9bf43b0c6e1e1a229c2229 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Nov 2015 13:29:05 +0000 Subject: [PATCH] Bug 14298: Do not insert the permission if already exists. To avoid a warning on updating from 3.20.x to 3.22, use "insert ignore into". This patch is not useful for 3.20.x. --- installer/data/mysql/updatedatabase.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3d52d39..a61f3c0 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10869,7 +10869,7 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.21.00.027"; if ( CheckVersion($DBversion) ) { $dbh->do(q| - INSERT INTO permissions (module_bit, code, description) + INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (1, 'self_checkout', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID') |); -- 2.1.0