Hi,

you are trying to update from a real old version of Koha, so it's not so
easy to provide help.

What you could do when running into an error is taking a look at the
next update statement after 3.23.00.040 in updatedatabase.pl. You will
have to check, why it fails on your database and then figure out the
change required to make it work.

In this case this would be:

$DBversion = "3.23.00.041";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {

    my $dbh = C4::Context->dbh;
    my ($print_error) = $dbh->{PrintError};
    $dbh->{RaiseError} = 0;
    $dbh->{PrintError} = 0;
    $dbh->do("ALTER TABLE overduerules_transport_types ADD COLUMN
letternumber INT(1) NOT NULL DEFAULT 1 AFTER id");
    $dbh->{PrintError} = $print_error;

    print "Upgrade to $DBversion done (Bug 16007: Make sure
overduerules_transport_types.letternumber exists)\n";
    SetVersion($DBversion);

The error is that the column already exists in the
overduerules_transport_types table in your database.

I am not sure why that might be. Did you load your old database into an
empty database (no tables yet created by the installer)?

Hope this helps,

Katrin


On 07.03.22 08:27, Shiva Kumara wrote:
Hi All,
We have a koha backup of 3.23 version. We had installed Ubuntu 20.04.04 LTS
and the Koha 21.11 version successfully. We tried to restore the old koha
database to a new version of koha. When we run the command "*sudo
koha-upgrade-schema library*" for upgrading, we are getting the following
error.

root@koha:/home/koha/Documents# sudo koha-upgrade-schema library
Upgrading database schema for library
Upgrade to 3.23.00.000 done (The year of the monkey will be here soon.)
Upgrade to 3.23.00.001 done (Bug 11625 - Add pref
DefaultToLoggedInLibraryCircRules and DefaultToLoggedInLibraryNoticesSlips)
Upgrade to 3.23.00.002 done (Bug 11747 - add pref
DefaultToLoggedInLibraryOverdueTriggers)
Upgrade to 3.23.00.003 done (Bug 8085 - Rename 'Reserve slip' to 'Hold
slip')
Upgrade to 3.23.00.004 done (Bug 9819 - stopwords related code should be
removed)
Upgrade to 3.23.00.005 done (Bug 11569 - Typo in userpermissions.sql)
Upgrade to 3.23.00.006 done ( Bug 8956 - Split serials enumeration data
into separate fields )
Upgrade to 3.23.00.007 done (Bug 13624 - Remove columns branchcode,
categorytype from table overduerules_transport_types)
Upgrade to 3.23.00.008 done (Bug 9303 - relative's checkouts in the opac)
Upgrade to 3.23.00.009 done (Bug 11622 - Add ability to pay fees and fines
from OPAC via PayPal)
Upgrade to 3.23.00.010 done (Bug 9129 - Add the ability to set the maximum
fine for an item to its replacement price)
Upgrade to 3.23.00.011 done (Bug 13592 - Hold fee not being applied on
placing a hold)
Upgrade to 3.23.00.012 done (Bug 15380 - Move the authority types related
code to Koha::Authority::Type[s] - part 1)
Upgrade to 3.23.00.013 done (Bug 14945 - Add the ability to store the last
patron to return an item)
Upgrade to 3.23.00.014 done (Bug 10076 - Add Bcc syspref for
claimacquisition and clamissues)
Upgrade to 3.23.00.015 done (Bug 15443 - Re-code RESERVESLIP as HOLD_SLIP)
Upgrade to 3.23.00.016 done (Bug 8753 - Add forgot password link to OPAC)
Upgrade to 3.23.00.017 done (Bug 14893 - Separate temporary storage per
instance in Upload.pm)
Upgrade to 3.23.00.018 done (Bug 15446 - Fix systempreferences rows where
type=YesNo and value='')
Upgrade to 3.23.00.019 done (Bug 15411 - Change Non Fiction to Non-fiction
in authorised_values)
Upgrade to 3.23.00.020 done (Bug 9021 - Add SMS via email as an alternative
to SMS services via SMS::Send drivers)
Upgrade to 3.23.00.021 done (Bug 15736 - Add a preference to control
whether all items should be shown in checked-in items list)
Upgrade to 3.23.00.022 done (Bug 13534 - Deleting staff patron will delete
tags approved by this patron)
Upgrade to 3.23.00.023 done (Bug 6624 - Allow Koha to use the new read API
from OpenLibrary)
Upgrade to 3.23.00.024 done (Bug 15517 - Tables borrowers and
deletedborrowers differ again)
Upgrade to 3.23.00.025 done (Bug 15526 - Drop nozebra database table)
Upgrade to 3.23.00.026 done (Bug 15343 - Allow patrons to choose their own
password on self registration)
Upgrade to 3.23.00.027 done (Bug 4941 - Can't set branch in staff client
when singleBranchMode is enabled)
Upgrade to 3.23.00.028 done (Bug 14658 - Split
PatronSelfRegistrationBorrowerUnwantedField into two preferences for
creating and editing)
Upgrade to 3.23.00.029 done (Bug 14199 - Unify all organization code
plugins)
Upgrade to 3.23.00.030 done (Bug 15311: Let libraries set text to display
when OpacMaintenance = on)
Upgrade to 3.23.00.031 done (Bug 14395 - Two different ways to calculate
'No renewal before')
Upgrade to 3.23.00.032 done (Bug 15675 - Add issue_id column to
accountlines and use it for updating fines)
Upgrade to 3.23.00.033 done (Bug 14659 - Allow patrons to enter card number
and patron category on OPAC registration page)
Upgrade to 3.23.00.034 done (Bug 11023: Adds field 'new' in items and
deleteditems tables)
Upgrade to 3.23.00.035 done (Bug 14168 - enhance streaming cataloging to
include youtube)
Upgrade to 3.23.00.036 done (Bug 12803 - Add ability to skip closed
libraries when generating the holds queue)
Upgrade to 3.23.00.037 done (Bug 15084 - Move the currency related code to
Koha::Acquisition::Currenc[y|ies])
Upgrade to 3.23.00.038 done (Bug 14694 - Make decreaseloanHighHolds more
flexible)
Upgrade to 3.23.00.039 done (Bug 15084 - Move the currency related code to
Koha::Acquisition::Currenc[y|ies])
Upgrade to 3.23.00.040 done (Bug 16019 - Check intranetcolorstylesheet for
blue.css)
{UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate column name
'letternumber'  at /usr/share/perl5/DBIx/Class/Schema.pm line 1118.
DBIx::Class::Schema::throw_exception(Koha::Schema=HASH(0x55991df77cb0),
"DBI Exception: DBD::mysql::db do failed: Duplicate column nam"...) called
at /usr/share/perl5/DBIx/Class/Storage.pm line 113
DBIx::Class::Storage::throw_exception(DBIx::Class::Storage::DBI::mysql=HASH(0x55992324bbb8),
"DBI Exception: DBD::mysql::db do failed: Duplicate column nam"...) called
at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1501
DBIx::Class::Storage::DBI::__ANON__("DBD::mysql::db do failed: Duplicate
column name 'letternumber'", DBI::db=HASH(0x559923714e48), undef) called at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 12105


Kindly suggest a solution for this issue.

Thank you


_______________________________________________

Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to