From ea7437f196767bc740317d174278fab752f35adf Mon Sep 17 00:00:00 2001 From: linuxpoet Date: Wed, 23 May 2007 21:38:32 +0000 Subject: build out person->entity relationship git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1238 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/Pg-database.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index b9205b37..017d87d8 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -84,14 +84,14 @@ CREATE TABLE salutation ( CREATE TABLE person ( id serial PRIMARY KEY, + entity_id integer references entity(id) not null, salutation_id integer references salutation(id), - entity_class_id integer references entity_class(id), first_name text check (first_name ~ '[[:alnum:]_]') NOT NULL, middle_name text, last_name text check (last_name ~ '[[:alnum:]_]') NOT NULL, primary_location_id integer references location(id)); - +COMMENT ON TABLE person IS $$ Every person, must have an entity to derive a common or display name. The correct way to get class information on a person would be person.entity_id->entity_class_to_entity.entity_id. $$; -- END entity -- cgit v1.2.3