blob: 16215e40c7fdf5371a42820c3c621e9c12e4a6c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
BEGIN;
CREATE TABLE response_priorities (
id serial not null primary key,
body_id int references body(id) not null,
name text not null,
deleted boolean not null default 'f',
unique(body_id, name)
);
CREATE TABLE contact_response_priorities (
id serial NOT NULL PRIMARY KEY,
contact_id int REFERENCES contacts(id) NOT NULL,
response_priority_id int REFERENCES response_priorities(id) NOT NULL
);
ALTER TABLE problem
ADD COLUMN response_priority_id int REFERENCES response_priorities(id);
COMMIT;
|