From: Galen Charlton Date: Mon, 6 Aug 2012 15:50:15 +0000 (-0400) Subject: add the corresponding simple library config import function X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=5bcc2a68a2da991d28ca92f537052bc49a6e1f88 add the corresponding simple library config import function Signed-off-by: Galen Charlton --- 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; +