[Koha-bugs] [Bug 16797] errors in UNIMARC complet sample authorities

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 28 16:16:33 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16797

--- Comment #20 from sandboxes at biblibre.com <sandboxes at biblibre.com> ---
Created attachment 65315
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65315&action=edit
Bug 16797 - errors in UNIMARC complet sample authorities

The SQL UNIMARC complet sample authorities fails :
installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql

Some lines of auth_subfield_structure use an authtypecode not existing in lines
of authtypecode : AUTTIT, SAUT, SCO and STU.

Test plan :
- On a UNIMARC database :
- clear auth tables :
mysql> delete from auth_subfield_structure;
mysql> delete from auth_tag_structure;
mysql> delete from auth_types;
- import sql file :
mysql <
installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql
=> Without patch you get error :
ERROR 1452 (23000) at line 1132: Cannot add or update a child row: a foreign
key constraint fails (`koha`.`auth_subfield_structure`, CONSTRAINT
`auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES
`auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE)
=> With patch no errors :
> select distinct(authtypecode) from auth_subfield_structure;
+--------------+
| authtypecode |
+--------------+
|              |
| CO           |
| CO_UNI_TI    |
| FAM          |
| GENRE/FORM   |
| NAME_COL     |
| NP           |
| PA           |
| SAUTTIT      |
| SNC          |
| SNG          |
| TM           |
| TU           |
+--------------+
13 rows in set (0.00 sec)
- Have a look at authoritie frameworks in Admin

Signed-off-by: Laurence Rault <laurence.rault at biblibre.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list