]> git.koha-community.org Git - koha.git/commit
Bug 15084: [QA Follow-up] Correct field length of currency
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Wed, 9 Mar 2016 12:29:08 +0000 (13:29 +0100)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Wed, 9 Mar 2016 15:04:35 +0000 (15:04 +0000)
commit0c403490963a2f57b563c0bd11845cd0cf198181
tree7bd2dd9a85a5cdbae733e169c3db45cb427a4f2a
parentd25c7f9232c79cc1d52c76da6c17d23fb801fb87
 Bug 15084: [QA Follow-up] Correct field length of currency

Bug 15084 added a FK constraint while the fields in the database are not
in sync as to length. This will produce errors when using currency codes
longer than three characters. Probably you won't, but nobody stopped
users from entering EURO or DOLLAR etc. Not to speak about TestBuilder
too.

This patch corrects the database revision for aqorders in updatedatabase,
because we need to change the field length before adding the FK constraint.
It also updates other currency fields < 10 chars (via atomicupdate).
RM: So please add that dbrev too in updatedatabase.

Note that another report should deal with adding missing constraints on
the currency code in suggestions and aqbooksellers.
Also note that the aqorder fields listprice and invoiceprice refer to
currency. Imo these are very poor names for currency codes; you should
never call something a price when you mean a currency code!

Similar changes are applied to kohastructure.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the db revisions.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
installer/data/mysql/atomicupdate/15084_currency.sql [new file with mode: 0644]
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl