]> git.donarmstrong.com Git - debbugs.git/blobdiff - sql/debbugs_schema.sql
add correspondent full name id
[debbugs.git] / sql / debbugs_schema.sql
index ea8446453cf4e861b4a30c4e9c99d79144679772..e7a88906b9ec8914c79836fa4b477f6291cf7d26 100644 (file)
@@ -305,7 +305,6 @@ INSERT INTO column_comments VALUES ('bug_tag','tag','Tag id (matches tag)');
 
 CREATE UNIQUE INDEX bug_tag_bug_tag ON bug_tag (bug,tag);
 CREATE INDEX bug_tag_tag ON bug_tag (tag);
-CREATE INDEX bug_tag_bug ON bug_tag (bug);
 
 CREATE TABLE user_tag (
        id SERIAL PRIMARY KEY,
@@ -330,7 +329,6 @@ INSERT INTO column_comments VALUES ('bug_user_tag','tag','User tag id (matches u
 
 CREATE UNIQUE INDEX bug_user_tag_bug_tag ON bug_user_tag (bug,user_tag);
 CREATE INDEX bug_user_tag_tag ON bug_user_tag (user_tag);
-CREATE INDEX bug_user_tag_bug ON bug_user_tag (bug);
 
 CREATE TABLE bug_binpackage (
        bug INT NOT NULL REFERENCES bug,
@@ -346,7 +344,6 @@ CREATE TABLE bug_srcpackage (
        src_pkg INT NOT NULL REFERENCES src_pkg ON UPDATE CASCADE ON DELETE CASCADE
 );
 CREATE UNIQUE INDEX bug_srcpackage_id_pkg ON bug_srcpackage(bug,src_pkg);
-CREATE INDEX bug_srcpackage_idx_bug ON bug_srcpackage(bug);
 CREATE INDEX bug_srcpackage_idx_src_pkg ON bug_srcpackage(src_pkg);
 
 INSERT INTO table_comments VALUES ('bug_srcpackage','Bug <-> source package mapping');
@@ -461,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 '',
@@ -474,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');
@@ -506,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()
@@ -516,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');