From 5fa5f19984c0148a533aa8224681826f901f8217 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 6 Nov 2013 21:19:21 -0800 Subject: [PATCH] the maintainer address should be a correspondent --- sql/debbugs_schema.sql | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sql/debbugs_schema.sql b/sql/debbugs_schema.sql index d2ecfa2..36adc81 100644 --- a/sql/debbugs_schema.sql +++ b/sql/debbugs_schema.sql @@ -44,25 +44,29 @@ CREATE TABLE column_comments ( ); CREATE UNIQUE INDEX ON column_comments(table_name,column_name); + +CREATE TABLE correspondent ( + id SERIAL PRIMARY KEY, + addr TEXT NOT NULL UNIQUE +); +INSERT INTO table_comments VALUES ('correspondent','Individual who has corresponded with the BTS'); +INSERT INTO column_comments VALUES ('correspondent','id','Correspondent ID'); +INSERT INTO column_comments VALUES ('correspondent','addr','Correspondent address'); + CREATE TABLE maintainer ( id SERIAL PRIMARY KEY, name TEXT NOT NULL UNIQUE, + correspondent INT NOT NULL REFERENCES correspondent(id), created TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL, modified TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL ); INSERT INTO table_comments VALUES ('maintainer','Package maintainer names'); INSERT INTO column_comments VALUES ('maintainer','id','Package maintainer id'); INSERT INTO column_comments VALUES ('maintainer','name','Name of package maintainer'); +INSERT INTO column_comments VALUES ('maintainer','correspondent','Correspondent ID'); INSERT INTO column_comments VALUES ('maintainer','created','Time maintainer record created'); INSERT INTO column_comments VALUES ('maintainer','modified','Time maintainer record modified'); -CREATE TABLE correspondent ( - id SERIAL PRIMARY KEY, - addr TEXT NOT NULL UNIQUE -); -INSERT INTO table_comments VALUES ('correspondent','Individual who has corresponded with the BTS'); -INSERT INTO column_comments VALUES ('correspondent','id','Correspondent ID'); -INSERT INTO column_comments VALUES ('correspondent','addr','Correspondent address'); CREATE TABLE severity ( id SERIAL PRIMARY KEY, -- 2.39.2