Index: openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql 11 Apr 2011 00:28:54 -0000 1.1 +++ openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.7.0d3-5.7.0d4.sql 24 Apr 2011 21:28:30 -0000 1.2 @@ -1,3 +1,6 @@ +-- Need to guard against xotcl-core which sneakily modifies core behind +-- our backs (rather than having fixed acs-core like nice people would do) + begin; select content_type__create_attribute ( @@ -9,7 +12,11 @@ null, null, 'integer' - ); + ) + where not exists (select 1 + from acs_attributes + where object_type = 'content_revision' + and attribute_name = 'item_id'); select content_type__create_attribute ( 'content_revision', @@ -20,6 +27,10 @@ null, null, 'text' - ); + ) + where not exists (select 1 + from acs_attributes + where object_type = 'content_revision' + and attribute_name = 'content'); end;