Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.6.0d1-5.6.0d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.6.0d1-5.6.0d2.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.6.0d1-5.6.0d2.sql 30 May 2009 20:48:57 -0000 1.1 @@ -0,0 +1,42 @@ +alter table users add bio text; + +create function inline_0 () +returns integer as ' +declare + one_user_id integer; + bio_id integer; +begin + + bio_id := attribute_id + from acs_attributes + where object_type = ''person'' + and attribute_name = ''bio''; + + for one_user_id in select user_id from users loop + if exists(select attr_value + from acs_attribute_values + where object_id = one_user_id + and attribute_id = bio_id) then + update users + set bio = (select attr_value + from acs_attribute_values + where object_id = one_user_id + and attribute_id = bio_id) + where user_id = one_user_id; + end if; + end loop; + + delete from acs_attribute_values + where attribute_id = bio_id; + + perform acs_attribute__drop_attribute (''person'',''bio''); + perform acs_attribute__drop_attribute (''person'',''bio_mime_type''); + + return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.6.0d1-5.6.0d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.6.0d1-5.6.0d2.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.6.0d1-5.6.0d2.sql 30 May 2009 20:48:57 -0000 1.1 @@ -0,0 +1,42 @@ +alter table users add bio text; + +create function inline_0 () +returns integer as ' +declare + one_user_id integer; + bio_id integer; +begin + + bio_id := attribute_id + from acs_attributes + where object_type = ''person'' + and attribute_name = ''bio''; + + for one_user_id in select user_id from users loop + if exists(select attr_value + from acs_attribute_values + where object_id = one_user_id + and attribute_id = bio_id) then + update users + set bio = (select attr_value + from acs_attribute_values + where object_id = one_user_id + and attribute_id = bio_id) + where user_id = one_user_id; + end if; + end loop; + + delete from acs_attribute_values + where attribute_id = bio_id; + + perform acs_attribute__drop_attribute (''person'',''bio''); + perform acs_attribute__drop_attribute (''person'',''bio_mime_type''); + + return 0; + +end;' language 'plpgsql'; + +select inline_0 (); + +drop function inline_0 (); + Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/sql/oracle/attribute.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/sql/oracle/attributes-drop.sql'. Fisheye: No comparison available. Pass `N' to diff?