Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql,v
diff -u -r1.57 -r1.58
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql	30 Jun 2004 18:20:02 -0000	1.57
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql	1 Jul 2004 11:29:17 -0000	1.58
@@ -227,7 +227,8 @@
 
 create index apm_packages_package_key_idx on apm_packages (package_key);
 
-alter table acs_objects add foreign key (package_id) references apm_packages(package_id);
+-- This cant be added at table create time since acs_objects is created before apm_packages;
+alter table acs_objects add constraint acs_objects_package_id_fk foreign key (package_id) references apm_packages(package_id);
 
 comment on table apm_packages is '
    This table maintains the list of all package instances in the sytem. 
