comparison database/schema/bugs.sql @ 39:45bb7b516edb

document previous better
author David A. Holland
date Sun, 15 Jun 2014 17:28:02 -0400
parents 68a4f2d8930e
children 81851564f552
comparison
equal deleted inserted replaced
38:68a4f2d8930e 39:45bb7b516edb
33 -- a PR, if the new state expects a timeout the PR should be 33 -- a PR, if the new state expects a timeout the PR should be
34 -- given a non-null timeout; otherwise, the timeout field 34 -- given a non-null timeout; otherwise, the timeout field
35 -- should be nulled. 35 -- should be nulled.
36 timeout_date timestamp null, 36 timeout_date timestamp null,
37 timeout_state text null references states (name), 37 timeout_state text null references states (name),
38 check (timestamp is null == timeout_state is null),
39
40 -- intended constraint:
41 -- select * from PRs, states where PRs.state = states.name
42 -- and states.timeout <> PRs.timeout_date is not null
43 -- should always return empty.
44 -- (All PRs in timeout states should have timeouts, and those
45 -- not in timeout states should not.)
38 46
39 -- fixed-size history 47 -- fixed-size history
40 arrival_schemaversion int not null, 48 arrival_schemaversion int not null,
41 arrival_date timestamp not null, 49 arrival_date timestamp not null,
42 modified_date timestamp not null, 50 modified_date timestamp not null,