Bugzilla – Attachment 127051 Details for
Bug 29336
Some authorised_value FKs are too short
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29336: Identify the fields with wrong length (or name) first
Bug-29336-Identify-the-fields-with-wrong-length-or.patch (text/plain), 5.40 KB, created by
Marcel de Rooy
on 2021-10-28 12:25:33 UTC
(
hide
)
Description:
Bug 29336: Identify the fields with wrong length (or name) first
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-10-28 12:25:33 UTC
Size:
5.40 KB
patch
obsolete
>From 6b8fb83867dbfb3b7c8a9e8f22e18837a3ed78eb Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >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 <m.de.rooy@rijksmuseum.nl> >--- > 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 48e5370448..645495f0d7 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 >@@ -3450,7 +3450,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, >@@ -3484,7 +3484,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
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 29336
:
127051
|
127052
|
127053
|
127169
|
127170
|
127171
|
127172
|
128655
|
128656
|
129187
|
129188
|
129189