Loosened constraint on group penalty thresholds. You can now define threholds for...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Sep 2009 17:25:10 +0000 (17:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 4 Sep 2009 17:25:10 +0000 (17:25 +0000)
To Update:

ALTER TABLE permission.grp_penalty_threshold DROP CONSTRAINT penalty_grp_once;
ALTER TABLE permission.grp_penalty_threshold ADD CONSTRAINT penalty_grp_once UNIQUE (grp,penalty,org_unit);

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13961 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/006.schema.permissions.sql

index 424bb1d..66126b0 100644 (file)
@@ -45,7 +45,7 @@ CREATE TABLE permission.grp_penalty_threshold (
     org_unit    INT             NOT NULL REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
     penalty     INT             NOT NULL REFERENCES config.standing_penalty (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
     threshold   NUMERIC(8,2)    NOT NULL,
-    CONSTRAINT penalty_grp_once UNIQUE (grp,penalty)
+    CONSTRAINT penalty_grp_once UNIQUE (grp,penalty,org_unit)
 );
 
 CREATE TABLE permission.grp_perm_map (