From ddd17d442259251d51788f9127227be6451ef615 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 21 Dec 2023 15:57:41 +0000 Subject: [PATCH] Bug 32435: Add status to ticket_updates table --- .../data/mysql/atomicupdate/bug_32435.pl | 21 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 22 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_32435.pl diff --git a/installer/data/mysql/atomicupdate/bug_32435.pl b/installer/data/mysql/atomicupdate/bug_32435.pl new file mode 100644 index 00000000000..e9591b5e67c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_32435.pl @@ -0,0 +1,21 @@ +use Modern::Perl; + +return { + bug_number => "32435", + description => "Add resolution types to catalog concerns", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + unless( column_exists('aqbooksellers','type') ){ + $dbh->do(q{ + ALTER TABLE ticket_updates ADD COLUMN status varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update' AFTER message + }); + + say $out "Added column 'ticket_updates.status'"; + } + $dbh->do(q{ + INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('TICKET_RESOLUTION', 1); + }); + say $out "Added TICKET_RESOLUTION authorised value category"; + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0b59ad8d85c..007f92719bc 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -6270,6 +6270,7 @@ CREATE TABLE `ticket_updates` ( `public` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'boolean flag to denote whether this update is public', `date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this update was logged', `message` text NOT NULL COMMENT 'update message content', + `status` varchar(80) DEFAULT NULL COMMENT 'status of ticket at this update', PRIMARY KEY (`id`), KEY `ticket_updates_ibfk_1` (`ticket_id`), KEY `ticket_updates_ibfk_2` (`user_id`), -- 2.43.0