Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/Attic/dotlrn-communities-create.sql,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql	17 Dec 2001 23:02:55 -0000	1.17
+++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-communities-create.sql	10 Jan 2002 00:08:39 -0000	1.18
@@ -69,16 +69,36 @@
     where dotlrn_communities.community_id = groups.group_id
     and groups.join_policy <> 'closed';
 
+create table dotlrn_applets (
+    applet_id                   integer
+                                constraint dotlrn_applets_applet_id_nn
+                                not null
+                                constraint dotlrn_applets_applet_pk 
+                                primary key,
+    applet_key                  varchar(100)
+                                constraint dotlrn_applets_applet_key_nn
+                                not null
+                                constraint dotlrn_applets_applet_key_uk
+                                unique,
+    status                      char(10)
+                                default 'active'
+                                constraint dotlrn_applets_status_nn
+                                not null
+                                constraint dotlrn_applets_status_ck
+                                check (status in ('active','inactive'))
+);
+
 create table dotlrn_community_applets (
     community_id                integer
                                 constraint dotlrn_ca_community_id_nn
                                 not null
                                 constraint dotlrn_ca_community_id_fk
                                 references dotlrn_communities (community_id),
-    applet_key                  varchar(100)
+    applet_id                   integer
                                 constraint dotlrn_ca_applet_key_nn
-                                not null,
-    constraint dotlrn_community_applets_pk primary key (community_id, applet_key),
+                                not null
+                                references dotlrn_applets (applet_id),
+    constraint dotlrn_community_applets_pk primary key (community_id, applet_id),
     -- this is the package_id of the package this applet represents
     package_id                  integer,
     active_p                    char(1)
