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 (+19 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
};
19
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 4289-4294 CREATE TABLE `messages` ( Link Here
4289
  `message` mediumtext NOT NULL COMMENT 'the text of the message',
4289
  `message` mediumtext NOT NULL COMMENT 'the text of the message',
4290
  `message_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the date and time the message was written',
4290
  `message_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'the date and time the message was written',
4291
  `manager_id` int(11) DEFAULT NULL COMMENT 'creator of message',
4291
  `manager_id` int(11) DEFAULT NULL COMMENT 'creator of message',
4292
  `patron_read_date` timestamp NULL DEFAULT NULL COMMENT 'the date and time the patron dismissed the message',
4292
  PRIMARY KEY (`message_id`),
4293
  PRIMARY KEY (`message_id`),
4293
  KEY `messages_ibfk_1` (`manager_id`),
4294
  KEY `messages_ibfk_1` (`manager_id`),
4294
  KEY `messages_borrowernumber` (`borrowernumber`),
4295
  KEY `messages_borrowernumber` (`borrowernumber`),
4295
- 

Return to bug 12029