annotate database/schema/bugs.sql @ 34:ceecdbbb1364

some updates
author David A. Holland
date Mon, 27 May 2013 23:19:00 -0400
parents 7458a278cb64
children 68a4f2d8930e
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 -- PR data.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
3 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
4 -- PRs is the primary table of bug info, with one row per problem
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
5 -- report.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
6 --
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
7
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
8 CREATE SEQUENCE next_PR;
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 CREATE TABLE PRs (
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
11 id bigint primary key default nextval('next_PR'),
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
12
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
13 -- basic description
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
14 synopsis text not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
15 confidential boolean not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
16
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
17 -- states
29
David A. Holland
parents: 12
diff changeset
18 state text not null references states (name),
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
19 locked boolean not null, -- deny modifications
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
20
10
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
21 -- intended constraint:
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
22 -- select * from PRs, states where PRs.state = states.name
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
23 -- and states.closed = false and PRs.locked = true
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
24 -- should always return empty.
1720f45dd495 Replace insane handling of states with something more likely workable.
David A. Holland
parents: 8
diff changeset
25 -- (no PR should be locked unless it is closed)
8
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
26
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
27 -- fixed-size history
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
28 arrival_schemaversion int not null,
12
d4c3bd255653 "timestamp", not "date". from asau
David A. Holland
parents: 10
diff changeset
29 arrival_date timestamp not null,
32
7458a278cb64 forgot modified_date
David A. Holland
parents: 29
diff changeset
30 modified_date timestamp not null,
12
d4c3bd255653 "timestamp", not "date". from asau
David A. Holland
parents: 10
diff changeset
31 closed_date timestamp ,
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 -- original submitter
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
34 originator bigint references users (id),
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
35
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
36 -- original submission
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
37 -- we don't keep this as such - these items go into an
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
38 -- entry in the admin log instead, and the submitter is
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
39 -- automatically subscribed to the bug.
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
40 -- "Submitted by joe@schmoe, Message-Id <3@schmoe>, Subject: foo"
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
41 --from_address text not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
42 --mail_subject text not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
43 --mail_msgid text not null,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
44
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
45 -- contents
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
46 release text ,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
47 environment text ,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
48 description text ,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
49 how_to_repeat text ,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
50 fix text ,
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
51 unformatted text
68cc276ac118 SQL material from old tree, split up for accessibility.
David A. Holland
parents:
diff changeset
52
29
David A. Holland
parents: 12
diff changeset
53 )
David A. Holland
parents: 12
diff changeset
54 WITHOUT OIDS;