From 4bd5d0f0bf5e7ace0636967ec65a05ecbc13316f Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 17 Feb 2022 20:37:13 -1000 Subject: [PATCH] Bug 30128: Change language_subtag_registry.description to varchar(255) In database, language_descriptions.description is VARCHAR(255). language_subtag_registry.description is VARCH(25), it should have same size. You can see in https://www.loc.gov/standards/iso639-2/php/code_list.php there is for example 'South American Indian languages' Test plan : 1) Run atomic update 2) Check language_subtag_registry.description is now varchar(255) Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- installer/data/mysql/atomicupdate/bug_30128.pl | 14 ++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_30128.pl diff --git a/installer/data/mysql/atomicupdate/bug_30128.pl b/installer/data/mysql/atomicupdate/bug_30128.pl new file mode 100755 index 0000000000..2b6b38b993 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30128.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "30128", + description => "Change language_subtag_registry.description to varchar(255)", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + $dbh->do(q{ + ALTER TABLE `language_subtag_registry` MODIFY COLUMN `description` VARCHAR(255) DEFAULT NULL + }); + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 34a6a9665d..ab2c3c7a66 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3277,7 +3277,7 @@ DROP TABLE IF EXISTS `language_subtag_registry`; CREATE TABLE `language_subtag_registry` ( `subtag` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `type` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'language-script-region-variant-extension-privateuse', - `description` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'only one of the possible descriptions for ease of reference, see language_descriptions for the complete list', + `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'only one of the possible descriptions for ease of reference, see language_descriptions for the complete list', `added` date DEFAULT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`), -- 2.39.5