[Koha] Further adventures with Koha update to 16.xxx

Jonathan Druart jonathan.druart at bugs.koha-community.org
Tue Jan 17 00:14:24 NZDT 2017


Hi David,

You have several errors, some are "expected", some are not.

1/ DBD::mysql::db do failed: Duplicate column name 'updated_on'

=> It's a bug, I have proposed a patch on bug 17234 to avoid that in the future.

You can ignore it. The columns borrowers.updated_on and
deletedborowers.updated_on already existed in your DB

The installer process should not have tried to create them again.

2/ The other ones are weird, and I do not understand how you got them
a. The table 'refund_lost_item_fee_rules' has been added by 16.06.00.006
(bug 14048) and is not replayed anywhere else.
b. The table 'authorised_value_categories' has been added by 16.06.00.033
(bug 17216) and is not replayed anywhere else.

The other ones seems to have the same causes.

If you came from 16.05.05.000 those tables should not exist.
However your DBMS raises "The table already exists" when it tries to create
it.
I guess you did something wrong at some point.

Note that this one:
  DBD::mysql::db do failed: Cannot add or update a child row: a foreign key
constraint fails (`koha_koha16`.`#sql-38c_3e`, CONSTRAINT
`authorised_values_authorised_values_category` FOREIGN KEY (`category`)
REFERENCES `authorised_value_categories` (`category_name`) ON DELETE
CASCADE ON
should not be ignored, it failed to create the constraint.
I could help you to understand what is wrong, bug you need to get rid of
the other errors first, to make sure it's not related.

Regards,
Jonathan

On Sun, 15 Jan 2017 at 05:03 David Whelchel <dlwhelchel at outlook.com> wrote:

> Hi all,
>
> It has been several weeks down the road, listing to good music, since my
> last post and I have made progress in moving from the old Koha Version
> 16.05.05.000 on Debian 3.2.84-1 x86_64 to Koha 16.11.01 on Debian GNU/Linux
> 8.6 (jessie), with a quick pass through Koha 16.05.07 on jessie to see if
> it would correct the errors listed below. No luck, when trying to update to
> 16.11.01 from either 16.05.05 or 16.05.07 I receive these errors below when
> going through the Web Installer- Step 3  (Updating database structure).
> Obviously the 16.0.05 is on a much older code base and OS but the 16.05.07
> (no errors here - and I can complete the update and have a functioning
> system) and the 16.11.01 are on fresh installs of Debian 8.6 and the Koha
> Common Debian package with an import of the original production database.
>
> My questions -
>
>
>   1.  are these errors to be expected?
>   2.  Can some of them be ignored?
>   3.  If the error cannot be ignored what is the proper path to move on
> from here? I am hesitant to make any manual changes to the underlying
> database as I do not know what down the road implications there might be.
>
> Thanks - sorry for the long list of errors but that is what is in red at
> this step in the process - but I feel that I am almost there.
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Duplicate column name 'updated_on' [for Statement "
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ALTER TABLE borrowers
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ADD COLUMN updated_on
> timestamp NULL DEFAULT CURRENT_TIMESTAMP
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ON UPDATE CURRENT_TIMESTAMP
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: AFTER
> privacy_guarantor_checkouts;
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: "] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 12626.
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Duplicate column name 'updated_on' [for Statement "
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ALTER TABLE deletedborrowers
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ADD COLUMN updated_on
> timestamp NULL DEFAULT CURRENT_TIMESTAMP
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ON UPDATE CURRENT_TIMESTAMP
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: AFTER
> privacy_guarantor_checkouts;
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: "] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 12632.
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Table 'refund_lost_item_fee_rules' already exists [for Statement "
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: CREATE TABLE
> `refund_lost_item_fee_rules` (
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: `branchcode` varchar(10)
> NOT NULL default '',
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: `refund` tinyint(1) NOT
> NULL default 0,
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: PRIMARY KEY (`branchcode`)
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: ) ENGINE=InnoDB DEFAULT
> CHARSET=utf8 COLLATE=utf8_unicode_ci;
> [Sat Jan 14 19:26:46 2017] updatedatabase.pl: "] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 12691.
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Table 'authorised_value_categories' already exists [for Statement "
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: CREATE TABLE
> authorised_value_categories (
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: category_name VARCHAR(32)
> NOT NULL,
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: primary key (category_name)
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: ) ENGINE=InnoDB DEFAULT
> CHARSET=utf8 COLLATE=utf8_unicode_ci;
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: "] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 13100.
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Duplicate entry 'BOR_NOTES' for key 'PRIMARY' [for Statement "
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: INSERT INTO
> authorised_value_categories (category_name )
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: SELECT DISTINCT category
> FROM authorised_values;
> [Sat Jan 14 19:27:36 2017] updatedatabase.pl: "] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 13107.
> [Sat Jan 14 19:27:37 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Cannot add or update a child row: a foreign key constraint fails
> (`koha_koha16`.`#sql-38c_3e`, CONSTRAINT
> `authorised_values_authorised_values_category` FOREIGN KEY (`category`)
> REFERENCES `authorised_value_categories` (`category_name`) ON DELETE
> CASCADE ON ) [for Statement "
> [Sat Jan 14 19:27:37 2017] updatedatabase.pl: ALTER TABLE
> authorised_values
> [Sat Jan 14 19:27:37 2017] updatedatabase.pl: ADD CONSTRAINT
> `authorised_values_authorised_values_category` FOREIGN KEY (`category`)
> REFERENCES `authorised_value_categories` (`category_name`) ON DELETE
> CASCADE ON UPDATE CASCADE;
> [Sat Jan 14 19:27:37 2017] updatedatabase.pl: "] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 13162.
> [Sat Jan 14 19:29:05 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Can't DROP 'isbn'; check that column/key exists [for Statement "ALTER TABLE
> biblioitems DROP INDEX isbn"] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 13684.
> [Sat Jan 14 19:29:05 2017] updatedatabase.pl: DBD::mysql::db do failed:
> Can't DROP 'issn'; check that column/key exists [for Statement "ALTER TABLE
> biblioitems DROP INDEX issn"] at
> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
> line 13685.
>
> --Dave
>
> -------------------------------------------------------------------------------
> David L. Whelchel
> 725 SE Derby Street
> Pullman, WA 99163
> whelchel at pullman.com<mailto:whelchel at pullman.com>
>
> http://www.dlwa.com
>
>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list