]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0448.data.trigger.circ.staff_age_to_lost.sql
Add default Vandelay match set to schema
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0448.data.trigger.circ.staff_age_to_lost.sql
1 BEGIN;
2
3 INSERT INTO config.upgrade_log (version) VALUES ('0448'); -- phasefx
4
5 INSERT INTO action_trigger.hook (key,core_type,description,passive) VALUES 
6     (   'circ.staff_age_to_lost',
7         'circ', 
8         oils_i18n_gettext(
9             'circ.staff_age_to_lost',
10             'An overdue circulation should be aged to a Lost status.',
11             'ath',
12             'description'
13         ), 
14         TRUE
15     )
16 ;
17
18 INSERT INTO action_trigger.event_definition (
19         id,
20         active,
21         owner,
22         name,
23         hook,
24         validator,
25         reactor,
26         delay_field
27     ) VALUES (
28         36,
29         FALSE,
30         1,
31         'circ.staff_age_to_lost',
32         'circ.staff_age_to_lost',
33         'CircIsOverdue',
34         'MarkItemLost',
35         'due_date'
36     )
37 ;
38
39 -- DELETE FROM config.upgrade_log WHERE version = '0448'; DELETE FROM action_trigger.event WHERE event_def = 36; DELETE FROM action_trigger.event_params WHERE event_def = 36; DELETE FROM action_trigger.event_definition WHERE id = 36; DELETE FROM action_trigger.hook WHERE key = 'circ.staff_age_to_lost';
40
41 COMMIT;
42