Bugzilla – Attachment 150583 Details for
Bug 28328
Editing a record can cause an ISE if data too long for column
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28328: Extend biblioitems.lccn to longtext
Bug-28328-Extend-biblioitemslccn-to-longtext.patch (text/plain), 2.99 KB, created by
Jonathan Druart
on 2023-05-03 13:42:40 UTC
(
hide
)
Description:
Bug 28328: Extend biblioitems.lccn to longtext
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-03 13:42:40 UTC
Size:
2.99 KB
patch
obsolete
>From d96699aac91aab421fd44b17d97b42defaa17eca Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 May 2023 15:33:11 +0200 >Subject: [PATCH] Bug 28328: Extend biblioitems.lccn to longtext > >Same sa issn and isbn, we want lccn to allow longer values. > >Test plan: >Run the updatedatabase script to modify the DB structure >restart_all >Edit a bibliographic record and enter a long (more than 25 chars) lccn >Save >--- > .../data/mysql/atomicupdate/bug_28328.pl | 19 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ++-- > 2 files changed, 21 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_28328.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_28328.pl b/installer/data/mysql/atomicupdate/bug_28328.pl >new file mode 100755 >index 00000000000..160ae40e77c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_28328.pl >@@ -0,0 +1,19 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "28328", >+ description => "Extend biblioitems.lccn", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ # Do you stuffs here >+ $dbh->do(q{ >+ ALTER TABLE `biblioitems` >+ MODIFY COLUMN `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)' >+ }); >+ $dbh->do(q{ >+ ALTER TABLE `deletedbiblioitems` >+ MODIFY COLUMN `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)' >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 50796112dcf..640b938b7b8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1109,7 +1109,7 @@ CREATE TABLE `biblioitems` ( > `notes` longtext DEFAULT NULL, > `size` varchar(255) DEFAULT NULL COMMENT 'material size (MARC21 300$c)', > `place` varchar(255) DEFAULT NULL COMMENT 'publication place (MARC21 260$a)', >- `lccn` varchar(25) DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)', >+ `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)', > `url` mediumtext DEFAULT NULL COMMENT 'url (MARC21 856$u)', > `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source (MARC21 942$2)', > `cn_class` varchar(30) DEFAULT NULL, >@@ -2508,7 +2508,7 @@ CREATE TABLE `deletedbiblioitems` ( > `notes` longtext DEFAULT NULL, > `size` varchar(255) DEFAULT NULL COMMENT 'material size (MARC21 300$c)', > `place` varchar(255) DEFAULT NULL COMMENT 'publication place (MARC21 260$a)', >- `lccn` varchar(25) DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)', >+ `lccn` longtext DEFAULT NULL COMMENT 'library of congress control number (MARC21 010$a)', > `url` mediumtext DEFAULT NULL COMMENT 'url (MARC21 856$u)', > `cn_source` varchar(10) DEFAULT NULL COMMENT 'classification source (MARC21 942$2)', > `cn_class` varchar(30) DEFAULT NULL, >-- >2.25.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 28328
:
150583
|
150584
|
150585
|
150586
|
150587
|
150588
|
151020
|
151021
|
151022