Index: openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.10d11-0.10d12.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.10d11-0.10d12.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.10d11-0.10d12.sql 15 Apr 2005 17:26:45 -0000 1.1 +++ openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.10d11-0.10d12.sql 27 Apr 2005 18:26:10 -0000 1.2 @@ -1,16 +1,16 @@ alter table as_items add column field_name varchar(500); -update as_items i -set i.field_name = (select ci.name +update as_items +set field_name = (select ci.name from cr_items ci, cr_revisions cr where ci.item_id = cr.item_id - and cr.revision_id = i.as_item_id); + and cr.revision_id = as_items.as_item_id); -update acs_objects o -set o.creation_user = (select o2.creation_user +update acs_objects +set creation_user = (select o2.creation_user from acs_objects o2 where o2.object_id = (select min(r.revision_id) from cr_revisions r - where r.item_id = o.object_id)) -where o.object_id in (select item_id from cr_items) -and o.creation_user is null; + where r.item_id = acs_objects.object_id)) +where object_id in (select item_id from cr_items) +and creation_user is null;