Summary: | Error message when upgrading from 23.05 to 23.11 | ||
---|---|---|---|
Product: | Koha | Reporter: | Victor Zuniga <vctrzuniga> |
Component: | Installation and upgrade (web-based installer) | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P5 - low | CC: | emmi.takkinen, gmcharlt |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
Victor Zuniga
2023-12-12 05:58:33 UTC
Quick clarification: We were trying to upgrade from Koha 23.06.00.006 to 23.11.00.000. This is what I get when I try to modify the datatype for the publishercode column, per Bugzilla ticket #34029: mysql> ALTER TABLE biblioitems MODIFY publishercode text; ERROR 1170 (42000): BLOB/TEXT column 'publishercode' used in key specification without a key length Have you checked indexes for these tables? You can see them by typing "show create table biblioitems;". My guess is that there is a line >"KEY `publishercode` (`publishercode`)" there which should be something like >"KEY `publishercode` (`publishercode`(191))" Hi Emmi, Thanks for the help! Yes, the line was showing as you mentioned. I solved the issue by running the following commands: ALTER TABLE biblioitems drop key publishercode, add key publishercode (publishercode (191)); ALTER TABLE deletedbiblioitems drop key publishercode, add key publishercode (publishercode (191)); However, now I am getting a new error message: Upgrade to 23.06.00.013 [00:36:57]: Bug 28966 - Holds queue view too slow to load for large numbers of holds ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column 'itemnumber': used in a foreign key constraint 'tmp_holdsqueue_ibfk_1' at /usr/share/koha/lib/C4/Installer.pm line 741 When I run the "show create table tmp_holdsqueue", this is what I get: ============ mysql> show create table tmp_holdsqueue; +----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tmp_holdsqueue | CREATE TABLE `tmp_holdsqueue` ( `biblionumber` int DEFAULT NULL, `itemnumber` int DEFAULT NULL, `barcode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `surname` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `firstname` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `phone` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `borrowernumber` int NOT NULL, `cardnumber` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `reservedate` date DEFAULT NULL, `title` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `itemcallnumber` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `holdingbranch` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pickbranch` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `notes` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `item_level_request` tinyint NOT NULL DEFAULT '0', `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, KEY `tmp_holdsqueue_ibfk_1` (`itemnumber`), KEY `tmp_holdsqueue_ibfk_2` (`biblionumber`), KEY `tmp_holdsqueue_ibfk_3` (`borrowernumber`), CONSTRAINT `tmp_holdsqueue_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tmp_holdsqueue_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `tmp_holdsqueue_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci | +----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> ============= Hi, this problem should be fixed in 23.11.01, I pushed a fix to master yesterday, see bug 34516. *** This bug has been marked as a duplicate of bug 34516 *** Hi Katrin, I ran the update and upgrade commands again this morning. Here is the output I am getting: ====== Setting up koha-common (23.11.00-1) ... Installing new version of config file /etc/koha/apache-shared-intranet-plack.conf ... Installing new version of config file /etc/koha/apache-shared-intranet.conf ... Installing new version of config file /etc/koha/apache-site-https.conf.in ... Installing new version of config file /etc/koha/koha-conf-site.xml.in ... Installing new version of config file /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml ... Installing new version of config file /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl ... Upgrading database schema for catalog Upgrade to 23.06.00.013 [10:26:04]: Bug 28966 - Holds queue view too slow to load for large numbers of holds ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot change column 'itemnumber': used in a foreign key constraint 'tmp_holdsqueue_ibfk_1' at /usr/share/koha/lib/C4/Installer.pm line 741 dpkg: error processing package koha-common (--configure): installed koha-common package post-installation script subprocess returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1) ====== (In reply to Katrin Fischer from comment #5) > Hi, this problem should be fixed in 23.11.01, I pushed a fix to master > yesterday, see bug 34516. > > *** This bug has been marked as a duplicate of bug 34516 *** Thanks Katrin! Since this is a separate issue, I'll start a new ticket for it (Ticket #35552). Victor |