Org unit prox adjustment tweaks
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / XXXX.schema.aoupa-unique-constraint.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
4
5 DROP INDEX actor.prox_adj_once_idx;
6
7 CREATE UNIQUE INDEX prox_adj_once_idx ON actor.org_unit_proximity_adjustment (
8     COALESCE(item_circ_lib, -1),
9     COALESCE(item_owning_lib, -1),
10     COALESCE(copy_location, -1),
11     COALESCE(hold_pickup_lib, -1),
12     COALESCE(hold_request_lib, -1),
13     COALESCE(circ_mod, ''),
14     pos
15 );
16
17 COMMIT;