Changeset 2090df0c85d347d43405ce36c1fd4a76ac8fab4d

Show
Ignore:
Timestamp:
11/06/09 22:19:18 (10 months ago)
Author:
Stephen Bennett <spb@…>
Parents:
457755db65a4216ea59f1b548a2541db159025d0
Children:
20b3fcc6b52236b404b7d7aaf1517f57be3f84a2
git-committer:
Stephen Bennett <spb@exherbo.org> / 2009-11-06T22:19:18Z+0000
Message:

Use named constraints for uniqueness of various db columns, to make understanding the error messages easier

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • sql/gms_create.sql

    rd08c676 r2090df0  
    4444CREATE TABLE groups ( 
    4545    id              SERIAL PRIMARY KEY, 
    46     groupname       VARCHAR(32) NOT NULL, 
     46    groupname       VARCHAR(32) NOT NULL CONSTRAINT unique_group_name UNIQUE, 
    4747    grouptype       group_type NOT NULL, 
    4848    url             VARCHAR(64) NOT NULL, 
    4949    address         INTEGER DEFAULT NULL, 
    50     status          group_status, 
     50    status          group_status NOT NULL, 
    5151    verify_url      VARCHAR(255), 
    5252    verify_token    VARCHAR(16), 
     
    5858CREATE TABLE channel_namespaces ( 
    5959    group_id        INTEGER NOT NULL REFERENCES groups(id), 
    60     namespace       VARCHAR(32) UNIQUE NOT NULL 
     60    namespace       VARCHAR(32) NOT NULL CONSTRAINT unique_channel_ns UNIQUE 
    6161); 
    6262 
    6363CREATE TABLE cloak_namespaces ( 
    6464    group_id        INTEGER NOT NULL REFERENCES groups(id), 
    65     namespace       VARCHAR(32) UNIQUE NOT NULL 
     65    namespace       VARCHAR(32) NOT NULL CONSTRAINT unique_cloak_ns UNIQUE 
    6666); 
    6767