@@ -, +, @@ --- ...9_-_add_messages.patron_read_date_column.pl | 18 ++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 19 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_12029_-_add_messages.patron_read_date_column.pl --- a/installer/data/mysql/atomicupdate/bug_12029_-_add_messages.patron_read_date_column.pl +++ a/installer/data/mysql/atomicupdate/bug_12029_-_add_messages.patron_read_date_column.pl @@ -0,0 +1,18 @@ +use Modern::Perl; + +return { + bug_number => "12029", + description => "Enable users to dismiss their patron messages", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + if( !column_exists( 'messages', 'patron_read_date' ) ) { + $dbh->do(q{ + ALTER TABLE messages ADD COLUMN `patron_read_date` timestamp NULL DEFAULT NULL AFTER `manager_id` + }); + + say $out "Added column 'messages.patron_read_date'"; + } + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -4293,6 +4293,7 @@ CREATE TABLE `messages` ( `message` mediumtext NOT NULL COMMENT 'the text of the message', `message_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the date and time the message was written', `manager_id` int(11) DEFAULT NULL COMMENT 'creator of message', + `patron_read_date` timestamp NULL DEFAULT NULL COMMENT 'the date and time the patron dismissed the message', PRIMARY KEY (`message_id`), KEY `messages_ibfk_1` (`manager_id`), KEY `messages_borrowernumber` (`borrowernumber`), --