add passive event validator to stop events that are too far past the delay_field...
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0052.schema.asset_copy_location_order.sql
1 BEGIN;
2
3 INSERT INTO config.upgrade_log (version) VALUES ('0052');
4
5 CREATE TABLE asset.copy_location_order
6 (
7         id              SERIAL           PRIMARY KEY,
8         location        INT              NOT NULL
9                                              REFERENCES asset.copy_location
10                                              ON DELETE CASCADE
11                                              DEFERRABLE INITIALLY DEFERRED,
12         org             INT              NOT NULL
13                                              REFERENCES actor.org_unit
14                                              ON DELETE CASCADE
15                                              DEFERRABLE INITIALLY DEFERRED,
16         position        INT              NOT NULL DEFAULT 0,
17         CONSTRAINT acplo_once_per_org UNIQUE ( location, org )
18 );
19
20 INSERT INTO permission.perm_list VALUES
21 (350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description'));
22
23 COMMIT;