From 924430606f177818243a45bf32869ff5801fc8b9 Mon Sep 17 00:00:00 2001 From: blake Date: Fri, 11 Mar 2022 14:47:19 -0600 Subject: [PATCH] LP1786524: Table creation fix for new DB Signed-off-by: blake --- Open-ILS/src/sql/Pg/002.schema.config.sql | 6 ++---- Open-ILS/src/sql/Pg/005.schema.actors.sql | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e49bd82648..a12ba71254 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -1375,19 +1375,17 @@ SELECT SETVAL('config.carousel_type_id_seq'::TEXT, 100); CREATE TABLE config.patron_loader_header_map ( id SERIAL, - org_unit INTEGER NOT NULL, + org_unit INTEGER NOT NULL, -- REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; import_header TEXT NOT NULL, default_header TEXT NOT NULL ); -ALTER TABLE config.patron_loader_header_map ADD CONSTRAINT config_patron_loader_header_map_org_fkey FOREIGN KEY (org_unit) REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; CREATE TABLE config.patron_loader_value_map ( id SERIAL, - org_unit INTEGER NOT NULL, + org_unit INTEGER NOT NULL, -- REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; mapping_type TEXT NOT NULL, import_value TEXT NOT NULL, native_value TEXT NOT NULL ); -ALTER TABLE config.patron_loader_value_map ADD CONSTRAINT config_patron_loader_value_map_org_fkey FOREIGN KEY (org_unit) REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; COMMIT; diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql index c86ee475a7..eff09194bd 100644 --- a/Open-ILS/src/sql/Pg/005.schema.actors.sql +++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql @@ -1286,5 +1286,7 @@ CREATE TABLE actor.patron_loader_log ( logtime TIMESTAMP DEFAULT NOW() ); ALTER TABLE actor.patron_loader_log ADD CONSTRAINT actor_patron_loader_log_org_fkey FOREIGN KEY (org_unit) REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE config.patron_loader_header_map ADD CONSTRAINT config_patron_loader_header_map_org_fkey FOREIGN KEY (org_unit) REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE config.patron_loader_value_map ADD CONSTRAINT config_patron_loader_value_map_org_fkey FOREIGN KEY (org_unit) REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED; COMMIT; -- 2.11.0