comparison database/schema/admin.sql @ 43:debc55088b4f

add administrative queue
author David A. Holland
date Sun, 15 Jun 2014 18:16:19 -0400
parents
children 812c956dd0e9
comparison
equal deleted inserted replaced
42:e1017d556437 43:debc55088b4f
1 --
2 -- Queue of administrative requests.
3 --
4 -- The following things appear in the admin queue:
5 -- * comments filed on locked PRs
6 -- * bounce mail (for feedback messages, for other messages)
7 -- * junk mail (unrecognized incoming mail)
8 --
9 -- These all are associated with incoming messages and refer to the
10 -- rawmail table. The pr and user fields are not null if we can figure
11 -- out what it's about, which we sometimes can but often can't.
12 --
13
14 CREATE TABLE adminmailtypes (
15 type text primary key,
16 desc text
17 )
18 WITHOUT OIDS;
19
20 -- this is not configurable as the logic for recognizing these is open-coded
21 -- XXX should probably use an enum type for this instead
22 INSERT INTO adminmaintypes VALUES ('locked', 'Comments on locked PRs');
23 INSERT INTO adminmaintypes VALUES ('fbounces', 'Feedback nag-mail bounces');
24 INSERT INTO adminmaintypes VALUES ('rbounces', 'Responsible nag-mail bounces');
25 INSERT INTO adminmaintypes VALUES ('bounces', 'Other bounces');
26 INSERT INTO adminmaintypes VALUES ('junk', 'Unrecognized mail traffic');
27
28 CREATE TABLE adminmailqueue (
29 rawmsg bigint not null references rawmail,
30 type text not null references adminmailtypes,
31 pr bigint null references PRs,
32 user bigint null references users
33 )
34 WITHOUT OIDS;