Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql	5 Mar 2011 22:35:23 -0000	1.3
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql	27 Oct 2014 16:39:36 -0000	1.4
@@ -3,6 +3,11 @@
 alter table acs_datatypes add column_check_expr text;
 alter table acs_datatypes add column_output_function text;
 
+alter table acs_attributes drop constraint acs_attributes_datatype_fk; 
+alter table acs_attributes add constraint acs_attributes_datatype_fk 
+   foreign key (datatype) 
+   references acs_datatypes(datatype) on update cascade;
+
 insert into acs_datatypes
   (datatype, database_type)
 (select 'text', 'text' from dual
