[Koha] [Koha-devel] Update database error on Koha install

Galen Charlton gmc at esilibrary.com
Wed Mar 26 06:56:35 NZDT 2014


Hi,

On Tue, Mar 25, 2014 at 8:38 AM, Scott Kushner
<skushner at mplmain.mtpl.org> wrote:
> Does anyone know how to get around this? It seems that I'm stuck in a loop
> with the installer and cannot get out!
>
> Any help would be appreciated.

It looks like some manual SQL would be called for, following the steps
in the relevant database schema update.  Specifically, since it looks
like that the borrowernumber column is already present, probably from
a previous run, you should try:

[1] UPDATE patronimage LEFT JOIN borrowers USING ( cardnumber ) SET
patronimage.borrowernumber = borrowers.borrowernumber;

[2] ALTER TABLE patronimage DROP FOREIGN KEY patronimage_fk1;

It's possible that this one may fail if no such foreign key with that
name exists.  If so, that's fine, you can continue on:

[3] ALTER TABLE patronimage DROP PRIMARY KEY, ADD PRIMARY KEY( borrowernumber );

[4] ALTER TABLE patronimage DROP cardnumber;

[5] ALTER TABLE patronimage ADD FOREIGN KEY ( borrowernumber )
REFERENCES borrowers ( borrowernumber ) ON DELETE CASCADE ON UPDATE
CASCADE;

If you get this far, the final step is to tell Koha that you've
successfully installed that DB revision:

UPDATE systempreferences SET value = '3.1300030' WHERE variable = 'Version';

After that, you should be able to proceed with the rest of the schema upgrade.

Regards,

Galen
-- 
Galen Charlton
Manager of Implementation
Equinox Software, Inc. / The Open Source Experts
email:  gmc at esilibrary.com
direct: +1 770-709-5581
cell:   +1 404-984-4366
skype:  gmcharlt
web:    http://www.esilibrary.com/
Supporting Koha and Evergreen: http://koha-community.org &
http://evergreen-ils.org


More information about the Koha mailing list