add the corresponding simple library config import function
authorGalen Charlton <gmc@esilibrary.com>
Mon, 6 Aug 2012 15:50:15 +0000 (11:50 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 6 Aug 2012 15:50:15 +0000 (11:50 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

sql/base/base.sql

index 54f0a9d..c1a92cd 100644 (file)
@@ -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;
+