[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1254] trunk/sql/Pg-database.sql
- Subject: SF.net SVN: ledger-smb: [1254] trunk/sql/Pg-database.sql
- From: ..hidden..
- Date: Mon, 04 Jun 2007 15:58:23 -0700
Revision: 1254
http://svn.sourceforge.net/ledger-smb/?rev=1254&view=rev
Author: linuxpoet
Date: 2007-06-04 15:58:22 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
added constraint to id,location_class
Modified Paths:
--------------
trunk/sql/Pg-database.sql
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2007-06-04 22:02:41 UTC (rev 1253)
+++ trunk/sql/Pg-database.sql 2007-06-04 22:58:22 UTC (rev 1254)
@@ -56,9 +56,10 @@
CREATE UNIQUE INDEX country_name_idx on country(lower(name));
CREATE TABLE location_class (
- id serial PRIMARY KEY,
+ id serial UNIQUE,
class text check (class ~ '[[:alnum:]_]') not null,
- authoritative boolean not null);
+ authoritative boolean not null,
+ PRIMARY KEY (class,authoritative));
CREATE UNIQUE INDEX lower_class_unique ON location_class(lower(class));
@@ -79,6 +80,8 @@
country_id integer not null REFERENCES country(id),
mail_code text not null check (mail_code ~ '[[:alnum:]_]'));
+CREATE INDEX location_unique_class_idx ON location (id,location_class);
+
CREATE TABLE company (
id serial UNIQUE,
entity_id integer not null references entity(id),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.