Index: openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql	4 Jun 2006 00:45:38 -0000	1.9
+++ openacs-4/packages/acs-kernel/sql/oracle/acs-relationships-create.sql	18 Aug 2006 18:17:49 -0000	1.10
@@ -15,21 +15,25 @@
 ----------------------------------------------------------------
 
 create table acs_rel_roles (
-	role		varchar2(100) not null
-			constraint acs_rel_roles_pk primary key,
-        pretty_name	varchar2(100) not null,
-        pretty_plural	varchar2(100) not null
+	role		varchar2(100) 
+			constraint acs_rel_roles_role_nn not null
+			constraint acs_rel_roles_role_pk primary key,
+        pretty_name	varchar2(100) 
+			constraint acs_rel_roles_pretty_name_nn not null,
+        pretty_plural	varchar2(100) 
+			constraint acs_rel_roles_pretty_plural_nn not null
 );
 
 create table acs_rel_types (
-	rel_type	varchar2(100) not null
-			constraint acs_rel_types_pk primary key
+	rel_type	varchar2(100) 
+			constraint acs_rel_types_rel_type_nn not null
+			constraint acs_rel_types_rel_type_pk primary key
 			constraint acs_rel_types_rel_type_fk
 			references acs_object_types(object_type),
 	object_type_one	not null
 			constraint acs_rel_types_obj_type_1_fk
 			references acs_object_types (object_type),
-	role_one	constraint acs_rel_types_role_1_fk
+	role_one	constraint acs_rel_types_role_one_fk
 			references acs_rel_roles (role),
 	min_n_rels_one	integer default 0 not null
 			constraint acs_rel_types_min_n_1_ck
@@ -40,7 +44,7 @@
 	object_type_two	not null
 			constraint acs_rel_types_obj_type_2_fk
 			references acs_object_types (object_type),
-	role_two	constraint acs_rel_types_role_2_fk
+	role_two	constraint acs_rel_types_role_two_fk
 			references acs_rel_roles (role),
 	min_n_rels_two	integer default 0 not null
 			constraint acs_rel_types_min_n_2_ck
@@ -288,20 +292,24 @@
 create sequence acs_rel_id_seq;
 
 create table acs_rels (
-	rel_id		integer not null
+	rel_id		integer 
+			constraint acs_rels_rel_id_nn not null
 			constraint acs_rels_rel_id_fk
 			references acs_objects (object_id)
                         on delete cascade
-			constraint acs_rels_pk primary key,
-	rel_type	varchar(100) not null
+			constraint acs_rels_rel_id_pk primary key,
+	rel_type	varchar(100) 
+			constraint acs_rels_rel_type_nn not null
 			constraint acs_rels_rel_type_fk
 			references acs_rel_types (rel_type),
-	object_id_one	integer not null
-			constraint acs_object_rels_one_fk
+	object_id_one	integer 
+			constraint acs_rels_object_id_one_nn not null
+			constraint acs_rels_object_id_one_fk
 			references acs_objects (object_id)
                         on delete cascade,
-	object_id_two	integer not null
-			constraint acs_object_rels_two_fk
+	object_id_two	integer 
+			constraint acs_rels_object_id_two_nn not null
+			constraint acs_rels_object_id_two_fk
 			references acs_objects (object_id)
                         on delete cascade,
 	constraint acs_object_rels_un unique
@@ -336,8 +344,9 @@
 create sequence acs_data_links_seq start with 1;
 
 create table acs_data_links (
-	rel_id		integer not null
-			constraint acs_data_links_pk primary key,
+	rel_id		integer 
+			constraint acs_data_links_rel_id_nn not null
+			constraint acs_data_links_rel_id_pk primary key,
 	object_id_one	integer not null
 			constraint acs_data_links_one_fk
 			references acs_objects (object_id)
