launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24718
[Merge] ~pappacena/launchpad:db-patch-ociproject-project-pillar into launchpad:db-devel
Thiago F. Pappacena has proposed merging ~pappacena/launchpad:db-patch-ociproject-project-pillar into launchpad:db-devel.
Commit message:
Adding OCIProject.product database column.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/383819
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:db-patch-ociproject-project-pillar into launchpad:db-devel.
diff --git a/database/schema/patch-2210-16-0.sql b/database/schema/patch-2210-16-0.sql
new file mode 100644
index 0000000..580208d
--- /dev/null
+++ b/database/schema/patch-2210-16-0.sql
@@ -0,0 +1,13 @@
+-- Copyright 2020 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 OCIProject ADD COLUMN product integer REFERENCES product;
+
+COMMENT ON COLUMN OCIProject.product
+ IS 'The project that this OCI project is associated with.';
+
+CREATE INDEX ociproject__product__idx ON OCIProject (product);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 16, 0);