~launchpad-pqm/launchpad/devel

7675.1059.2 by Danilo Segan
Add a DB patch to introduce BugNotificationFilter table.
1
-- Copyright 2011 Canonical Ltd.  This software is licensed under the
2
-- GNU Affero General Public License version 3 (see the file LICENSE).
3
SET client_min_messages=ERROR;
4
5
CREATE TABLE BugNotificationFilter (
12411.5.7 by Danilo Segan
Update the DB patch as per Stuart's suggestions.
6
    bug_notification INTEGER NOT NULL
7
      REFERENCES BugNotification(id)
8
      ON DELETE CASCADE,
9
    bug_subscription_filter INTEGER NOT NULL
10
      REFERENCES BugSubscriptionFilter(id)
11
      ON DELETE CASCADE,
12
    CONSTRAINT bugnotificationfilter_pkey
13
      PRIMARY KEY (bug_notification, bug_subscription_filter)
14
    );
15
16
CREATE INDEX BugNotificationFilter__bug_subscription_filter__idx
17
  ON BugNotificationFilter(bug_subscription_filter);
18
19
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 50, 0);