Index: openacs-4/packages/assessment/sql/oracle/upgrade/upgrade-0.22d2-0.22d3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/oracle/upgrade/upgrade-0.22d2-0.22d3.sql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/assessment/sql/oracle/upgrade/upgrade-0.22d2-0.22d3.sql 8 Dec 2006 14:20:33 -0000 1.1 +++ openacs-4/packages/assessment/sql/oracle/upgrade/upgrade-0.22d2-0.22d3.sql 5 Feb 2007 18:51:59 -0000 1.1.2.1 @@ -50,3 +50,13 @@ 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_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; \ No newline at end of file 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.1.2.1 -r1.1.2.2 --- openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.22d2-0.22d3.sql 2 Feb 2007 16:16:59 -0000 1.1.2.1 +++ openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.22d2-0.22d3.sql 5 Feb 2007 18:51:59 -0000 1.1.2.2 @@ -54,4 +54,8 @@ 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; \ No newline at end of file +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; \ No newline at end of file