view database/schema/admin.sql @ 44:812c956dd0e9

Add another admin queue type for comments on nonexistent PRs. Also, correct stupid spelling mistake. Need to get the test harness running again.
author David A. Holland
date Mon, 16 Jun 2014 01:27:45 -0400
parents debc55088b4f
children 36d91dfe017f
line wrap: on
line source

--
-- Queue of administrative requests.
--
-- The following things appear in the admin queue:
--    * comments filed on locked PRs
--    * bounce mail (for feedback messages, for other messages)
--    * junk mail (unrecognized incoming mail)
--
-- These all are associated with incoming messages and refer to the
-- rawmail table. The pr and user fields are not null if we can figure
-- out what it's about, which we sometimes can but often can't.
--

CREATE TABLE adminmailtypes (
	type text		primary key,
	desc text
)
WITHOUT OIDS;

-- this is not configurable as the logic for recognizing these is open-coded
-- XXX should probably use an enum type for this instead
INSERT INTO adminmailtypes VALUES ('locked', 'Comments on locked PRs');
INSERT INTO adminmailtypes VALUES ('nonexistent', 'Comments on nonexistent PRs');
INSERT INTO adminmailtypes VALUES ('fbounces', 'Feedback nag-mail bounces');
INSERT INTO adminmailtypes VALUES ('rbounces', 'Responsible nag-mail bounces');
INSERT INTO adminmailtypes VALUES ('bounces', 'Other bounces');
INSERT INTO adminmailtypes VALUES ('junk', 'Unrecognized mail traffic');

CREATE TABLE adminmailqueue (
	rawmsg bigint		not null references rawmail,
	type text		not null references adminmailtypes,
	pr bigint		null references PRs,
	user bigint		null references users
)
WITHOUT OIDS;