Index: openacs-4/packages/dotlrn/sql/oracle/upgrade/upgrade-2.2.0d2-2.2.0d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/upgrade/upgrade-2.2.0d2-2.2.0d3.sql,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/packages/dotlrn/sql/oracle/upgrade/upgrade-2.2.0d2-2.2.0d3.sql	13 Mar 2006 16:08:10 -0000	1.1.2.2
+++ openacs-4/packages/dotlrn/sql/oracle/upgrade/upgrade-2.2.0d2-2.2.0d3.sql	29 Mar 2006 10:56:14 -0000	1.1.2.3
@@ -1,16 +1,28 @@
+-- Store emails to be sent when user joins a community
+create table dotlrn_member_emails (
+        email_id	integer primary key,
+        community_id    integer references dotlrn_communities_all (community_id)
+                        on delete cascade,
+-- Might be useful
+        type            varchar2(30) default 'on join',
+        from_addr       varchar2(256),
+        subject         varchar2(4000),
+        email           long,
+        enabled_p       char(1) default 'f'
+	                check (enabled_p in ('t', 'f')),
+			constraint dotlrn_member_emails_un unique(community_id, type)
+);
 
--- Create auxiliary tables
+create sequence dotlrn_member_emails_seq
+start with 1
+increment by 1
+nomaxvalue;
 
-create table apm_parameter_values_copy (
-	value_id	        integer,	
-	package_id		integer, 
-	parameter_id		integer, 
-	attr_value		varchar(4000)
-);
+create trigger dotlrn_member_emails_trigger
+before insert on dotlrn_member_emails
+for each row
+begin
+	select dotlrn_member_emails_seq.nextval into :new.email_id from dual;
+end;
+/
 
-insert into apm_parameter_values_copy (
-	value_id,	
-	package_id, 
-	parameter_id, 
-	attr_value 
-) select * from apm_parameter_values;
