[open-ils-commits] r13961 - trunk/Open-ILS/src/sql/Pg (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 4 13:25:13 EDT 2009


Author: erickson
Date: 2009-09-04 13:25:10 -0400 (Fri, 04 Sep 2009)
New Revision: 13961

Modified:
   trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql
Log:

Loosened constraint on group penalty thresholds.  You can now define threholds for the same group as long as they have a different context org unit


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);



Modified: trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql	2009-09-04 15:24:09 UTC (rev 13960)
+++ trunk/Open-ILS/src/sql/Pg/006.schema.permissions.sql	2009-09-04 17:25:10 UTC (rev 13961)
@@ -45,7 +45,7 @@
     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 (



More information about the open-ils-commits mailing list