[Koha] Problem with the Koha Upgradation

Shiva Kumara shivu.rm at gmail.com
Mon Mar 14 20:22:53 NZDT 2022

Thank you very much Katrin and Mark Alexander, your suggestions through
some light on the issues. I commented on the lines of what 'Mark
Alexander,' suggested, it was upgraded to the version. and
showing the following errors.

Upgrade to done (Bug 20819: Add patron_consent)
Upgrade to done (Bug 5458: length of items.ccode disagrees
with authorised_values.authorised_value)
Upgrade to done (Bug 12747 - Add
AdditionalFieldsInZ3950ResultSearch system preference)
Upgrade to done (Bug 17602 - Integrate support for
OneClickdigital/Recorded Books API)
Upgrade to done (Bug 21403 - Add Indian Amazon Affiliate
option to AmazonLocale setting)
{UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Can't create table
`koha_library`.`circulation_rules` (errno: 150 "Foreign key constraint is
incorrectly formed")  at /usr/share/perl5/DBIx/Class/Schema.pm line 1118.
"DBI Exception: DBD::mysql::db do failed: Can't create table `"...) called
at /usr/share/perl5/DBIx/Class/Storage.pm line 113
"DBI Exception: DBD::mysql::db do failed: Can't create table `"...) called
at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1501
DBIx::Class::Storage::DBI::__ANON__("DBD::mysql::db do failed: Can't create
table `koha_library`.`"..., DBI::db=HASH(0x55aa6561e4b0), undef) called at
line 16489

if I again commented the line 16489 "*unless
(TableExists('circulation_rules')){*" in updatedatabase.pl. The error will
be different as follows.

Unmatched right curly bracket at
line 16527, at end of line
syntax error at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
updatedatabase.pl line 16527, near "}"
Execution of /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
updatedatabase.pl aborted due to compilation errors.

I am stuck here, I do not have knowledge of databases and programs. Kindly
suggest me a solutions

Thank you,

***With Regards***
Shivakumara RM
Digital Library Analyst
Institute for Social and Economic Change
Dr. VKRV Rao Road, Nagarabhavi,
Bangalore - 560 072

On Wed, 9 Mar 2022 at 06:05, Mark Alexander <marka at pobox.com> wrote:

> Excerpts from Shiva Kumara's message of 2022-03-07 12:57:51 +0530:
> > {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate column name
> > 'letternumber'  at /usr/share/perl5/DBIx/Class/Schema.pm line 1118.
> I ran into this problem recently when I upgraded Koha 3.16 to the latest
> stable Koha.
> I fixed this by commenting out the following statement in
> updatedatabase.pl and restarting
> koha-upgrade-schema:
>     $dbh->do("ALTER TABLE overduerules_transport_types ADD COLUMN
> letternumber INT(1) NOT NULL DEFAULT 1 AFTER id");
> You will probably run into another error:
> {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Can't DROP INDEX
> `isbn`; check that it exists  at /usr/share/perl5/DBIx/Class/Schema.pm line
> 1118.
> I fixed this by commenting out these two lines in updatedatabase.pl:
>         $dbh->do( "ALTER TABLE biblioitems DROP INDEX isbn" );
>         $dbh->do( "ALTER TABLE biblioitems DROP INDEX issn" );
> --
> One possible reason why things aren't going according to plan
> is that there never was a plan. --Ashleigh Brilliant
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

More information about the Koha mailing list