summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-27 23:58:16 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-27 23:58:16 +0000
commit0c1f89eff64943c6b73c1ef00ca16fa1ba869ec4 (patch)
tree75bb3569222f541de451a7b9b26f0d1b2ed5bde5 /sql
parentc2dbb77215e94b5ad6ba7177b75ba15434f092ef (diff)
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
Diffstat (limited to 'sql')
-rw-r--r--sql/Pg-database.sql5
1 files changed, 3 insertions, 2 deletions
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)
);
--