annotate database/schema/config.sql @ 10:1720f45dd495

Replace insane handling of states with something more likely workable.
author David A. Holland
date Sun, 19 Feb 2012 20:21:51 -0500
parents 68cc276ac118
children d42c0db81e28
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
1 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
2 -- These tables record the allowable values for the various
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
3 -- enumerated settings.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
4 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
5 -- Each entry has the value string (the name), a description field,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
6 -- and a flag to mark the entry obsolete. Obsolete values are still
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
7 -- allowed to exist in the database, but new uses are not permitted.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
8 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
9
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
10 -- Severity ratings of bugs
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
11 CREATE TABLE severities (
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
12 name text primary key,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
13 obsolete boolean not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
14 description text
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
15 )
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
16 WITHOUT OIDS;
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
17
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
18 -- Priority ratings of bugs
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
19 CREATE TABLE priorities (
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
20 name text primary key,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
21 obsolete boolean not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
22 description text
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
23 )
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
24 WITHOUT OIDS;
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
25
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
26 -- Types of bugs (sw-bug, doc-bug, etc.)
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
27 CREATE TABLE classes (
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
28 name text primary key,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
29 obsolete boolean not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
30 description text
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
31 ) WITHOUT OIDS;
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
32
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
33 -- Categories of bugs (bin, kern, pkg, etc.)
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
34 CREATE TABLE categories (
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
35 name text primary key,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
36 obsolete boolean not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
37 description text
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
38 ) WITHOUT OIDS;
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
39
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
40 -- States of bugs
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
41 --
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
42 -- The additional booleans govern the semantics of the defined states.
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
43 -- closed resolved (one way or another)
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
44 -- nagresponsible the "responsible" users should get nag-mail
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
45 -- nagsubmitter the "submitter" users should get nag-mail
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
46 --
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
47 -- It is reasonable for multiple states to have the same settings;
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
48 -- such states presumably mean different things in ways the database
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
49 -- doesn't need to know about.
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
50 --
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
51 -- For example: "open" might be defined as
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
52 -- ("open", false, "bug is unresolved", false, true, false)
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
53 -- and "feedback" as
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
54 -- ("feedback", false, "awaiting submitter feedback", false, false, true)
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
55 --
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
56 CREATE TABLE states (
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
57 name text primary key,
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
58 obsolete boolean not null,
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
59 description text ,
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
60 closed boolean not null,
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
61 nagresponsible boolean not null,
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
62 nagsubmitter boolean not null
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
63 ) WITHOUT OIDS;