Bugzilla – Attachment 159375 Details for
Bug 34516
Upgrade database fails for 22.11.07.003, points to web installer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34516: Upgrade database fails for 22.11.07.003, points to web installer
Bug-34516-Upgrade-database-fails-for-221107003-poi.patch (text/plain), 3.11 KB, created by
Emily Lamancusa (emlam)
on 2023-11-29 21:12:38 UTC
(
hide
)
Description:
Bug 34516: Upgrade database fails for 22.11.07.003, points to web installer
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2023-11-29 21:12:38 UTC
Size:
3.11 KB
patch
obsolete
>From e76b11436c066baed38d7739976f7a114000408d Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Mon, 27 Nov 2023 09:40:55 +0100 >Subject: [PATCH] Bug 34516: Upgrade database fails for 22.11.07.003, points to > web installer > >MySQL requires key length for indexes of text columns, while MariaDB >sets it automatically for utf8mb4. > >Test plan: >1. Setup Koha to use MySQL (e.g. ku-my8) >2. Downgrade database with the following commands (e.g. koha-mysql > kohadev): > ALTER TABLE `biblioitems` MODIFY COLUMN `publishercode` varchar(255); > ALTER TABLE `biblioitems` DROP INDEX `publishercode`; > ALTER TABLE `biblioitems` ADD INDEX `publishercode` (`publishercode`); > ALTER TABLE `deletedbiblioitems` MODIFY COLUMN `publishercode` varchar(255); > ALTER TABLE `deletedbiblioitems` DROP INDEX `publishercode`; > ALTER TABLE `deletedbiblioitems` ADD INDEX `publishercode` (`publishercode`); > UPDATE systempreferences SET value="23.0600006" WHERE variable = "Version"; >3. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev) >4. Notice the error about "key specification without a key length" >5. Apply patch >6. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev) >7. Notice that the database is upgraded >8. Sign off > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > installer/data/mysql/db_revs/230600007.pl | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > >diff --git a/installer/data/mysql/db_revs/230600007.pl b/installer/data/mysql/db_revs/230600007.pl >index 92b0736cbb..fb4b1f43dd 100755 >--- a/installer/data/mysql/db_revs/230600007.pl >+++ b/installer/data/mysql/db_revs/230600007.pl >@@ -17,16 +17,36 @@ return { > }); > say $out "Updated deletedbiblioitems.place to text"; > >+ $dbh->do(q{ >+ ALTER TABLE `biblioitems` >+ DROP INDEX `publishercode` >+ }); >+ say $out "Remove index on biblioitems.publishercode"; > $dbh->do(q{ > ALTER TABLE `biblioitems` > MODIFY COLUMN `publishercode` text DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)' > }); > say $out "Updated biblioitems.publishercode to text"; >+ $dbh->do(q{ >+ ALTER TABLE `biblioitems` >+ ADD INDEX `publishercode` (`publishercode`(191)) >+ }); >+ say $out "Create index on biblioitems.publishercode"; >+ $dbh->do(q{ >+ ALTER TABLE `deletedbiblioitems` >+ DROP INDEX `publishercode` >+ }); >+ say $out "Remove index on deletedbiblioitems.publishercode"; > $dbh->do(q{ > ALTER TABLE `deletedbiblioitems` > MODIFY COLUMN `publishercode` text DEFAULT NULL COMMENT 'publisher (MARC21 260$b and 264$b)' > }); > say $out "Updated deletedbiblioitems.publishercode to text"; >+ $dbh->do(q{ >+ ALTER TABLE `deletedbiblioitems` >+ ADD INDEX `publishercode` (`publishercode`(191)) >+ }); >+ say $out "Create index on deletedbiblioitems.publishercode"; > > $dbh->do(q{ > ALTER TABLE `biblioitems` >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34516
:
159259
|
159260
|
159339
| 159375