Index: openacs-4/packages/mail-tracking/sql/postgresql/mail-tracking-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/sql/postgresql/mail-tracking-create.sql,v diff -u -r1.7.2.2 -r1.7.2.3 --- openacs-4/packages/mail-tracking/sql/postgresql/mail-tracking-create.sql 8 Jun 2006 15:58:53 -0000 1.7.2.2 +++ openacs-4/packages/mail-tracking/sql/postgresql/mail-tracking-create.sql 23 Jun 2006 05:35:28 -0000 1.7.2.3 @@ -40,6 +40,7 @@ create index acs_mail_log_object_idx on acs_mail_log(object_id); create index acs_mail_log_sender_idx on acs_mail_log(sender_id); +-- recipient_mapping_table create table acs_mail_log_recipient_map ( recipient_id integer constraint acs_mail_log_recipient_id_fk @@ -50,6 +51,16 @@ type varchar(30) ); +-- file_mapping_table +create table acs_mail_log_attachment_map ( + log_id integer + constraint acs_mail_log_log_id2_fk + references acs_mail_log(log_id), + file_id integer + constraint acs_mail_log_file_id_fk + references cr_items(item_id) +); + create index acs_mail_log_recipient_map_log_idx on acs_mail_log_recipient_map(log_id); create index acs_mail_log_recipient_map_recipient_idx on acs_mail_log_recipient_map(recipient_id); create index acs_mail_log_um_log_rec_idx on acs_mail_log_recipient_map(log_id,recipient_id,type); @@ -87,8 +98,15 @@ v_log_id acs_mail_log.log_id%TYPE; begin v_log_id := acs_object__new ( - p_log_id, -- object_id - ''mail_log'' -- object_type + p_log_id, + ''mail_log'', + now(), + p_creation_user, + p_creation_ip, + p_context_id, + ''t'', + null, + p__package_id ); insert into acs_mail_log Index: openacs-4/packages/mail-tracking/tcl/mail-tracking-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/mail-tracking/tcl/mail-tracking-procs.tcl,v diff -u -r1.5.2.2 -r1.5.2.3 --- openacs-4/packages/mail-tracking/tcl/mail-tracking-procs.tcl 8 Jun 2006 15:58:54 -0000 1.5.2.2 +++ openacs-4/packages/mail-tracking/tcl/mail-tracking-procs.tcl 23 Jun 2006 05:35:28 -0000 1.5.2.3 @@ -61,7 +61,7 @@ set object_id $context_id } - + set log_id [db_nextval "acs_object_id_seq"] # First create the message entry set log_id [db_exec_plsql insert_log_entry {select acs_mail_log__new ( :log_id,