Index: openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.22d2-0.22d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.22d2-0.22d3.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.22d2-0.22d3.sql	16 Jan 2007 10:12:11 -0000	1.2
+++ openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.22d2-0.22d3.sql	15 May 2007 20:14:16 -0000	1.3
@@ -50,6 +50,12 @@
 
 alter table as_session_choices add constraint "as_session_choices_session_fk" FOREIGN KEY (session_id) REFERENCES as_sessions(session_id) on delete cascade;
 
-alter table as_session_results drop constraint as_session_results_target_id_fk;
+alter table as_assessment_section_map drop constraint as_assessment_section_map_assessment_id_fk;
+alter table as_assessment_section_map drop constraint as_assessment_section_map_section_id_fk;
 
+alter table as_assessment_section_map add constraint "as_assessment_section_map_assessment_id_fk" FOREIGN KEY (assessment_id) REFERENCES as_assessments(assessment_id) ON DELETE CASCADE;
+alter table as_assessment_section_map add constraint "as_assessment_section_map_section_id_fk" FOREIGN KEY (section_id) REFERENCES as_sections(section_id) ON DELETE CASCADE;
+alter table as_session_results drop constraint "as_session_results_result_id_fk";
+alter table as_session_results add constraint "as_session_results_result_id_fk" FOREIGN KEY (result_id) REFERENCES cr_revisions(revision_id) on delete cascade;
+alter table as_session_results drop constraint "as_session_results_target_id_fk";
 alter table as_session_results add constraint "as_session_results_target_id_fk" FOREIGN KEY (target_id) REFERENCES cr_revisions(revision_id) on delete cascade;
