Backport r11373 from trunk to protect against duplicate locations at the same library
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 1 Dec 2008 21:57:38 +0000 (21:57 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 1 Dec 2008 21:57:38 +0000 (21:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11374 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/040.schema.asset.sql

index d6952e8..098792f 100644 (file)
@@ -28,7 +28,8 @@ CREATE TABLE asset.copy_location (
        holdable        BOOL    NOT NULL DEFAULT TRUE,
        hold_verify     BOOL    NOT NULL DEFAULT FALSE,
        opac_visible    BOOL    NOT NULL DEFAULT TRUE,
-       circulate       BOOL    NOT NULL DEFAULT TRUE
+       circulate       BOOL    NOT NULL DEFAULT TRUE,
+       CONSTRAINT acl_name_once_per_lib UNIQUE (name, owning_lib)
 );
 
 CREATE TABLE asset.copy (