5 description => "Add letter id to the message queue table",
8 my ($dbh, $out) = @$args{qw(dbh out)};
9 unless ( column_exists( 'message_queue', 'letter_id' ) ) {
11 ALTER TABLE message_queue
12 ADD COLUMN `letter_id` int(11) DEFAULT NULL COMMENT 'Foreign key to the letters table' AFTER message_id,
13 ADD CONSTRAINT letter_fk FOREIGN KEY (letter_id) REFERENCES letter(id) ON DELETE SET NULL ON UPDATE CASCADE
16 say $out "Added column 'message_queue.letter_id'";