From 0c1f89eff64943c6b73c1ef00ca16fa1ba869ec4 Mon Sep 17 00:00:00 2001
From: einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>
Date: Thu, 27 Dec 2007 23:58:16 +0000
Subject: Adding missing voucher_id field to Pg-database.sql

git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2008 4979c152-3d1c-0410-bac9-87ea11338e46
---
 sql/Pg-database.sql | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'sql/Pg-database.sql')

diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index 4c620226..cafa5f0c 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -375,6 +375,7 @@ CREATE TABLE acc_trans (
   approved bool default true,
   cleared_on date,
   reconciled_on date,
+  voucher_id int references voucher(id),
   entry_id SERIAL PRIMARY KEY
 );
 --
@@ -688,10 +689,10 @@ CREATE TABLE tax (
   chart_id int PRIMARY KEY,
   rate numeric,
   taxnumber text,
-  validto date,
+  validto timestamp default 'infinity',
   pass integer DEFAULT 0 NOT NULL,
   taxmodule_id int DEFAULT 1 NOT NULL,
-  FOREIGN KEY (chart_id) REFERENCES chart (id),
+  FOREIGN KEY (chart_id) REFERENCES chart (id, validto),
   FOREIGN KEY (taxmodule_id) REFERENCES taxmodule (taxmodule_id)
 );
 --
-- 
cgit v1.2.3

