]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0785.schema.aoupa-unique-constraint.sql
LP#1661688: Add a link and other tweaks to alternate hold pickup feature
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0785.schema.aoupa-unique-constraint.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('0785', :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;