Index: openacs-4/contrib/packages/portal/sql/oracle/portal-core-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/sql/oracle/portal-core-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/portal/sql/oracle/portal-core-create.sql	25 Oct 2002 21:29:17 -0000	1.1
+++ openacs-4/contrib/packages/portal/sql/oracle/portal-core-create.sql	3 Jan 2004 01:42:57 -0000	1.2
@@ -47,7 +47,7 @@
     description                     varchar(200)
 );
 
-comment on table portal_datasources '
+comment on table portal_datasources is '
     a portal datasource is the package of code that generates the content
     of a portal element. the foo-portlet packages create datasources.
 ';
@@ -78,7 +78,7 @@
     primary key (datasource_id, key)
 );
 
-comment on table portal_datasource_parameters '
+comment on table portal_datasource_parameters is '
     maintains a set of default parameters for portal datsources. these
     are copied to a portal element when it is created.
 
@@ -100,15 +100,15 @@
                       |                   | default is provided.
 ';
 
-comment on column portal_datasource_parameters.config_required_p '
+comment on column portal_datasource_parameters.config_required_p is '
     this parameter requires configuration. if configured_p is true then no
     action is needed at portal element creation since the portal element
     can simply use the default value provided. if configured_p is false then
     the portal element must provide a value for this parameter at creation
     time.
 ';
 
-comment on column portal_datasource_parameters.configured_p '
+comment on column portal_datasource_parameters.configured_p is '
     if true then a default value is provided for this parameter.
 ';
 
@@ -127,18 +127,18 @@
     resource_dir                    varchar(200)
 );
 
-comment on table portal_layouts '
+comment on table portal_layouts is '
     a portal layout is a template that defines regions for portal 
     elements to "fill in". Examples of layouts are two column and
     three column
 ';
 
-comment on column portal_layouts.filename '
+comment on column portal_layouts.filename is '
     the relative path to the layout template from the "portal/www/"
     directory without the ending ".adp" extension. Example: "layouts/simple2"
 ';
 
-comment on column portal_layouts.resource_dir '
+comment on column portal_layouts.resource_dir is '
     XXX remove me
 ';
 
@@ -155,13 +155,13 @@
     primary key (layout_id, region)
 );
 
-comment on table portal_layout_regions '
+comment on table portal_layout_regions is '
     this table describes each of the regions in each of the layouts.
     for example a two column layout would have two entries in this
     table: region = 1 and region = 2. 
 ';
 
-comment on column portal_layout_regions.region '
+comment on column portal_layout_regions.region is '
     an ordering of regions in a layout starting from 1
 ';
 
@@ -180,17 +180,17 @@
     resource_dir                    varchar(200)
 );
 
-comment on table portal_themes '
+comment on table portal_themes is '
     decoration templates for portal elements
 ';
 
-comment on column portal_themes.filename '
+comment on column portal_themes.filename is '
     the relative path to the theme template from the "portal/www/"
     directory without the ending ".adp" extension. Example: "themes/deco-theme"
 ';
 
-comment on column portal_themes.resource_dir '
-    the relative path to the theme's resource directory from the "portal/www/"
+comment on column portal_themes.resource_dir is '
+    the relative path to the theme''s resource directory from the "portal/www/"
     directory. The resource directory typically contains graphics files. 
     Example: "themes/deco-theme"
 ';
@@ -200,6 +200,9 @@
                                     references acs_objects (object_id)
                                     constraint portals_pk
                                     primary key,
+    party_id                        integer
+                                    constraint p_party_id_fk
+                                    references parties (party_id),
     name                            varchar(200)
                                     default 'Untitled'
                                     constraint portal_name_nn
@@ -212,16 +215,18 @@
                                     not null
 );
 
-comment on table portals '
-    portals are containers of one or more portal pages.
+create index portals_party_id_idx on portals(party_id);
+
+comment on table portals is '
+    portals are containers of one or more portal pages mapped to a party.
 ';
 
-comment on column portals.template_id '
+comment on column portals.template_id is '
     a portal may have a template (another portal)
 ';
 
-comment on column portals.theme_id '
-    portals one theme for all it's contained pages
+comment on column portals.theme_id is '
+    portals one theme for all its contained pages
 ';
 
 
@@ -251,12 +256,12 @@
 
 create index p_pages_prtl_page_idx on portal_pages (portal_id, page_id);
 
-comment on table portal_pages '
+comment on table portal_pages is '
     portal pages are containers for portal elements. can be thought of
     as the "tabs" on a portal
 ';
 
-comment on column portal_pages.sort_key '
+comment on column portal_pages.sort_key is '
     an ordering of the pages contained in the same portal starting from
     0 for the first page and increasing in an gapless integer sequence
 ';
@@ -305,16 +310,16 @@
     unique (page_id, name)
 );
 
-comment on table portal_elements '
+comment on table portal_elements is '
     the user-visible "box" on a portal page that displays the content of a datasource
 ';
 
-comment on column portal_elements.sort_key '
+comment on column portal_elements.sort_key is '
     an ordering of elements contained in the same region on a page starting from
     0 for the first element and increasing in an gapless integer sequence
 ';
 
-comment on column portal_elements.state '
+comment on column portal_elements.state is '
     one of the set "full" (normal), "shaded" (title bar only), "hidden" (not shown), 
     or "pinned" (like full, but without state change links). portal themes impliment these
     different behaviors based on a given elements state
@@ -349,13 +354,13 @@
 
 create index p_element_params_elem_key_idx on portal_element_parameters (element_id, key);
 
-comment on table portal_element_parameters '
+comment on table portal_element_parameters is '
     parameters on a per-element basis. the data structure is that of a multiset (aka bag)
     where multiple entries with the same key (for the same element) are allowed ?? XXXX. 
 ';
 
-comment on column portal_element_parameters.config_required_p '
+comment on column portal_element_parameters.config_required_p is '
 ';
 
-comment on column portal_element_parameters.configured_p '
+comment on column portal_element_parameters.configured_p is '
 ';
