Problem with the Koha Upgradation
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 -- ***With Regards*** Shivakumara RM Digital Library Analyst Institute for Social and Economic Change Dr. VKRV Rao Road, Nagarabhavi, Bangalore - 560 072 <https://sites.google.com/site/shivakumararm/>
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
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
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@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@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
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@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@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@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Hi Shiva, be careful, commenting out is not always the correct solution. In this case it tries to create the new table for circulation rules that you will need for Koha to function properly later. You'll have to look into the error "Foreign key constraint is incorrectly formed". If you don't know much about databases this might be difficult to resolve without some outside help. Katrin On 14.03.22 08:22, Shiva Kumara 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 <http://updatedatabase.pl> line 16489
if I again commented the line 16489 "*unless (TableExists('circulation_rules')){*" in updatedatabase.pl <http://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 <http://updatedatabase.pl> line 16527, at end of line syntax error at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl <http://updatedatabase.pl> line 16527, near "}" Execution of /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl <http://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@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 <http://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 <http://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@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
participants (4)
-
Katrin Fischer -
Mark Alexander -
Pattabhi RK -
Shiva Kumara