Hello everyone, I have a question regarding barcode length in Koha. I'm importing a new biblio database and some barcodes have length of 26 or 28 and so on. Koha's database schema limits the barcode field in the items table to varchar(20). My question is: Is it okay to manually alter this field length? As so: *ALTER TABLE items MODIFY barcode VARCHAR(40);* What sort of problems can this cause in the future? Do I have to apply this change everytime I update Koha to a newer version? Thanks a bunch, Pedro Amorim
* Pedro Amorim (pjamorim91@gmail.com) wrote:
Hello everyone,
I have a question regarding barcode length in Koha. I'm importing a new biblio database and some barcodes have length of 26 or 28 and so on.
Koha's database schema limits the barcode field in the items table to varchar(20).
My question is: Is it okay to manually alter this field length? As so:
*ALTER TABLE items MODIFY barcode VARCHAR(40);*
You need to modify the deleteditems table to match too
What sort of problems can this cause in the future? Do I have to apply this change everytime I update Koha to a newer version?
You shouldn't only if you drop and recreate your database. But please do this on a test system first, before you try it in production Chris
Thanks a bunch,
Pedro Amorim _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand
Greetings, This question reminded of of a blog entry. http://blog.l2c2.co.in/index.php/2016/09/12/down-the-rabbit-hole-making-card... It also reminded me of a bugzilla entry. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15690 I think perhaps another patch might be in order as well. GPML, Mark Tompsett
Hello Chris and Mark, Thank you for replying. The information on the deleteditems table was particularly valuable. I changed the database and everything went okay smoothly. Our problem, for now, is solved. I also saw Mark's links and although the same cause, it's a different problem. I guess a possible permanent solution for the future would be to put the field to varchar(255) and a new sys pref barcodelenght would default to 20. That way, anyone can change the barcode length to their needs without having to change the database schema which is something evasive and not at all recommended in 99% of the situations. Thanks again, Pedro Amorim 2017-01-09 22:48 GMT-01:00 Mark Tompsett <mtompset@hotmail.com>:
Greetings,
This question reminded of of a blog entry. http://blog.l2c2.co.in/index.php/2016/09/12/down-the- rabbit-hole-making-cardnumber-field-in-koha-longer-than-16- characters-limit/
It also reminded me of a bugzilla entry. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15690
I think perhaps another patch might be in order as well.
GPML, Mark Tompsett
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
I have worked around this issue by placing the borrowers cardnumber into a borrowers_attribute. The attribute is set to unique and is searchable and can be used to logon to Koha. We simply 'autogenerated' cardnumbers for the library to use in the borrowers.cardnumber field. This way we left the system intact and satisfied the libraries need for 16+ cardnumber Joy On Tue, Jan 10, 2017 at 7:43 AM, Pedro Amorim <pjamorim91@gmail.com> wrote:
Hello Chris and Mark,
Thank you for replying. The information on the deleteditems table was particularly valuable.
I changed the database and everything went okay smoothly. Our problem, for now, is solved. I also saw Mark's links and although the same cause, it's a different problem.
I guess a possible permanent solution for the future would be to put the field to varchar(255) and a new sys pref barcodelenght would default to 20. That way, anyone can change the barcode length to their needs without having to change the database schema which is something evasive and not at all recommended in 99% of the situations.
Thanks again,
Pedro Amorim
2017-01-09 22:48 GMT-01:00 Mark Tompsett <mtompset@hotmail.com>:
Greetings,
This question reminded of of a blog entry. http://blog.l2c2.co.in/index.php/2016/09/12/down-the- rabbit-hole-making-cardnumber-field-in-koha-longer-than-16- characters-limit/
It also reminded me of a bugzilla entry. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15690
I think perhaps another patch might be in order as well.
GPML, Mark Tompsett
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Joy Nelson Director of Migrations ByWater Solutions <http://bywatersolutions.com> Support and Consulting for Open Source Software Office: Fort Worth, TX Phone/Fax (888)900-8944 What is Koha? <http://bywatersolutions.com/what-is-koha/>
participants (4)
-
Chris Cormack -
Joy Nelson -
Mark Tompsett -
Pedro Amorim