]> git.donarmstrong.com Git - debbugs.git/commitdiff
the maintainer address should be a correspondent
authorDon Armstrong <don@donarmstrong.com>
Thu, 7 Nov 2013 05:19:21 +0000 (21:19 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 7 Nov 2013 05:19:21 +0000 (21:19 -0800)
sql/debbugs_schema.sql

index d2ecfa25f99d27bf7d021a3ed9063f8e2bb4f61e..36adc81dfb13ebfde65e388f678e815783c88021 100644 (file)
@@ -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,