[Koha] Upgrade errors
Katrin Fischer
katrin.fischer.83 at web.de
Fri Jan 17 09:17:48 NZDT 2025
Hi Tim,
I am wondering about the existance of this file:
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/atomicupdate/local_cover_images.pl
You should not have any files in the atomicupdate directory.
Could this be from a previous update? Have you checked the contents?
Katrin
On 14.01.25 22:35, Tim Young wrote:
> I forgot to add the results of searching for that key:
>
> +--------------------+-------------------+----------------------+--------------+--------------+-----------------+----------+
>
> | CONSTRAINT_CATALOG | CONSTRAINT_SCHEMA | CONSTRAINT_NAME |
> TABLE_SCHEMA | TABLE_NAME | CONSTRAINT_TYPE | ENFORCED |
> +--------------------+-------------------+----------------------+--------------+--------------+-----------------+----------+
>
> | def | koha_opac | bibliocoverimage_fk1 |
> koha_opac | cover_images | FOREIGN KEY | YES |
> +--------------------+-------------------+----------------------+--------------+--------------+-----------------+----------+
>
>
> It is used with a table called "cover_images"
>
> Hopefully that helps spark someone's memory and leads me to something.
>
> - Tim
>
> On 1/14/2025 3:19 PM, Tim Young wrote:
>> Well, it appears that the issue is with this file:
>>
>> /usr/share/koha/intranet/cgi-bin/installer/data/mysql/atomicupdate/local_cover_images.pl
>>
>>
>> When I manually try to run the sql "create table", I am getting:
>>
>> ERROR 1826 (HY000): Duplicate foreign key constraint name
>> 'bibliocoverimage_fk1'
>>
>> The create table causing this is:
>>
>> CREATE TABLE `biblioimages` (
>> -> `imagenumber` int(11) NOT NULL AUTO_INCREMENT,
>> -> `biblionumber` int(11) NOT NULL,
>> -> `mimetype` varchar(15) NOT NULL,
>> -> `imagefile` mediumblob NOT NULL,
>> -> `thumbnail` mediumblob NOT NULL,
>> -> PRIMARY KEY (`imagenumber`),
>> -> CONSTRAINT `bibliocoverimage_fk1` FOREIGN KEY
>> (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE
>> CASCADE ON UPDATE CASCADE
>> -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>>
>> If I look for a pre-existing constraint:
>>
>> select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where
>> CONSTRAINT_TYPE = 'FOREIGN KEY' and CONSTRAINT_NAME =
>> 'bibliocoverimage_fk1';
>>
>> I do see one there for my database.
>>
>> Any thoughts on how I should proceed?
>>
>> - Tim
>>
>>
>> On 1/7/2025 3:07 PM, Tim Young wrote:
>>> I was helping some people do-release-upgrade from Ubuntu 18.04, to
>>> 22.04 and their koha was updated as well.
>>>
>>> I believe the previous version was 21.05.05-3.
>>>
>>> We upgraded the OS on the machine to 20.04, then to 22.04, and then
>>> upgraded Koha to 24.11.00-1. During the package configuration
>>> (repeatable by doing: dpkg --configure koha-common) we get the
>>> following response and error:
>>>
>>> root at elearning:/var/log# dpkg --configure koha-common
>>> Setting up koha-common (24.11.00-1) ...
>>> Upgrading database schema for opac
>>> Can't use string ("0E0") as a HASH ref while "strict refs" in use at
>>> /usr/share/koha/lib/C4/Installer.pm line 757.
>>> dpkg: error processing package koha-common (--configure):
>>> installed koha-common package post-installation script subprocess
>>> returned error exit status 255
>>> Errors were encountered while processing:
>>> koha-common
>>>
>>>
>>> I tried looking through the log files to see if there was an
>>> "install log," but I did not see one. The code looks like it is
>>> applying individual updates schema, and one of them is failing. I am
>>> not sure how to figure out which one is failing, to then figure out
>>> why.
>>>
>> _______________________________________________
>>
>> Koha mailing list http://koha-community.org
>> Koha at lists.katipo.co.nz
>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> _______________________________________________
>
> Koha mailing list http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
More information about the Koha
mailing list