[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1351] trunk/sql/Pg-database.sql
- Subject: SF.net SVN: ledger-smb: [1351] trunk/sql/Pg-database.sql
- From: ..hidden..
- Date: Thu, 05 Jul 2007 14:14:33 -0700
Revision: 1351
http://svn.sourceforge.net/ledger-smb/?rev=1351&view=rev
Author: linuxpoet
Date: 2007-07-05 14:14:19 -0700 (Thu, 05 Jul 2007)
Log Message:
-----------
fix entity/entity_class so you aren't limited to only one customer ever
Modified Paths:
--------------
trunk/sql/Pg-database.sql
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2007-07-05 18:44:24 UTC (rev 1350)
+++ trunk/sql/Pg-database.sql 2007-07-05 21:14:19 UTC (rev 1351)
@@ -9,8 +9,10 @@
CREATE TABLE entity (
id serial PRIMARY KEY,
name text check (name ~ '[[:alnum:]_]'),
- entity_class integer not null UNIQUE,
+ entity_class integer not null,
created date not null default current_date);
+
+CREATE UNIQUE INDEX entity_class_name_class_idx ON entity(name,entity_class);
COMMENT ON TABLE entity IS $$ The primary entity table to map to all contacts $$;
COMMENT ON COLUMN entity.name IS $$ This is the common name of an entity. If it was a person it may be Joshua Drake, a company Acme Corp. You may also choose to use a domain such as commandprompt.com $$;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.