Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-table-create.sql,v
diff -u -r1.11 -r1.12
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql	12 Sep 2003 01:20:56 -0000	1.11
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql	12 Sep 2003 17:58:43 -0000	1.12
@@ -95,7 +95,9 @@
         party_id                integer
                                 constraint pm_default_role_party_fk 
                                 references parties(party_id)
-                                on delete cascade
+                                on delete cascade,
+        constraint pm_default_roles_uq
+        unique (role_id, party_id)
 );
 
 comment on table pm_default_roles is '
@@ -115,7 +117,9 @@
         party_id                integer
                                 constraint pm_project_role_map_user_id_fk 
                                 references parties(party_id)
-                                on delete cascade
+                                on delete cascade,
+        constraint pm_project_assignment_uq
+        unique (project_id, role_id, party_id)
 );
 
 
@@ -338,7 +342,9 @@
                                         on delete cascade,
         dependency_type                 varchar
                                         constraint pm_tasks_const_type
-                                        references pm_task_dependency_types
+                                        references pm_task_dependency_types,
+        constraint pm_task_dependency_uq
+        unique (task_id, parent_task_id)
 );
 
 
@@ -368,7 +374,9 @@
                                 on delete cascade,
         role_id                 integer
                                 constraint pm_workgroup_role_id
-                                references pm_roles
+                                references pm_roles,
+        constraint pm_workgroup_parties_uq
+        unique (workgroup_id, party_id, role_id)
 );
 
 
@@ -385,7 +393,9 @@
         party_id                integer
                                 constraint pm_task_assignment_party_fk 
                                 references parties(party_id)
-                                on delete cascade
+                                on delete cascade,
+        constraint pm_task_assignment_uq
+        unique (task_id, role_id, party_id)
 );
 
 
