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,
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,
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');
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 '',
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');
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()
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');