From 369ceb0e6a10ebb74fd8b9cf2922be4419416dc6 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Thu, 5 Dec 2019 12:51:34 -0800 Subject: [PATCH] LP1849212: Fix installation issue with circ mod foreign key Signed-off-by: Jane Sandberg Signed-off-by: Michele Morgan Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/040.schema.asset.sql | 2 +- Open-ILS/src/sql/Pg/100.circ_matrix.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql index 262a689926..4fd2f01da2 100644 --- a/Open-ILS/src/sql/Pg/040.schema.asset.sql +++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql @@ -1128,7 +1128,7 @@ CREATE TABLE asset.course_module_course_materials ( relationship TEXT, original_location INT REFERENCES asset.copy_location, original_status INT REFERENCES config.copy_status, - original_circ_modifier INT REFERENCES config.circ_modifier, + original_circ_modifier TEXT, --REFERENCES config.circ_modifier original_callnumber INT REFERENCES asset.call_number ); diff --git a/Open-ILS/src/sql/Pg/100.circ_matrix.sql b/Open-ILS/src/sql/Pg/100.circ_matrix.sql index 55d91a3d57..6125810c40 100644 --- a/Open-ILS/src/sql/Pg/100.circ_matrix.sql +++ b/Open-ILS/src/sql/Pg/100.circ_matrix.sql @@ -38,8 +38,9 @@ INSERT INTO config.circ_modifier (code, name, description, sip2_media_type ) */ --- add an fkey pointing to the new circ mod table +-- add fkeys pointing to the new circ mod table ALTER TABLE asset.copy ADD CONSTRAINT circ_mod_fkey FOREIGN KEY (circ_modifier) REFERENCES config.circ_modifier (code) ON UPDATE CASCADE ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE asset.course_module_course_materials ADD CONSTRAINT original_circ_mod_fkey FOREIGN KEY (original_circ_modifier) REFERENCES config.circ_modifier (code) ON UPDATE CASCADE ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED; /** -- 2.11.0