]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/1019.schema.hold_targeter.sql
LP#1643709: Stamping upgrade scripts
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 1019.schema.hold_targeter.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('1019', :eg_version);
4
5 CREATE OR REPLACE FUNCTION
6     action.hold_request_regen_copy_maps(
7         hold_id INTEGER, copy_ids INTEGER[]) RETURNS VOID AS $$
8     DELETE FROM action.hold_copy_map WHERE hold = $1;
9     INSERT INTO action.hold_copy_map (hold, target_copy) SELECT $1, UNNEST($2);
10 $$ LANGUAGE SQL;
11
12 -- DATA
13
14 INSERT INTO config.global_flag (name, label, value, enabled) VALUES (
15     'circ.holds.retarget_interval',
16     oils_i18n_gettext(
17         'circ.holds.retarget_interval',
18         'Holds Retarget Interval', 
19         'cgf',
20         'label'
21     ),
22     '24h',
23     TRUE
24 );
25
26 COMMIT;
27