Index: openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql	14 Jan 2003 15:09:07 -0000	1.2
+++ openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql	21 Jan 2003 18:05:48 -0000	1.3
@@ -23,42 +23,45 @@
 
 
 -- Function for creating a workflow
-create function workflow__new (varchar, -- short_name
-                               varchar, -- pretty_name
-                               integer, -- object_id
-                               varchar, -- object_type
-                               integer, -- creation_user
-                               varchar, -- creation_ip
-                               integer  -- context_id
-                              )
+create function workflow__new (
+    varchar, -- short_name
+    varchar, -- pretty_name
+    varchar, -- package_key
+    integer, -- object_id
+    varchar, -- object_type
+    integer, -- creation_user
+    varchar, -- creation_ip
+    integer  -- context_id
+)
 returns integer as '
 declare
-        p_short_name            alias for $1;
-        p_pretty_name           alias for $2;
-        p_object_id             alias for $3;
-        p_object_type           alias for $4;
-        p_creation_user         alias for $5;
-        p_creation_ip           alias for $6;
-        p_context_id            alias for $7;
-
-        v_workflow_id           integer;
+    p_short_name            alias for $1;
+    p_pretty_name           alias for $2;
+    p_package_key           alias for $3;
+    p_object_id             alias for $4;
+    p_object_type           alias for $5;
+    p_creation_user         alias for $6;
+    p_creation_ip           alias for $7;
+    p_context_id            alias for $8;
+  
+    v_workflow_id           integer;
 begin
-        -- Instantiate the ACS Object super type with auditing info
-        v_workflow_id  := acs_object__new(null,
-                                          ''workflow_lite'',
-                                          now(),
-                                          p_creation_user,
-                                          p_creation_ip,
-                                          p_context_id,
-                                          ''t'');
+    -- Instantiate the ACS Object super type with auditing info
+    v_workflow_id  := acs_object__new(null,
+                                      ''workflow_lite'',
+                                      now(),
+                                      p_creation_user,
+                                      p_creation_ip,
+                                      p_context_id,
+                                      ''t'');
 
-        -- Insert workflow specific info into the workflows table
-        insert into workflows
-               (workflow_id, short_name, pretty_name, object_id, object_type)
-           values
-               (v_workflow_id, p_short_name, p_pretty_name, p_object_id, p_object_type);
-                
+    -- Insert workflow specific info into the workflows table
+    insert into workflows
+           (workflow_id, short_name, pretty_name, package_key, object_id, object_type)
+       values
+           (v_workflow_id, p_short_name, p_pretty_name, p_package_key, p_object_id, p_object_type);
+            
 
-       return v_workflow_id;
+   return v_workflow_id;
 end;
 ' language 'plpgsql';
