From 7a8d05934ffc6400c57f8331f55e73f9ceed502c Mon Sep 17 00:00:00 2001
From: einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>
Date: Sun, 6 May 2007 17:56:02 +0000
Subject: Fixing bug 1708011

git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1131 4979c152-3d1c-0410-bac9-87ea11338e46
---
 sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql')

diff --git a/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql b/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql
index 5b18932c..32e6dc5d 100644
--- a/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql
+++ b/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql
@@ -58,8 +58,12 @@ ALTER TABLE sic ADD PRIMARY KEY (code);
 
 ALTER TABLE status ADD PRIMARY KEY (trans_id);
 
-ALTER TABLE tax ADD PRIMARY KEY (chart_id);
-ALTER TABLE tax ADD FOREIGN KEY (chart_id) REFERENCES chart (id);
+-- Removing the primary key below since this is not quite the best way
+-- do this.  The tax table could have multiple rows per chart_id.
+-- We need a better fix for 1.3 (perhaps changing date to timestamp and
+-- and defaulting to infinity.
+-- ALTER TABLE tax ADD PRIMARY KEY (chart_id);
+-- ALTER TABLE tax ADD FOREIGN KEY (chart_id) REFERENCES chart (id);
 
 ALTER TABLE translation ADD PRIMARY KEY (trans_id, language_code);
 
-- 
cgit v1.2.3

