7675.801.1
by Abel Deuring
DB schema patch adding tables which allow to filter bug subscriptions by parameters also used in regular bug searches. |
1 |
-- Copyright 2010 Canonical Ltd. This software is licensed under the
|
2 |
-- GNU Affero General Public License version 3 (see the file LICENSE).
|
|
3 |
||
4 |
SET client_min_messages=ERROR; |
|
5 |
||
6 |
CREATE TABLE BugSubscriptionFilter ( |
|
7 |
id serial PRIMARY KEY, |
|
8 |
structuralsubscription integer REFERENCES StructuralSubscription(id), |
|
9 |
find_all_tags boolean NOT NULL, |
|
10 |
include_any_tags boolean NOT NULL, |
|
11 |
exclude_any_tags boolean NOT NULL, |
|
7675.801.2
by Abel Deuring
simplified the subscription filter schema. |
12 |
other_parameters text, |
13 |
description text |
|
7675.801.1
by Abel Deuring
DB schema patch adding tables which allow to filter bug subscriptions by parameters also used in regular bug searches. |
14 |
);
|
15 |
||
16 |
CREATE INDEX bugsubscriptionfilter__structuralsubscription |
|
17 |
ON BugSubscriptionFilter(structuralsubscription); |
|
18 |
||
19 |
CREATE TABLE BugSubscriptionFilterStatus ( |
|
20 |
id serial PRIMARY KEY, |
|
21 |
filter integer REFERENCES BugSubscriptionFilter(id) NOT NULL, |
|
22 |
status integer NOT NULL); |
|
23 |
||
7675.801.4
by Abel Deuring
renamed DB schema patch file; better indexes for the new tables |
24 |
CREATE INDEX bugsubscriptionfilterstatus__filter__status__idx |
25 |
ON BugSubscriptionFilterStatus(filter, status); |
|
7675.801.1
by Abel Deuring
DB schema patch adding tables which allow to filter bug subscriptions by parameters also used in regular bug searches. |
26 |
|
27 |
CREATE TABLE BugSubscriptionFilterImportance ( |
|
28 |
id serial PRIMARY KEY, |
|
29 |
filter integer REFERENCES BugSubscriptionFilter(id) NOT NULL, |
|
30 |
importance integer NOT NULL); |
|
31 |
||
7675.801.4
by Abel Deuring
renamed DB schema patch file; better indexes for the new tables |
32 |
CREATE INDEX bugsubscriptionfilterimportance__filter__importance__idx |
33 |
ON BugSubscriptionFilterImportance(filter, importance); |
|
7675.801.1
by Abel Deuring
DB schema patch adding tables which allow to filter bug subscriptions by parameters also used in regular bug searches. |
34 |
|
35 |
CREATE TABLE BugSubscriptionFilterTag ( |
|
36 |
id serial PRIMARY KEY, |
|
37 |
filter integer REFERENCES BugSubscriptionFilter(id) NOT NULL, |
|
38 |
tag text NOT NULL, |
|
39 |
include boolean NOT NULL); |
|
40 |
||
7675.801.4
by Abel Deuring
renamed DB schema patch file; better indexes for the new tables |
41 |
CREATE INDEX bugsubscriptionfiltertag__filter__tag__idx |
42 |
ON BugSubscriptionFilterTag(filter, tag); |
|
7675.801.1
by Abel Deuring
DB schema patch adding tables which allow to filter bug subscriptions by parameters also used in regular bug searches. |
43 |
|
7675.801.4
by Abel Deuring
renamed DB schema patch file; better indexes for the new tables |
44 |
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 08, 0); |