From a537e57909a71d99f035030c4ab095aa71bedf2b Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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 Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../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 0000000000..160ae40e77 --- /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 eec19c087b..ad14050de7 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1132,7 +1132,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, @@ -2531,7 +2531,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.39.5