Prevent locations with the same name being generated for the same library
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 1 Dec 2008 21:18:25 +0000 (21:18 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 1 Dec 2008 21:18:25 +0000 (21:18 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11373 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 (