View | Details | Raw Unified | Return to bug 14205
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_14205-add_fk_course_reserves_ci_id.sql (+2 lines)
Line 0 Link Here
1
DELETE cr.* FROM course_reserves AS cr LEFT JOIN course_items USING(ci_id) WHERE course_items.ci_id IS NULL;
2
ALTER TABLE course_reserves add CONSTRAINT course_reserves_ibfk_2 FOREIGN KEY (ci_id) REFERENCES course_items (ci_id) ON DELETE CASCADE ON UPDATE CASCADE;
(-)a/installer/data/mysql/kohastructure.sql (-2 / +3 lines)
Lines 623-629 CREATE TABLE `course_reserves` ( Link Here
623
-- Constraints for table `course_reserves`
623
-- Constraints for table `course_reserves`
624
--
624
--
625
ALTER TABLE `course_reserves`
625
ALTER TABLE `course_reserves`
626
  ADD CONSTRAINT `course_reserves_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`);
626
  ADD CONSTRAINT `course_reserves_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`),
627
  ADD CONSTRAINT `course_reserves_ibfk_2` FOREIGN KEY (`ci_id`) REFERENCES `course_items` (`ci_id`) ON DELETE CASCADE ON UPDATE CASCADE;
628
627
629
628
--
630
--
629
-- Table structure for table `branch_borrower_circ_rules`
631
-- Table structure for table `branch_borrower_circ_rules`
630
- 

Return to bug 14205