[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4308] trunk/sql/Pg-database.sql
- Subject: SF.net SVN: ledger-smb:[4308] trunk/sql/Pg-database.sql
- From: ..hidden..
- Date: Tue, 14 Feb 2012 10:13:13 +0000
Revision: 4308
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4308&view=rev
Author: einhverfr
Date: 2012-02-14 10:13:13 +0000 (Tue, 14 Feb 2012)
Log Message:
-----------
Added db mappings for business units for orderitems and invoice tables as well
Modified Paths:
--------------
trunk/sql/Pg-database.sql
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2012-02-14 10:08:58 UTC (rev 4307)
+++ trunk/sql/Pg-database.sql 2012-02-14 10:13:13 UTC (rev 4308)
@@ -1814,6 +1814,22 @@
foreign key(class_id, bu_id) references business_unit(class_id, id)
);
+CREATE TABLE business_unit_inv (
+ entry_id int references invoice(id),
+ class_id int references business_unit_class(id),
+ bu_id int,
+ primary key(bu_id, class_id, entry_id),
+ foreign key(class_id, bu_id) references business_unit(class_id, id)
+);
+
+CREATE TABLE business_unit_oitem (
+ entry_id int references orderitems(id),
+ class_id int references business_unit_class(id),
+ bu_id int,
+ primary key(bu_id, class_id, entry_id),
+ foreign key(class_id, bu_id) references business_unit(class_id, id)
+);
+
COMMENT ON TABLE business_unit IS
$$ Tracks Projects, Departments, Funds, Etc.$$;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.