[Koha-patches] [PATCH] fixed potential SQL error in fr-FR sample itemtypes

Galen Charlton galen.charlton at liblime.com
Mon May 12 18:41:59 CEST 2008


There is nothing to prevent a user from loading the
sample itemtypes from both 3-LecturePub and 4-Conservation.

To avoid an SQL error (and to let the installer tests
pass), made two of the SQL inserts "INSERT IGNORE" for
sample item types that have the same key.
---
 .../fr-FR/4-Conservation/sample_itemtypes.sql      |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/installer/data/mysql/fr-FR/4-Conservation/sample_itemtypes.sql b/installer/data/mysql/fr-FR/4-Conservation/sample_itemtypes.sql
index 1f6b441..03f3373 100755
--- a/installer/data/mysql/fr-FR/4-Conservation/sample_itemtypes.sql
+++ b/installer/data/mysql/fr-FR/4-Conservation/sample_itemtypes.sql
@@ -2,12 +2,12 @@
 -- Contenu de la table `itemtypes`
 -- 
 SET NAMES utf8;
-INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('ARTI', 'Article', 0, 0.0000, 0, 'Pamphlet.gif', '');
+INSERT IGNORE INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('ARTI', 'Article', 0, 0.0000, 0, 'Pamphlet.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('MEM', 'Mémoire', 0, 0.0000, 0, 'Faculty Course Materials.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('MICR', 'Microfiche', 0, 0.0000, 0, 'Microfiche.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('MONA', 'Livre ancien', 0, 0.0000, 0, 'Rare Book.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('MONO', ' Livre', 1, 0.0000, 0, 'Fiction.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('MULT', 'Multimédia (K7, DVD...)', 0, 0.0000, 0, 'Microfilm.gif', '');
-INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('PERI', 'Périodique', 0, 0.0000, 0, 'SIRS.gif', '');
+INSERT IGNORE INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('PERI', 'Périodique', 0, 0.0000, 0, 'SIRS.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('THE', 'Thèse ancienne', 0, 0.0000, 0, 'Rare Book.gif', '');
 INSERT INTO `itemtypes` (`itemtype`, `description`, `renewalsallowed`, `rentalcharge`, `notforloan`, `imageurl`, `summary`) VALUES ('TU', 'Travail Universitaire', 0, 0.0000, 0, 'Faculty Course Materials.gif', '');
-- 
1.5.5.rc0.16.g02b00




More information about the Koha-patches mailing list