launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19423
[Merge] lp:~cjwatson/launchpad/db-bzr-webhooks into lp:launchpad/db-devel
Colin Watson has proposed merging lp:~cjwatson/launchpad/db-bzr-webhooks into lp:launchpad/db-devel.
Commit message:
Add Webhook.branch.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #342729 in Launchpad itself: "Should support post-commit webhooks"
https://bugs.launchpad.net/launchpad/+bug/342729
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/db-bzr-webhooks/+merge/272229
Add Webhook.branch. It's relatively easy to get Bazaar branch webhooks working given this.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/db-bzr-webhooks into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2209-66-1.sql'
--- database/schema/patch-2209-66-1.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-66-1.sql 2015-09-24 12:10:24 +0000
@@ -0,0 +1,14 @@
+-- Copyright 2015 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE Webhook ADD COLUMN branch integer REFERENCES Branch;
+
+ALTER TABLE Webhook DROP CONSTRAINT webhook_git_repository_check;
+ALTER TABLE Webhook ADD CONSTRAINT one_target CHECK ((git_repository IS NOT NULL) != (branch IS NOT NULL));
+
+CREATE INDEX webhook__branch__id__idx
+ ON webhook(branch, id) WHERE branch IS NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 66, 1);