From f71583152a52b4d07161af92d286306ba4397988 Mon Sep 17 00:00:00 2001
From: einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>
Date: Sat, 8 Dec 2007 09:07:43 +0000
Subject: More customer/vendor search enhancements

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

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

diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql
index 3e51a356..2b82eb8e 100644
--- a/sql/Pg-database.sql
+++ b/sql/Pg-database.sql
@@ -426,6 +426,8 @@ CREATE TABLE entity_credit_account (
     startdate date DEFAULT CURRENT_DATE,
     enddate date,
     threshold numeric default 0,
+    employee_id int references employee_entity(employee_id),
+    primary_contact int references person(id),
     PRIMARY KEY(entity_id, meta_number)
 );
 -- notes are from entity_note
@@ -614,7 +616,7 @@ CREATE TABLE ar (
   on_hold bool default false,
   reverse bool default false,
   approved bool default true,
-  credit_account int references entity_credit_account(id) not null,
+  entity_credit_account int references entity_credit_account(id) not null,
   description text
 );
 
@@ -650,7 +652,7 @@ CREATE TABLE ap (
   reverse bool default false,
   terms int2 DEFAULT 0,
   description text,
-  credit_account int references entity_credit_account(id)
+  entity_credit_account int references entity_credit_account(id)
 );
 
 COMMENT ON COLUMN ap.entity_id IS $$ Used to be customer_id, but customer is now metadata. You need to push to entity $$;
-- 
cgit v1.2.3

