From 5aa34a416b74f546d4b99d1688af0e43ce07cddb Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 11 Dec 2007 17:28:19 +0000 Subject: Minor db fixes git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1973 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/Pg-database.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql/Pg-database.sql') diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index 708ca081..85b5c39d 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -265,6 +265,7 @@ CREATE TABLE company_to_contact ( company_id integer not null references company(id) ON DELETE CASCADE, contact_class_id integer references contact_class(id) not null, contact text check(contact ~ '[[:alnum:]_]') not null, + description text not null, PRIMARY KEY (company_id,contact_class_id,contact)); COMMENT ON TABLE company_to_contact IS $$ To keep track of the relationship between multiple contact methods and a single company $$; @@ -426,8 +427,10 @@ CREATE TABLE entity_credit_account ( startdate date DEFAULT CURRENT_DATE, enddate date, threshold numeric default 0, - employee_id int references entity_employee(employee_id), + employee_id int references entity_employee(entity_id), primary_contact int references person(id), + ar_ap_account_id int references chart(id), + cash_account_id int references chart(id), PRIMARY KEY(entity_id, meta_number) ); -- notes are from entity_note -- cgit v1.2.3