[Koha] Edit OPACBLOCK after upgrading to 21.11

Victor Barroso Oliveira vbovictor at gmail.com
Mon Jun 13 10:40:53 NZST 2022


Hello,

With your support I was able to reset the database of most instances. As
per the routine below. Thanks.

However, one of the instances presented a different error when restarting
the database.
Upgrade to 21.12.00.013  [19:25:20]: Bug 29605 - Resync DB structure for
existing installations
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry
'ar' for key 'PRIMARY' at /usr/share/koha/lib/C4/Installer.pm line 739
What would be the instruction to make the above error?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After updating to version 22.05 all bases present the installation screen
on koha.
When I update the database, I get the following error.
Upgrade to 21.12.00.048  [21:43:30]: Bug 30291 - Renaming recalls table
columns
ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Cannot drop
index 'borrowernumber': needed in a foreign key constraint at
/usr/share/koha/lib/C4/Installer.pm line 739

Solution

mysql >USE database;
mysql >SET foreign_key_checks = 0;
mysql > ALTER TABLE recalls CHANGE COLUMN borrowernumber patron_id int(11)
NOT NULL DEFAULT 0;

koha-upgrade-schema library
Upgrade to 21.12.00.048  [18:55:35]: Bug 30291 - Renaming recalls table
columns
Upgrade to 21.12.00.049  [18:55:35]: Bug 30563 - Add system preference
RequireCashRegister
Upgrade to 21.12.00.050  [18:55:35]: Bug 29924 - Add password expiration
        Added password_expiry_days to categories
        Added password_expiration_date field to borrowers
        Added password_expiration_date field to borrowers
Upgrade to 21.12.00.051  [18:55:35]: Bug 29925 - Add password reset option
Upgrade to 21.12.00.052  [18:55:35]: Bug 30290 - Modify AR notices, include
TOC line
        WARNING: If you have translated AR notices, please add TOC lines
yourself.
Upgrade to 21.12.00.053  [18:55:35]: Bug 30611 - Add STAFF_PASSWORD_RESET
notice
Upgrade to 21.12.00.054  [18:55:35]: Bug 23352 - Adding new column
'subscription.ccode'
Upgrade to 21.12.00.055  [18:55:35]: Bug 13412 - Add
GenerateAuthorityField667 and GenerateAuthorityField670 system preferences
Upgrade to 21.12.00.056  [18:55:35]: Bug 30728 - Allow opting out of
real-time holds queue updating possible
Upgrade to 21.12.00.057  [18:55:35]: Bug 30852 - Add index to
article_requests.debit_id
Upgrade to 22.05.00.000  [18:55:35]: Koha 22.05.00 release


Em sáb., 11 de jun. de 2022 às 14:15, Victor Barroso Oliveira <
vbovictor at gmail.com> escreveu:

> after running
> the following message appears
> ALTER TABLE recalls CHANGE COLUMN borrowernumber patron_id int(11) NOT
> NULL DEFAULT 0;
> ERROR 1553 (HY000): Cannot drop index 'borrowernumber': needed in a
> foreign key constraint
>
>
> Em sex., 10 de jun. de 2022 às 17:56, Fridolin SOMERS <
> fridolin.somers at biblibre.com> escreveu:
>
>> Hi,
>>
>> Sorry I cant see where the problem is.
>>
>> Please onpen a report on
>> https://bugs.koha-community.org/bugzilla3/enter_bug.cgi?product=Koha
>>
>> Best regards,
>>
>> Le 10/06/2022 à 00:31, Victor Barroso Oliveira a écrit :
>> > Ubuntu 20.04.4 LTS
>> > mysql  Ver 15.1 Distrib 10.4.14-MariaDB, for debian-linux-gnu (x86_64)
>> > using readline 5.2
>> >
>> > This command did not work in Mariadb
>> > $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN borrowernumber patron_id
>> > int(11) NOT NULL DEFAULT 0 });
>> >
>> > Em sex., 10 de jun. de 2022 às 04:01, Fridolin SOMERS
>> > <fridolin.somers at biblibre.com <mailto:fridolin.somers at biblibre.com>>
>> > escreveu:
>> >
>> >     Strange, the DBRev SQL looks OK :
>> >
>> >     $dbh->do(q{ ALTER TABLE recalls CHANGE COLUMN borrowernumber
>> patron_id
>> >     int(11) NOT NULL DEFAULT 0 });
>> >
>> >     What version of MySQL/MariaDB and OS ?
>> >
>> >     Le 09/06/2022 à 20:55, Fridolin SOMERS a écrit :
>> >      > Hi Victor, please always reply to the list ;)
>> >      >
>> >      > Le 09/06/2022 à 14:51, Victor Barroso Oliveira a écrit :
>> >      >>
>> >      >> After updating to version 22.05 all bases present the
>> installation
>> >      >> screen on koha.
>> >      >> When I update the database, I get the following error.
>> >      >> Upgrade to 21.12.00.048  [21:43:30]: Bug 30291 - Renaming
>> recalls
>> >      >> table columns
>> >      >> ERROR - {UNKNOWN}: DBI Exception: DBD::mysql::db do failed:
>> Cannot
>> >      >> drop index 'borrowernumber': needed in a foreign key constraint
>> at
>> >      >> /usr/share/koha/lib/C4/Installer.pm line 739
>> >      >>
>> >      >> how can i solve this?
>> >      >>
>> >      >> Em qui., 9 de jun. de 2022 às 18:02, Fridolin SOMERS
>> >      >> <fridolin.somers at biblibre.com
>> >     <mailto:fridolin.somers at biblibre.com>
>> >     <mailto:fridolin.somers at biblibre.com
>> >     <mailto:fridolin.somers at biblibre.com>>>
>> >      >> escreveu:
>> >      >>
>> >      >>     Hi,
>> >      >>
>> >      >>     You mean OpacMainUserBlock, changed by :
>> >      >> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23794
>> >     <https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23794>
>> >      >>
>> >     <https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23794
>> >     <https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23794>>
>> >      >>     Convert OpacMainUserBlock system preference to news block
>> >      >>
>> >      >>     See the manual :
>> >      >>
>> >      >>
>> >
>> https://koha-community.org/manual/21.11/en/html/tools.html#html-customizations
>> >     <
>> https://koha-community.org/manual/21.11/en/html/tools.html#html-customizations
>> >
>> >
>> >      >>
>> >      >>
>> >      >>
>> >     <
>> https://koha-community.org/manual/21.11/en/html/tools.html#html-customizations
>> >     <
>> https://koha-community.org/manual/21.11/en/html/tools.html#html-customizations
>> >>
>> >
>> >      >>
>> >      >>
>> >      >>     Best regards,
>> >      >>
>> >      >>     Le 09/06/2022 à 02:09, Victor Barroso Oliveira a écrit :
>> >      >>      > Good Morning,
>> >      >>      > I'm not able to edit OPACBLOCK after upgrading to 21.11
>> >      >>      > What would be the procedure to edit the block again?
>> >      >>      > Thanks,
>> >      >>      > _______________________________________________
>> >      >>      >
>> >      >>      > Koha mailing list http://koha-community.org
>> >     <http://koha-community.org>
>> >      >>     <http://koha-community.org <http://koha-community.org>>
>> >      >>      > Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
>> >     <mailto:Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>>
>> >      >>      > Unsubscribe:
>> >     https://lists.katipo.co.nz/mailman/listinfo/koha
>> >     <https://lists.katipo.co.nz/mailman/listinfo/koha>
>> >      >>     <https://lists.katipo.co.nz/mailman/listinfo/koha
>> >     <https://lists.katipo.co.nz/mailman/listinfo/koha>>
>> >      >>
>> >      >>     --     Fridolin SOMERS <fridolin.somers at biblibre.com
>> >     <mailto:fridolin.somers at biblibre.com>
>> >      >>     <mailto:fridolin.somers at biblibre.com
>> >     <mailto:fridolin.somers at biblibre.com>>>
>> >      >>     Software and system maintainer 🦄
>> >      >>     BibLibre, France
>> >      >>     _______________________________________________
>> >      >>
>> >      >>     Koha mailing list http://koha-community.org
>> >     <http://koha-community.org>
>> >      >> <http://koha-community.org <http://koha-community.org>>
>> >      >> Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
>> >     <mailto:Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>>
>> >      >>     Unsubscribe:
>> >     https://lists.katipo.co.nz/mailman/listinfo/koha
>> >     <https://lists.katipo.co.nz/mailman/listinfo/koha>
>> >      >>     <https://lists.katipo.co.nz/mailman/listinfo/koha
>> >     <https://lists.katipo.co.nz/mailman/listinfo/koha>>
>> >      >>
>> >      >
>> >
>> >     --
>> >     Fridolin SOMERS <fridolin.somers at biblibre.com
>> >     <mailto:fridolin.somers at biblibre.com>>
>> >     Software and system maintainer 🦄
>> >     BibLibre, France
>> >     _______________________________________________
>> >
>> >     Koha mailing list http://koha-community.org <
>> http://koha-community.org>
>> >     Koha at lists.katipo.co.nz <mailto:Koha at lists.katipo.co.nz>
>> >     Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>> >     <https://lists.katipo.co.nz/mailman/listinfo/koha>
>> >
>>
>> --
>> Fridolin SOMERS <fridolin.somers at biblibre.com>
>> Software and system maintainer 🦄
>> BibLibre, France
>>
>


More information about the Koha mailing list