[Koha-bugs] [Bug 4002] Issues with borrowernumber set as NULL

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 3 11:23:58 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4002

Paul Poulain <paul.poulain at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian.walls at bywatersolutions.
                   |                            |com,
                   |                            |paul.poulain at biblibre.com

--- Comment #9 from Paul Poulain <paul.poulain at biblibre.com> 2011-08-03 09:23:58 UTC ---
The patch works fine for fresh install.

There is a problem with updates: the change to NOT NULL of some columns
requires the contraints to be removed, otherwise, mySQL complains (and don't do
anything)

The lines 
    $dbh->do("ALTER TABLE issues ALTER COLUMN borrowernumber DROP DEFAULT");
    $dbh->do("ALTER TABLE issues ALTER COLUMN itemnumber DROP DEFAULT");
    $dbh->do("ALTER TABLE issues MODIFY COLUMN borrowernumber int(11) NOT
NULL");
    $dbh->do("ALTER TABLE issues MODIFY COLUMN itemnumber int(11) NOT NULL");
will issue a message (modify failed).

I've moved the DROP FOREIGN KEY just before the ALTER TABLE, and it works fine
now.

Marking as passed QA, but chris, it's worth a complementary check...

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list