View | Details | Raw Unified | Return to bug 12029
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_12029_-_add_messages.patron_read_date_column.pl (+18 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "12029",
5
    description => "Enable users to dismiss their patron messages",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'messages', 'patron_read_date' ) ) {
11
          $dbh->do(q{
12
              ALTER TABLE messages ADD COLUMN `patron_read_date` timestamp NULL DEFAULT NULL AFTER `manager_id`
13
          });
14
15
          say $out "Added column 'messages.patron_read_date'";
16
        }
17
    },
18
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 4293-4298 CREATE TABLE `messages` ( Link Here
4293
  `message` mediumtext NOT NULL COMMENT 'the text of the message',
4293
  `message` mediumtext NOT NULL COMMENT 'the text of the message',
4294
  `message_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the date and time the message was written',
4294
  `message_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the date and time the message was written',
4295
  `manager_id` int(11) DEFAULT NULL COMMENT 'creator of message',
4295
  `manager_id` int(11) DEFAULT NULL COMMENT 'creator of message',
4296
  `patron_read_date` timestamp NULL DEFAULT NULL COMMENT 'the date and time the patron dismissed the message',
4296
  PRIMARY KEY (`message_id`),
4297
  PRIMARY KEY (`message_id`),
4297
  KEY `messages_ibfk_1` (`manager_id`),
4298
  KEY `messages_ibfk_1` (`manager_id`),
4298
  KEY `messages_borrowernumber` (`borrowernumber`),
4299
  KEY `messages_borrowernumber` (`borrowernumber`),
4299
- 

Return to bug 12029