[Koha] Error upgrading Koha from version 18.06 to Koha 21.05

Admire Mutsikiwa amutsikiwa at uzlib.uz.ac.zw
Thu Sep 2 10:42:18 NZST 2021


Good day. I was trying to upgrade Koha from version 18.06 to 21.05 on
Ubuntu 20.05. I installed Ubuntu 20.04 and then installed Koha 20.05. I
then used the Koha 18.06 database dump to restore the Koha database after
dropping the Koha 20.05 database. On trying to do the database schema
upgrade, I am getting the following error:


The following error occurred while importing the database structure:

DBD::mysql::st execute failed: Referencing column 'message_transport_type'
and referenced column 'message_transport_type' in foreign key constraint
'borrower_message_transport_preferences_ibfk_2' are incompatible. at
/usr/share/perl5/DBIx/RunSQL.pm line 279, <$args{...}> line 1. Something
went wrong loading file
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/kohastructure.sql
([SQL ERROR]: CREATE TABLE `borrower_message_transport_preferences` (
`borrower_message_preference_id` int(11) NOT NULL DEFAULT 0,
`message_transport_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL
DEFAULT '0', PRIMARY KEY
(`borrower_message_preference_id`,`message_transport_type`), KEY
`message_transport_type` (`message_transport_type`), CONSTRAINT
`borrower_message_transport_preferences_ibfk_1` FOREIGN KEY
(`borrower_message_preference_id`) REFERENCES
`borrower_message_preferences` (`borrower_message_preference_id`) ON DELETE
CASCADE ON UPDATE CASCADE, CONSTRAINT
`borrower_message_transport_preferences_ibfk_2` FOREIGN KEY
(`message_transport_type`) REFERENCES `message_transport_types`
(`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE )
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ) at
/usr/share/koha/lib/C4/Installer.pm line 580.


Any pointers will be greatly appreciated.


Kind Regards,


More information about the Koha mailing list