← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/db-snap-revision-id into lp:launchpad/db-devel

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/db-snap-revision-id into lp:launchpad/db-devel.

Commit message:
Add SnapBuild.revision_id.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1679157 in Launchpad itself: "Collect revision information for snap builds"
  https://bugs.launchpad.net/launchpad/+bug/1679157

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/db-snap-revision-id/+merge/321688

In future we might have more information in the form of some kind of manifest from snapcraft.  However, I think it's still justified for this to be handled separately, because we can discover the tip revision of the top-level branch very early in the build and usefully expose it.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/db-snap-revision-id into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2209-69-8.sql'
--- database/schema/patch-2209-69-8.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-69-8.sql	2017-04-03 12:37:00 +0000
@@ -0,0 +1,10 @@
+-- Copyright 2017 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 SnapBuild ADD COLUMN revision_id text;
+
+COMMENT ON COLUMN SnapBuild.revision_id IS 'The revision ID of the branch used for this build, if available.';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 69, 8);