From ccc218b04dee67ca11a7b2a177c76799e397844e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 8 Apr 2022 09:19:31 +0000 Subject: [PATCH] Bug 30498: Fix enum search_field.type Resolves sync issue with upgrades. Test plan: Run dbrev. Signed-off-by: Marcel de Rooy Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall --- installer/data/mysql/atomicupdate/bug_30498.pl | 11 +++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_30498.pl diff --git a/installer/data/mysql/atomicupdate/bug_30498.pl b/installer/data/mysql/atomicupdate/bug_30498.pl new file mode 100755 index 0000000000..dda43930f6 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30498.pl @@ -0,0 +1,11 @@ +use Modern::Perl; + +return { + bug_number => 30498, + description => "Correct enum search_field.type", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do( q|ALTER TABLE search_field MODIFY COLUMN `type` enum('','string','date','number','boolean','sum','isbn','stdno','year') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine'| ); + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 43c004cec9..597f1a2edf 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4476,7 +4476,7 @@ CREATE TABLE `search_field` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'the name of the field as it will be stored in the search engine', `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'the human readable name of the field, for display', - `type` enum('','string','date','number','boolean','sum','isbn','stdno') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine', + `type` enum('','string','date','number','boolean','sum','isbn','stdno','year') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine', `weight` decimal(5,2) DEFAULT NULL, `facet_order` tinyint(4) DEFAULT NULL COMMENT 'the order place of the field in facet list if faceted', `staff_client` tinyint(1) NOT NULL DEFAULT 1, -- 2.39.5