From: blake Date: Fri, 11 Mar 2022 20:47:19 +0000 (-0600) Subject: LP1786524: Table creation fix for new DB X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ce254bed090a9d3a34eff71e072f11b0650d11c4;p=working%2FEvergreen.git LP1786524: Table creation fix for new DB Signed-off-by: blake --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 10d815e113..9023e1b4db 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -1385,14 +1385,14 @@ CREATE TABLE config.geolocation_service ( 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 ); 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 diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql index 8ad5444ee9..6a594a453f 100644 --- a/Open-ILS/src/sql/Pg/005.schema.actors.sql +++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql @@ -1317,5 +1317,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;