summaryrefslogtreecommitdiff
path: root/sql/Pg-database.sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-11 17:28:19 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-11 17:28:19 +0000
commit5aa34a416b74f546d4b99d1688af0e43ce07cddb (patch)
tree51522630163f061f946daeee5607683acda0b991 /sql/Pg-database.sql
parente7cbaf0e5a8bbdd82fc8ff967c1f1eeaca721574 (diff)
Minor db fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1973 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/Pg-database.sql')
-rw-r--r--sql/Pg-database.sql5
1 files changed, 4 insertions, 1 deletions
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