[Koha] stack number cannot be stored in Koha 21.05
Michael Kuhn
mik at adminkuhn.ch
Thu Oct 7 08:39:51 NZDT 2021
Hi Katrin
> 952$j is mapped to items.stack by default that has the datatype
> tinyint(1) in the database. A common problem I have encountered here
> is that it won't save when you try to store something non-numeric or
> outside the range of tinyint. Could that be the issue?
Yes, this would indeed be a problem... Thank you very much for the hint!
Our library was working with Koha 18.11 before - where it was possible
to store content like "m011577".
Looking into http://schema.koha-community.org/18_11/tables/items.html
shows that in this version the datatype was BIT(0) which seems to mean
mean "tinyint". In my Koha 21.05 demo installation I see it actually is
"tinyint".
However when asking the actual Koha 21.05 library database the datatype
is given as "varchar"!
So it seems like someone has unscrupulously changed the datatype of this
field in the past (a very bad idea). But then again - shouldn't the
database accept value "m011577" when the datatype is "varchar"? At least
in Koha 18.11 it seems to have worked.
I was able to successfuilly insert "011577". But not "m011577". Is there
maybe a script that checks if the values are of the correct datatype
when trying to store anything in the database? Maybe the guy responsible
for this problem also changed the datatype in such a script?
Best wishes: Michael
--
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W www.adminkuhn.ch
More information about the Koha
mailing list