[open-ils-commits] r8650 - branches/acq-experiment/Open-ILS/src/sql/Pg

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Feb 5 21:57:05 EST 2008


Author: miker
Date: 2008-02-05 21:28:41 -0500 (Tue, 05 Feb 2008)
New Revision: 8650

Modified:
   branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
moving debits to fund, not funding_source

Modified: branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql	2008-02-06 02:21:52 UTC (rev 8649)
+++ branches/acq-experiment/Open-ILS/src/sql/Pg/200.schema.acq.sql	2008-02-06 02:28:41 UTC (rev 8650)
@@ -11,7 +11,7 @@
 
 -- Use the ISO 4217 abbreviations for currency codes
 INSERT INTO acq.currency_type (code, label) VALUES ('USD','US Dollars');
-INSERT INTO acq.currency_type (code, label) VALUES ('CAD','Canadian Dollars');
+INSERT INTO acq.currency_type (code, label) VALUES ('CAN','Canadian Dollars');
 INSERT INTO acq.currency_type (code, label) VALUES ('EUR','Euros');
 
 CREATE TABLE acq.exchange_rate (
@@ -33,13 +33,6 @@
 	CONSTRAINT provider_name_once_per_owner UNIQUE (name,owner)
 );
 
-CREATE TABLE acq.provider_share_map (
-	id		SERIAL	PRIMARY KEY,
-	provider	INT	NOT NULL REFERENCES acq.provider (id),
-	org		INT	NOT NULL REFERENCES actor.org_unit (id),
-	CONSTRAINT provider_share_once_per_owner UNIQUE (provider,org)
-);
-
 CREATE TABLE acq.funding_source (
 	id		SERIAL	PRIMARY KEY,
 	name		TEXT	NOT NULL,
@@ -48,13 +41,6 @@
 	CONSTRAINT funding_source_name_once_per_owner UNIQUE (name,owner)
 );
 
-CREATE TABLE acq.funding_source_share_map (
-	id		SERIAL	PRIMARY KEY,
-	funding_source		INT	NOT NULL REFERENCES acq.funding_source (id),
-	org		INT	NOT NULL REFERENCES actor.org_unit (id),
-	CONSTRAINT funding_source_share_once_per_owner UNIQUE (funding_source,org)
-);
-
 CREATE TABLE acq.funding_source_credit (
 	id	SERIAL	PRIMARY KEY,
 	funding_source    INT     NOT NULL REFERENCES acq.funding_source (id),
@@ -62,15 +48,6 @@
 	note	TEXT
 );
 
-CREATE TABLE acq.funding_source_debit (
-	id			SERIAL	PRIMARY KEY,
-	funding_source			INT     NOT NULL REFERENCES acq.funding_source (id),
-	origin_amount		NUMERIC	NOT NULL,  -- pre-exchange-rate amount
-	origin_currency_type	TEXT	NOT NULL REFERENCES acq.currency_type (code),
-	amount			NUMERIC	NOT NULL,
-	encumberance		BOOL	NOT NULL DEFAULT TRUE
-);
-
 CREATE TABLE acq.picklist (
 	id		SERIAL				PRIMARY KEY,
 	owner		INT				NOT NULL REFERENCES actor.usr (id),
@@ -216,6 +193,15 @@
     CONSTRAINT name_once_per_org_year UNIQUE (org,name,year)
 );
 
+CREATE TABLE acq.fund_debit (
+	id			SERIAL	PRIMARY KEY,
+	fund			INT     NOT NULL REFERENCES acq.fund (id),
+	origin_amount		NUMERIC	NOT NULL,  -- pre-exchange-rate amount
+	origin_currency_type	TEXT	NOT NULL REFERENCES acq.currency_type (code),
+	amount			NUMERIC	NOT NULL,
+	encumberance		BOOL	NOT NULL DEFAULT TRUE
+);
+
 CREATE TABLE acq.fund_allocation (
     id          SERIAL  PRIMARY KEY,
     funding_source        INT     NOT NULL REFERENCES acq.funding_source (id) ON UPDATE CASCADE ON DELETE CASCADE,



More information about the open-ils-commits mailing list