@@ -, +, @@ --- Koha/Schema/Result/MessageQueue.pm | 23 +++++++++++++---------- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 3 ++- 3 files changed, 16 insertions(+), 11 deletions(-) --- a/Koha/Schema/Result/MessageQueue.pm +++ a/Koha/Schema/Result/MessageQueue.pm @@ -1,21 +1,17 @@ -use utf8; package Koha::Schema::Result::MessageQueue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE -=head1 NAME - -Koha::Schema::Result::MessageQueue - -=cut - use strict; use warnings; use base 'DBIx::Class::Core'; -=head1 TABLE: C + +=head1 NAME + +Koha::Schema::Result::MessageQueue =cut @@ -82,6 +78,11 @@ __PACKAGE__->table("message_queue"); data_type: 'mediumtext' is_nullable: 1 +=head2 sentto_address + + data_type: 'mediumtext' + is_nullable: 1 + =head2 from_address data_type: 'mediumtext' @@ -125,6 +126,8 @@ __PACKAGE__->add_columns( }, "to_address", { data_type => "mediumtext", is_nullable => 1 }, + "sentto_address", + { data_type => "mediumtext", is_nullable => 1 }, "from_address", { data_type => "mediumtext", is_nullable => 1 }, "content_type", @@ -169,8 +172,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+gmGYPCtwCYKHAzfd9xByQ +# Created by DBIx::Class::Schema::Loader v0.07010 @ 2014-03-06 17:18:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OaACpykpEpfqrUXXZxNWSQ # You can replace this text with custom content, and it will be preserved on regeneration --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -2524,6 +2524,7 @@ CREATE TABLE `message_queue` ( `status` enum('sent','pending','failed','deleted') NOT NULL default 'pending', `time_queued` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `to_address` mediumtext, + `sentto_address` mediumtext, `from_address` mediumtext, `content_type` text, KEY `message_id` (`message_id`), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -8015,7 +8015,8 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { $DBversion = "3.15.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SendAllEmailsTo','',NULL,'This email will replace the To address in every message sent by the system. This is meant to help testing and validation only.','Textarea')"); - print "Upgrade to $DBversion done (Bug 8000 - system preferences to override the destination of every email sent by the system.)\n"; + $dbh->do( qw{ ALTER TABLE message_queue ADD sentto_address mediumtext AFTER to_address } ); + print "Upgrade to $DBversion done (Bug 8000 - add method to override the destination of every email sent by the system.)\n"; SetVersion ($DBversion); } --