From 5bcc2a68a2da991d28ca92f537052bc49a6e1f88 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 6 Aug 2012 11:50:15 -0400 Subject: [PATCH 1/1] add the corresponding simple library config import function Signed-off-by: Galen Charlton --- sql/base/base.sql | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/sql/base/base.sql b/sql/base/base.sql index 54f0a9d..c1a92cd 100644 --- a/sql/base/base.sql +++ b/sql/base/base.sql @@ -1666,3 +1666,13 @@ BEGIN END; $FUNC$ LANGUAGE PLPGSQL; +CREATE OR REPLACE FUNCTION migration_tools.simple_import_library_config(dir TEXT) RETURNS VOID AS $FUNC$ +BEGIN + EXECUTE $$COPY actor.hours_of_operation FROM '$$ || dir || $$/actor_hours_of_operation'$$; + EXECUTE $$COPY actor.org_unit_closed (org_unit, close_start, close_end, reason) FROM '$$ || dir || $$/actor_org_unit_closed'$$; + EXECUTE $$COPY actor.org_unit_setting (org_unit, name, value) FROM '$$ || dir || $$/actor_org_unit_setting'$$; + EXECUTE $$COPY asset.copy_location (name, owning_lib, holdable, hold_verify, opac_visible, circulate) FROM '$$ || dir || $$/asset_copy_location'$$; + EXECUTE $$COPY permission.grp_penalty_threshold (grp, org_unit, penalty, threshold) FROM '$$ || dir || $$/permission_grp_penalty_threshold'$$; +END; +$FUNC$ LANGUAGE PLPGSQL; + -- 1.7.2.5