[Koha-devel] Patron attributes tables
Owen Leonard
oleonard at myacpl.org
Tue Oct 21 15:19:41 CEST 2008
I was looking at the new "Additional attributes and identifiers"
feature and have some questions about the table structure. I was
curious why "Patron attribute type code" is not editable. I see that
in the borrower_attribute_types table there is no unique numeric id,
just the "code":
borrower_attribute_types
+--------+--------------------------------------------+
| code | description |
+--------+--------------------------------------------+
| pet | The patron's pets |
| school | A student patron's educational institution |
+--------+--------------------------------------------+
And in the borrower_attributes table, each line for that particular
code has to repeat the value of "code:"
borrower_attributes
+----------------+--------+-----------------+----------+
| borrowernumber | code | attribute | password |
+----------------+--------+-----------------+----------+
| 51 | school | Ohio University | NULL |
| 52 | pet | Chappie | NULL |
| 52 | pet | Ivy | NULL |
| 52 | pet | Rascal | NULL |
+----------------+--------+-----------------+----------+
I would think there should be an auto-incrementing numeric id in the
borrower_attribute_types table for each code which would get entered
into the borrower_attributes table. Then you could freely edit
"code"'s value without having to worry about updating every line in
borrower_attributes.
-- Owen
--
Web Developer
Athens County Public Libraries
http://www.myacpl.org
More information about the Koha-devel
mailing list