launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27446
[Merge] ~ilasc/launchpad:add-store-upload-revision-to-snapbuild into launchpad:db-devel
Ioana Lasc has proposed merging ~ilasc/launchpad:add-store-upload-revision-to-snapbuild into launchpad:db-devel.
Commit message:
Add store_upload_revision to SnapBuild
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/407259
For the OSS compliance project we want to be able to find builds by store revision. Simplest way to keep that query (Snap.getBuilByStoreRevision) efficient is to add a store_upload_revision to SnapBuild.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:add-store-upload-revision-to-snapbuild into launchpad:db-devel.
diff --git a/database/schema/patch-2210-35-0.sql b/database/schema/patch-2210-35-0.sql
new file mode 100644
index 0000000..afb4d7d
--- /dev/null
+++ b/database/schema/patch-2210-35-0.sql
@@ -0,0 +1,11 @@
+-- Copyright 2021 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 store_upload_revision integer;
+
+COMMENT ON COLUMN SnapBuild.store_upload_revision IS 'The revision number assigned to this build on the last store upload.';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 35, 0);
\ No newline at end of file