X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=sql%2Fbase%2Fbase.sql;h=c1a92cd42d48f0ed10a54105e69e78b9273091bd;hp=54f0a9d81662ef6a330fa22c72d2bf9c66c4fa4a;hb=5bcc2a68a2da991d28ca92f537052bc49a6e1f88;hpb=8a7b3c61b459b5443aac9489b9ebddac259e153b 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; +