Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql	11 Aug 2006 21:58:04 -0000	1.23
+++ openacs-4/packages/acs-kernel/sql/postgresql/groups-create.sql	25 Sep 2006 17:59:16 -0000	1.24
@@ -17,30 +17,30 @@
 -- the "DENORMALIZATION" section further below).
 
 create table composition_rels (
-        rel_id          integer constraint composition_rel_rel_id_fk
+        rel_id          integer constraint composition_rels_rel_id_fk
                         references acs_rels (rel_id)
                         on delete cascade
-                        constraint composition_rel_rel_id_pk
+                        constraint composition_rels_rel_id_pk
                         primary key
 );
 
 create table membership_rels (
-        rel_id          integer constraint membership_rel_rel_id_fk
+        rel_id          integer constraint membership_rels_rel_id_fk
                         references acs_rels (rel_id)
                         on delete cascade
-                        constraint membership_rel_rel_id_pk
+                        constraint membership_rels_rel_id_pk
                         primary key,
         -- null means waiting for admin approval
-        member_state    varchar(20) constraint membership_rel_mem_ck
+        member_state    varchar(20) constraint membership_rels_member_state_ck
                         check (member_state in ('merged', 'approved', 'needs approval',
                                               'banned', 'rejected', 'deleted'))
 );
 
 create table admin_rels (
-        rel_id          integer constraint admin_rel_rel_id_fk
+        rel_id          integer constraint admin_rels_rel_id_fk
                         references membership_rels (rel_id)
                         on delete cascade
-                        constraint admin_rel_rel_id_pk
+                        constraint admin_rels_rel_id_pk
                         primary key
 );
 
@@ -164,13 +164,13 @@
 
 create table group_types (
         group_type              varchar(400) not null
-                                constraint group_types_pk primary key
-                                constraint group_types_obj_type_fk
+                                constraint group_types_group_type_pk primary key
+                                constraint group_types_group_type_fk
                                 references acs_object_types (object_type),
 	-- commented out by Ben (OpenACS), to make it in sync with Oracle version..
 	--        approval_policy         varchar(30) not null,
         default_join_policy     varchar(30) default 'open' not null
-                                constraint group_types_join_policy_ck
+                                constraint group_types_join_dft_policy_ck
                                 check (default_join_policy in 
                                 ('open', 'needs approval', 'closed'))
 );
@@ -184,7 +184,7 @@
         group_id        integer not null
                         constraint groups_group_id_fk
                         references parties (party_id)
-                        constraint groups_pk primary key,
+                        constraint groups_group_id_pk primary key,
         group_name      varchar(1000) not null,
         join_policy     varchar(30) default 'open' not null
                         constraint groups_join_policy_ck
@@ -197,11 +197,11 @@
 create table group_type_rels (
        group_rel_type_id      integer constraint gtr_group_rel_type_id_pk primary key,
        rel_type		      varchar(100) not null 
-                              constraint gtr_rel_type_fk
+                              constraint group_type_rels_rel_type_fk
                               references acs_rel_types (rel_type)
                               on delete cascade,
        group_type	      varchar(100) not null 
-                              constraint gtr_group_type_fk
+                              constraint group_type_rels_group_type_fk
                               references acs_object_types (object_type)
                               on delete cascade,
        constraint gtr_group_rel_types_un unique (group_type, rel_type)
@@ -292,7 +292,7 @@
                         references acs_rel_types (rel_type)
                         on delete cascade,
         ancestor_rel_type varchar(100) not null
-                        constraint grp_el_idx_ancstr_rel_type_ck
+                        constraint group_element_index_ant_rt_ck 
                         check (ancestor_rel_type in ('composition_rel','membership_rel')),
 	constraint group_element_index_pk
 	primary key (element_id, group_id, rel_id)
