[open-ils-commits] r12958 - trunk/Open-ILS/src/sql/Pg (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Apr 22 09:54:25 EDT 2009


Author: miker
Date: 2009-04-22 09:54:23 -0400 (Wed, 22 Apr 2009)
New Revision: 12958

Modified:
   trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
Log:
add an explict name column to event definitions, unique on owner

Modified: trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql	2009-04-22 13:20:50 UTC (rev 12957)
+++ trunk/Open-ILS/src/sql/Pg/400.schema.action_trigger.sql	2009-04-22 13:54:23 UTC (rev 12958)
@@ -100,6 +100,7 @@
     id              SERIAL      PRIMARY KEY,
     active          BOOL        NOT NULL DEFAULT TRUE,
     owner           INT         NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
+    name            TEXT        NOT NULL,
     hook            TEXT        NOT NULL REFERENCES action_trigger.hook (key) DEFERRABLE INITIALLY DEFERRED,
     validator       TEXT        NOT NULL REFERENCES action_trigger.validator (module) DEFERRABLE INITIALLY DEFERRED,
     reactor         TEXT        NOT NULL REFERENCES action_trigger.reactor (module) DEFERRABLE INITIALLY DEFERRED,
@@ -109,7 +110,8 @@
     delay_field     TEXT,                 -- for instance, xact_start on a circ hook ... look for fields on hook.core_type where datatype=timestamp? If not set, delay from now()
     group_field     TEXT,                 -- field from this.hook.core_type to batch event targets together on, fed into reactor a group at a time.
     template        TEXT,                 -- the TT block.  will have an 'environment' hash (or array of hashes, grouped events) built up by validator and collector(s), which can be modified.
-    CONSTRAINT ev_def_owner_hook_val_react_clean_delay_once UNIQUE (owner, hook, validator, reactor, delay, delay_field)
+    CONSTRAINT ev_def_owner_hook_val_react_clean_delay_once UNIQUE (owner, hook, validator, reactor, delay, delay_field),
+    CONSTRAINT ev_def_name_owner_once UNIQUE (owner, name)
 );
 
 CREATE TABLE action_trigger.environment (



More information about the open-ils-commits mailing list