]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/xxxx.schema.action_hold_request_fkey_to_hold_type.sql
LP#1006466 - Stamping upgrade script
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / xxxx.schema.action_hold_request_fkey_to_hold_type.sql
1 CREATE TABLE config.hold_type (
2     id          SERIAL,
3     hold_type   TEXT UNIQUE,
4     description TEXT
5 );
6
7 INSERT INTO config.hold_type (hold_type,description) VALUES
8     ('C','Copy Hold'),
9     ('V','Volume Hold'),
10     ('T','Title Hold'),
11     ('M','Metarecord Hold'),
12     ('R','Recall Hold'),
13     ('F','Force Hold'),
14     ('I','Issuance Hold'),
15     ('P','Part Hold')
16 ;
17
18 ALTER TABLE action.hold_request ADD CONSTRAINT hold_request_hold_type_fkey FOREIGN KEY (hold_type) REFERENCES config.hold_type(hold_type) DEFERRABLE INITIALLY DEFERRED;
19