Merge ~ines-almeida/launchpad:merge-db-stable into launchpad:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: 19c8faba628a8d0c9996d68cbdab1f97b9bdd4a4
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:merge-db-stable
Merge into: launchpad:master
Diff against target: 46 lines (+22/-0)
2 files modified
database/schema/patch-2211-25-0.sql (+20/-0)
database/schema/security.cfg (+2/-0)
Reviewer Review Type Date Requested Status
Ines Almeida Approve
Review via email: mp+458356@code.launchpad.net

Commit message

Merge db-stable 19c8faba628a8d0c9996d68cbdab1f97b9bdd4a4 (add social accounts table)

To post a comment you must log in.
Revision history for this message
Ines Almeida (ines-almeida) wrote :

Auto approving (post deployment merge)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2211-25-0.sql b/database/schema/patch-2211-25-0.sql
2new file mode 100644
3index 0000000..ae06dd7
4--- /dev/null
5+++ b/database/schema/patch-2211-25-0.sql
6@@ -0,0 +1,20 @@
7+-- Copyright 2023 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+CREATE TABLE SocialAccount (
13+ id serial PRIMARY KEY,
14+ person integer REFERENCES Person NOT NULL,
15+ platform integer NOT NULL,
16+ identity jsonb NOT NULL
17+);
18+
19+COMMENT ON COLUMN SocialAccount.person IS 'Person the social media account belongs to.';
20+COMMENT ON COLUMN SocialAccount.platform IS 'Social media platform.';
21+COMMENT ON COLUMN SocialAccount.identity IS 'Data for identifying the social media account (JSON format specific per social media platform).';
22+
23+CREATE INDEX socialaccount__person__idx ON SocialAccount (person);
24+CREATE INDEX socialaccount__platform__idx ON SocialAccount (platform);
25+
26+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 25, 0);
27diff --git a/database/schema/security.cfg b/database/schema/security.cfg
28index 50328ff..5407957 100644
29--- a/database/schema/security.cfg
30+++ b/database/schema/security.cfg
31@@ -326,6 +326,7 @@ public.snapjob = SELECT, INSERT, UPDATE, DELETE
32 public.snapsubscription = SELECT, INSERT, UPDATE, DELETE
33 public.snappydistroseries = SELECT, INSERT, UPDATE, DELETE
34 public.snappyseries = SELECT, INSERT, UPDATE, DELETE
35+public.socialaccount = SELECT, INSERT, UPDATE, DELETE
36 public.sourcepackageformatselection = SELECT
37 public.sourcepackagepublishinghistory = SELECT
38 public.sourcepackagerecipe = SELECT, INSERT, UPDATE, DELETE
39@@ -2458,6 +2459,7 @@ public.snapbase = SELECT, UPDATE
40 public.snapbuild = SELECT, UPDATE
41 public.snapsubscription = SELECT, UPDATE, DELETE
42 public.snappyseries = SELECT, UPDATE
43+public.socialaccount = SELECT, INSERT, UPDATE
44 public.sourcepackagename = SELECT
45 public.sourcepackagepublishinghistory = SELECT, UPDATE
46 public.sourcepackagerecipe = SELECT, UPDATE

Subscribers

People subscribed via source and target branches

to status/vote changes: