[Koha] branchcodes and case sensitivity

Galen Charlton gmc at esilibrary.com
Thu Sep 16 04:01:51 NZST 2010


Hi,

On Sep 3, 2010, at 4:03 PM, Chris Hobbs wrote:
> The obvious fix would be to simply set branchcode to LOWER(branchcode) in the back end, but the foreign key constraint prevents me from doing so through mysql. 

A longer-term fix would be to figure out why it's not setting the branchcode correctly, but as far as cascading the update of branchcode is concerned, you could either alter the constraints to cascade updates or take advantage of MySQL's ability to disable foreign key checks temporarily:

SET FOREIGN_KEY_CHECKS = 0;
update branches set branchcode = lower(branchcode);
-- update tables that reference to branchcode
SET FOREIGN_KEY_CHECKS = 1;

Obviously something like this would call for doing a full backup first.

Regards,

Galen
--
Galen Charlton
VP, Data Services
Equinox Software, Inc. / Your Library's Guide to Open Source
email:  gmc at esilibrary.com
direct: +1 352-215-7548
skype:  gmcharlt
web:    http://www.esilibrary.com/



More information about the Koha mailing list