[open-ils-commits] r13922 - branches/rel_1_6/Open-ILS/src/sql/Pg (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 24 11:07:49 EDT 2009
Author: scottmk
Date: 2009-08-24 11:07:46 -0400 (Mon, 24 Aug 2009)
New Revision: 13922
Modified:
branches/rel_1_6/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
Change uniqueness constraint on acq.fund.code so as to
include org and year
Modified: branches/rel_1_6/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- branches/rel_1_6/Open-ILS/src/sql/Pg/200.schema.acq.sql 2009-08-24 14:38:46 UTC (rev 13921)
+++ branches/rel_1_6/Open-ILS/src/sql/Pg/200.schema.acq.sql 2009-08-24 15:07:46 UTC (rev 13922)
@@ -107,8 +107,9 @@
name TEXT NOT NULL,
year INT NOT NULL DEFAULT EXTRACT( YEAR FROM NOW() ),
currency_type TEXT NOT NULL REFERENCES acq.currency_type (code) DEFERRABLE INITIALLY DEFERRED,
- code TEXT UNIQUE,
- CONSTRAINT name_once_per_org_year UNIQUE (org,name,year)
+ code TEXT,
+ CONSTRAINT name_once_per_org_year UNIQUE (org,name,year),
+ CONSTRAINT code_once_per_org_year UNIQUE (org, code, year)
);
CREATE TABLE acq.fund_debit (
More information about the open-ils-commits
mailing list