Index: openacs-4/contrib/packages/portal/sql/postgresql/portal-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/sql/postgresql/portal-package-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/contrib/packages/portal/sql/postgresql/portal-package-create.sql	12 Feb 2004 21:31:19 -0000	1.6
+++ openacs-4/contrib/packages/portal/sql/postgresql/portal-package-create.sql	12 Mar 2004 04:54:04 -0000	1.7
@@ -23,13 +23,13 @@
 -- @version $Id$
 --
 
-select define_function_args('portal__new', 'portal_id,party_id,package_id,name,theme_id,template_id,object_type;portal,creation_date,creation_user,creation_ip,context_id');
+select define_function_args('portal__new', 'portal_id,owner_id,package_id,name,theme_id,template_id,object_type;portal,creation_date,creation_user,creation_ip,context_id');
 
 create or replace function portal__new (integer,integer, integer, varchar, integer, integer, varchar, timestamptz, integer, varchar, integer)
 returns integer as '
 declare
     p_portal_id                     alias for $1;
-    p_party_id                      alias for $2;
+    p_owner_id                      alias for $2;
     p_package_id                    alias for $3;
     p_name                          alias for $4;
     p_theme_id                      alias for $5;
@@ -72,9 +72,9 @@
 
         insert
         into portals
-        (portal_id, party_id, package_id, name, theme_id)
+        (portal_id, owner_id, package_id, name, theme_id)
         values
-        (v_portal_id, p_party_id, p_package_id, p_name, v_theme_id);
+        (v_portal_id, p_owner_id, p_package_id, p_name, v_theme_id);
 
     else
 
@@ -87,9 +87,9 @@
 
         insert
         into portals
-        (portal_id, party_id, package_id, name, theme_id, template_id)
+        (portal_id, owner_id, package_id, name, theme_id, template_id)
         values
-        (v_portal_id, p_party_id, p_package_id, p_name, v_theme_id, p_template_id);
+        (v_portal_id, p_owner_id, p_package_id, p_name, v_theme_id, p_template_id);
 
         -- now insert the pages from the portal template
         for v_page in select *
@@ -121,8 +121,8 @@
 
                 insert
                 into portal_elements
-                (element_id, application_id, name, page_id, datasource_id, region, sort_key, state, shadeable_p, hideable_p)
-                select v_new_element_id, application_id, name, v_page_id, datasource_id, region, sort_key, state, shadeable_p, hideable_p
+                (element_id, name, page_id, datasource_id, region, sort_key, state, shadeable_p, hideable_p)
+                select v_new_element_id, name, v_page_id, datasource_id, region, sort_key, state, shadeable_p, hideable_p
                 from portal_elements
                 where element_id = v_element.element_id;
 
