From ce30f5f3a29a83088888739d8a55da594810a766 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 19 Jan 2024 14:19:32 +0000 Subject: [PATCH] Bug 30047: DB Updates Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- .../data/mysql/atomicupdate/bug_30047.pl | 20 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 21 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_30047.pl diff --git a/installer/data/mysql/atomicupdate/bug_30047.pl b/installer/data/mysql/atomicupdate/bug_30047.pl new file mode 100755 index 0000000000..7f2855afb8 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30047.pl @@ -0,0 +1,20 @@ +use Modern::Perl; + +return { + bug_number => "30047", + description => "Add thesaurus and heading fields to auth_header table", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + if ( !column_exists( 'auth_header', 'heading' ) ) { + $dbh->do( + q{ + ALTER TABLE auth_header ADD COLUMN `heading` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL AFTER `modification_time` + } + ); + say $out "Added column 'auth_header.heading'"; + } + + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 452103bfb3..51506b456a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -920,6 +920,7 @@ CREATE TABLE `auth_header` ( `authtypecode` varchar(10) NOT NULL DEFAULT '', `datecreated` date DEFAULT NULL, `modification_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `heading` longtext DEFAULT NULL, `origincode` varchar(20) DEFAULT NULL, `authtrees` longtext DEFAULT NULL, `marc` blob DEFAULT NULL, -- 2.39.5