Merge ~pappacena/launchpad:db-patch-oci-project-admin into launchpad:db-devel

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: d55d3ea98b01000abdc56c905e3ed4e8258d9c00
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:db-patch-oci-project-admin
Merge into: launchpad:db-devel
Diff against target: 21 lines (+15/-0)
1 file modified
database/schema/patch-2210-14-0.sql (+15/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) db Approve
Review via email: mp+381320@code.launchpad.net

This proposal supersedes a proposal from 2020-03-27.

Commit message

Database patch creating Distribution.oci_project_admin column, which should be used to grant permission to person/team that can manage OCI projects.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Needs Fixing
Revision history for this message
Thiago F. Pappacena (pappacena) :
Revision history for this message
William Grant (wgrant) :
d55d3ea... by Thiago F. Pappacena

Adding index and comment on distribution.oci_project_admin db column

Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

Pushed index creation and comment on the table.

Revision history for this message
Colin Watson (cjwatson) :
review: Approve (db)
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

I'm going to top-approve this one.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-14-0.sql b/database/schema/patch-2210-14-0.sql
2new file mode 100644
3index 0000000..915fe5d
4--- /dev/null
5+++ b/database/schema/patch-2210-14-0.sql
6@@ -0,0 +1,15 @@
7+-- Copyright 2020 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
9+
10+SET client_min_messages=ERROR;
11+
12+ALTER TABLE distribution
13+ ADD COLUMN oci_project_admin integer REFERENCES person;
14+
15+COMMENT ON COLUMN distribution.oci_project_admin
16+ IS 'Person or team with privileges to manage OCI Projects.';
17+
18+CREATE INDEX distribution__oci_project_admin__idx
19+ ON distribution (oci_project_admin);
20+
21+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 14, 0);