Index: openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql	27 Jan 2004 03:33:46 -0000	1.5
+++ openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql	29 Jan 2004 03:50:59 -0000	1.6
@@ -285,6 +285,32 @@
     portals one theme for all its contained pages
 ';
 
+create table portal_datasource_map (
+    package_id                      integer
+                                    constraint pdm_package_id_fk
+                                    references apm_packages (package_id),
+    datasource_id                   integer
+                                    constraint pdm_datasource_id_fk
+                                    references portal_datasources (datasource_id),
+    constraint pdm_pk
+    primary key (package_id, datasource_id)
+);
+
+comment on table portal_datasource_map is '
+    Maps datasources to portal instances.  This is used by the portal admin UI to track
+    which datasources have had their applications mounted under the instance''s mount
+    point.  Independent applications like .LRN that use the portal package as a service
+    do not need to maintain this map.
+';
+
+comment on column portal_datasource_map.package_id is '
+    The package id of the portal instance the datasource is mapped to.
+';
+
+comment on column portal_datasource_map.datasource_id is '
+    The package id of the portal instance the datasource is mapped to.
+';
+
 create table portal_pages (
     page_id                         integer
                                     constraint p_pages_page_id_fk
