]> git.donarmstrong.com Git - debbugs.git/blobdiff - sql/debbugs_schema.sql
add correspondent full name id
[debbugs.git] / sql / debbugs_schema.sql
index 9069030e44064e02399b4ce3165d1a349d0a91c9..e7a88906b9ec8914c79836fa4b477f6291cf7d26 100644 (file)
@@ -458,9 +458,7 @@ CREATE TABLE message (
        id SERIAL PRIMARY KEY,
        msgid TEXT NOT NULL DEFAULT '',
        from_complete TEXT NOT NULL DEFAULT '',
-       from_addr TEXT NOT NULL DEFAULT '',
        to_complete TEXT NOT NULL DEFAULT '',
-       to_addr TEXT NOT NULL DEFAULT '',
        subject TEXT NOT NULL DEFAULT '',
        sent_date TIMESTAMP WITH TIME ZONE,
        refs TEXT NOT NULL DEFAULT '',
@@ -471,9 +469,7 @@ INSERT INTO table_comments VALUES ('message','Messages sent to bugs');
 INSERT INTO column_comments VALUES ('message','id','Message id');
 INSERT INTO column_comments VALUES ('message','msgid','Message id header');
 INSERT INTO column_comments VALUES ('message','from_complete','Complete from header of message');
-INSERT INTO column_comments VALUES ('message','from_addr','Address(es) of From: headers');
 INSERT INTO column_comments VALUES ('message','to_complete','Complete to header of message');
-INSERT INTO column_comments VALUES ('message','to_addr','Address(es) of To: header');
 INSERT INTO column_comments VALUES ('message','subject','Subject of the message');
 INSERT INTO column_comments VALUES ('message','sent_date','Time/date message was sent (from Date header)');
 INSERT INTO column_comments VALUES ('message','refs','Contents of References: header');
@@ -503,7 +499,6 @@ INSERT INTO column_comments VALUES ('message_refs','primary_ref','TRUE if this m
 
 
 CREATE TABLE correspondent_full_name(
-       id SERIAL PRIMARY KEY,
        correspondent INT NOT NULL REFERENCES correspondent ON DELETE CASCADE ON UPDATE CASCADE,
        full_name TEXT NOT NULL,
        last_seen TIMESTAMP NOT NULL DEFAULT NOW()
@@ -513,8 +508,7 @@ CREATE UNIQUE INDEX correspondent_full_name_correspondent_full_name_idx
 CREATE INDEX correspondent_full_name_idx_full_name ON correspondent_full_name(full_name);
 CREATE INDEX correspondent_full_name_idx_last_seen ON correspondent_full_name(last_seen);
 INSERT INTO table_comments VALUES ('correspondent_full_name','Full names of BTS correspondents');
-INSERT INTO column_comments VALUES ('correspondent_full_name','id','Correspondent full name id');
-INSERT INTO column_comments VALUES ('correspondent_full_name','correpsondent','Correspondent ID (matches correspondent)');
+INSERT INTO column_comments VALUES ('correspondent_full_name','correspondent','Correspondent ID (matches correspondent)');
 INSERT INTO column_comments VALUES ('correspondent_full_name','full_name','Correspondent full name (includes e-mail address)');
 
 CREATE TYPE message_correspondent_type AS ENUM ('to','from','envfrom','cc');