[Koha] Problem with the Koha Upgradation

Pattabhi RK pattabhi at au-kbc.org
Mon Mar 14 20:51:59 NZDT 2022


Hi Shiva Kumara,

  As replied by other members already, it is not easy to upgrade the old
Koha DB from 3.23 to current version 21.11 koha. The main problem is that
old DB and new DB have different columns for some of the main tables. We
need to properly study and do. The updatedatabase.pl will not work
straightaway. We need to make several changes in this code.

Best regards,
Pattabhi RK

Koha Team
AU-KBC Research Centre, Chennai

On Mon, Mar 14, 2022 at 12:52 PM Shiva Kumara <shivu.rm at gmail.com> wrote:

> 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 18.06.00.035 version. and
> showing the following errors.
>
> Upgrade to 18.06.00.031 done (Bug 20819: Add patron_consent)
> Upgrade to 18.06.00.032 done (Bug 5458: length of items.ccode disagrees
> with authorised_values.authorised_value)
> Upgrade to 18.06.00.033 done (Bug 12747 - Add
> AdditionalFieldsInZ3950ResultSearch system preference)
> Upgrade to 18.06.00.034 done (Bug 17602 - Integrate support for
> OneClickdigital/Recorded Books API)
> Upgrade to 18.06.00.035 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.
> DBIx::Class::Schema::throw_exception(Koha::Schema=HASH(0x55aa5fe82ca0),
> "DBI Exception: DBD::mysql::db do failed: Can't create table `"...) called
> at /usr/share/perl5/DBIx/Class/Storage.pm line 113
>
> DBIx::Class::Storage::throw_exception(DBIx::Class::Storage::DBI::mysql=HASH(0x55aa651555f0),
> "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
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> 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
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> 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
> >
> _______________________________________________
>
> 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