Mercurial > ~dholland > hg > swallowtail > index.cgi
annotate database/schema/config.sql @ 56:42d7888272a0 default tip
Implement fetch_classifications().
author | David A. Holland |
---|---|
date | Sun, 10 Apr 2022 19:37:18 -0400 |
parents | 40f64a96481f |
children |
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 |
11 | 10 ---- These are now handled in classify.sql |
11 -- | |
12 -- -- Severity ratings of bugs | |
13 -- CREATE TABLE severities ( | |
14 -- name text primary key, | |
15 -- obsolete boolean not null, | |
16 -- description text | |
17 -- ) | |
18 -- WITHOUT OIDS; | |
19 -- | |
20 -- -- Priority ratings of bugs | |
21 -- CREATE TABLE priorities ( | |
22 -- name text primary key, | |
23 -- obsolete boolean not null, | |
24 -- description text | |
25 -- ) | |
26 -- WITHOUT OIDS; | |
27 -- | |
28 -- -- Types of bugs (sw-bug, doc-bug, etc.) | |
29 -- CREATE TABLE classes ( | |
30 -- name text primary key, | |
31 -- obsolete boolean not null, | |
32 -- description text | |
33 -- ) WITHOUT OIDS; | |
34 -- | |
35 -- -- Categories of bugs (bin, kern, pkg, etc.) | |
36 -- CREATE TABLE categories ( | |
37 -- name text primary key, | |
38 -- obsolete boolean not null, | |
39 -- description text | |
40 -- ) WITHOUT OIDS; | |
8
68cc276ac118
SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff
changeset
|
41 |
68cc276ac118
SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff
changeset
|
42 |
10
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
43 -- States of bugs |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
44 -- |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
45 -- 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
|
46 -- closed resolved (one way or another) |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
47 -- 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
|
48 -- nagsubmitter the "submitter" users should get nag-mail |
39 | 49 -- timeout bugs in this state should time out to another state |
10
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 -- 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
|
52 -- 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
|
53 -- doesn't need to know about. |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
54 -- |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
55 -- For example: "open" might be defined as |
39 | 56 -- ("open", false, "bug is unresolved", |
57 -- false, true, false, false) | |
10
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
58 -- and "feedback" as |
39 | 59 -- ("feedback", false, "awaiting submitter feedback", |
60 -- false, false, true, true) | |
10
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
61 -- |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
62 CREATE TABLE states ( |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
63 name text primary key, |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
64 obsolete boolean not null, |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
65 description text , |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
66 closed boolean not null, |
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
67 nagresponsible boolean not null, |
38 | 68 nagsubmitter boolean not null, |
69 timeout boolean not null | |
10
1720f45dd495
Replace insane handling of states with something more likely workable.
David A. Holland
parents:
8
diff
changeset
|
70 ) WITHOUT OIDS; |
55
40f64a96481f
Adjust database user arrangements and grant schema privs.
David A. Holland
parents:
39
diff
changeset
|
71 |
40f64a96481f
Adjust database user arrangements and grant schema privs.
David A. Holland
parents:
39
diff
changeset
|
72 -- These are readonly for all routine operations. |
40f64a96481f
Adjust database user arrangements and grant schema privs.
David A. Holland
parents:
39
diff
changeset
|
73 GRANT SELECT ON states TO swallowtail_admin; |
40f64a96481f
Adjust database user arrangements and grant schema privs.
David A. Holland
parents:
39
diff
changeset
|
74 GRANT SELECT ON states TO swallowtail_writer; |
40f64a96481f
Adjust database user arrangements and grant schema privs.
David A. Holland
parents:
39
diff
changeset
|
75 GRANT SELECT ON states TO swallowtail_reader; |
40f64a96481f
Adjust database user arrangements and grant schema privs.
David A. Holland
parents:
39
diff
changeset
|
76 GRANT SELECT ON states TO swallowtail_public; |