From 0e246012971299ce4fde820047b39eaa4ef4b7cd Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 28 Oct 2021 11:45:39 +0000 Subject: [PATCH] Bug 29336: Identify the fields with wrong length (or name) first Content-Type: text/plain; charset=utf-8 This report will fix the bad lengths first. And mark the 'bad' names with a TODO for follow-up. Bad name means: refers to value, should be category. Scanning kohastructure.sql. Note: Bug 29347 has been opened to fix the names. Test plan: Search for another AV category field with length<>32. Bonus: Reinstall and check database. Signed-off-by: Marcel de Rooy --- installer/data/mysql/kohastructure.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e61c06592f..c27587bae1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -210,7 +210,7 @@ CREATE TABLE `additional_fields` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key identifier', `tablename` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'tablename of the new field', `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'name of the field', - `authorised_value_category` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'is an authorised value category', + `authorised_value_category` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'is an authorised value category', `marcfield` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'contains the marc field to copied into the record', `searchable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'is the field searchable?', PRIMARY KEY (`id`), @@ -824,7 +824,7 @@ CREATE TABLE `auth_subfield_structure` ( `repeatable` tinyint(4) NOT NULL DEFAULT 0, `mandatory` tinyint(4) NOT NULL DEFAULT 0, `tab` tinyint(1) DEFAULT NULL, - `authorised_value` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `authorised_value` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '#TODO This is a AV category!', `value_builder` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `seealso` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `isurl` tinyint(1) DEFAULT NULL, @@ -854,7 +854,7 @@ CREATE TABLE `auth_tag_structure` ( `libopac` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `repeatable` tinyint(4) NOT NULL DEFAULT 0, `mandatory` tinyint(4) NOT NULL DEFAULT 0, - `authorised_value` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `authorised_value` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '#TODO This is a AV category!', PRIMARY KEY (`authtypecode`,`tagfield`), CONSTRAINT `auth_tag_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; @@ -1868,7 +1868,7 @@ CREATE TABLE `club_template_enrollment_fields` ( `club_template_id` int(11) NOT NULL, `name` text COLLATE utf8mb4_unicode_ci NOT NULL, `description` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `authorised_value_category` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `authorised_value_category` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `club_template_id` (`club_template_id`), CONSTRAINT `club_template_enrollment_fields_ibfk_1` FOREIGN KEY (`club_template_id`) REFERENCES `club_templates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE @@ -1887,7 +1887,7 @@ CREATE TABLE `club_template_fields` ( `club_template_id` int(11) NOT NULL, `name` text COLLATE utf8mb4_unicode_ci NOT NULL, `description` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, - `authorised_value_category` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `authorised_value_category` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `club_template_id` (`club_template_id`), CONSTRAINT `club_template_fields_ibfk_1` FOREIGN KEY (`club_template_id`) REFERENCES `club_templates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE @@ -3467,7 +3467,7 @@ CREATE TABLE `marc_subfield_structure` ( `important` tinyint(4) NOT NULL DEFAULT 0, `kohafield` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `tab` tinyint(1) DEFAULT NULL, - `authorised_value` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `authorised_value` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '#TODO This is a AV category!', `authtypecode` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `value_builder` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `isurl` tinyint(1) DEFAULT NULL, @@ -3501,7 +3501,7 @@ CREATE TABLE `marc_tag_structure` ( `repeatable` tinyint(4) NOT NULL DEFAULT 0, `mandatory` tinyint(4) NOT NULL DEFAULT 0, `important` tinyint(4) NOT NULL DEFAULT 0, - `authorised_value` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `authorised_value` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '#TODO This is a AV category!', `ind1_defaultvalue` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `ind2_defaultvalue` varchar(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `frameworkcode` varchar(4) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', -- 2.20.1