[open-ils-commits] r13912 - trunk/Open-ILS/src/sql/Pg (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Aug 21 08:38:48 EDT 2009
Author: scottmk
Date: 2009-08-21 08:38:47 -0400 (Fri, 21 Aug 2009)
New Revision: 13912
Modified:
trunk/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: trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql 2009-08-21 05:14:25 UTC (rev 13911)
+++ trunk/Open-ILS/src/sql/Pg/200.schema.acq.sql 2009-08-21 12:38:47 UTC (rev 13912)
@@ -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