[Koha-devel] bug in marc_subfield_structure table definition?

Fernando Canizo conan at lugmen.org.ar
Tue Apr 12 14:50:54 CEST 2011


I would file a bug, but since I'm too new here I preferred to ask before.

Current marc_subfield_structure table definition looks like this:

CREATE TABLE `marc_subfield_structure` (
...
   `authorised_value` varchar(20) default NULL,
...);

That column points to 'category' in authorised_values table, which is 
defined like this:

CREATE TABLE `authorised_values` (
...
   `category` varchar(10) NOT NULL default '',
...);

Two questions and a possible digression:

Q1. Shouldn't both be equal?
Q2. Shouldn't authorised_value in marc_subfield_structure be a foreign 
key referencing category on authorised_values table?

The quick solution for this is to make authorised_value a varchar(10) in 
marc_subfield_structure, since all other tables pointing to 
authorised_values.category use that.

Making it also a foreign key would be desirable to add database consistency.

Should I file a bug or I'm seeing this in a wrong way?

Note: the digression grew too extensive, I'll hear answers to before 
going with it.

-- 
Fernando Canizo (a.k.a. conan) - http://conan.muriandre.com/
GCS d? s:+ a C++ P--- L++++ E--- W+++ w--- M-- PE-- !tv b+++ h---- y+++


More information about the Koha-devel mailing list