summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-23 21:38:32 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-23 21:38:32 +0000
commitea7437f196767bc740317d174278fab752f35adf (patch)
treed29d7c32a07f40083726edd63bda5773bd8591d9 /sql
parentdac9805b430a476b5539cf1aa8c36716b85cc567 (diff)
build out person->entity relationship
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1238 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r--sql/Pg-database.sql4
1 files changed, 2 insertions, 2 deletions
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