Index: openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.19-0.20.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.19-0.20.sql,v
diff -u -N
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.19-0.20.sql	11 Mar 2006 17:07:05 -0000	1.1.2.1
@@ -0,0 +1,17 @@
+update acs_objects set context_id=(select parent_id 
+        from cr_items 
+        where item_id=object_id) 
+    where object_id in 
+        (select item_id 
+         from cr_items 
+         where content_type='as_assessments');
+
+update acs_objects set context_id=package_id
+where object_id in (select cf.folder_id 
+    from cr_folders cf,
+    cr_items ci,
+    apm_packages p
+    where ci.parent_id=-100
+    and ci.item_id=cf.folder_id
+    and p.package_key='assessment'
+    and p.package_id=cf.package_id);
