[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
The proposal to merge ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457880 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
The proposal to merge ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457880 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
Review: Approve db -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457880 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
Ines Almeida has proposed merging ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. Commit message: db: add DB table permissions to person-merge-job profile Requested reviews: William Grant (wgrant): db Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457880 A few unit tests are still failing due to table permissions for the new socialaccounts table. Looking through the failing tests, apart from a few intermittent failures, they seem to come mostly from the person merge job. I tested a handful of the failing tests locally -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. diff --git a/database/schema/security.cfg b/database/schema/security.cfg index ba96238..5407957 100644 --- a/database/schema/security.cfg +++ b/database/schema/security.cfg @@ -2459,6 +2459,7 @@ public.snapbase = SELECT, UPDATE public.snapbuild= SELECT, UPDATE public.snapsubscription = SELECT, UPDATE, DELETE public.snappyseries = SELECT, UPDATE +public.socialaccount= SELECT, INSERT, UPDATE public.sourcepackagename= SELECT public.sourcepackagepublishinghistory = SELECT, UPDATE public.sourcepackagerecipe = SELECT, UPDATE ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
Ines Almeida has proposed merging ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. Commit message: db: add DB table permissions to launchpad_main Requested reviews: William Grant (wgrant) Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457523 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. diff --git a/database/schema/security.cfg b/database/schema/security.cfg index 50328ff..ba96238 100644 --- a/database/schema/security.cfg +++ b/database/schema/security.cfg @@ -326,6 +326,7 @@ public.snapjob = SELECT, INSERT, UPDATE, DELETE public.snapsubscription = SELECT, INSERT, UPDATE, DELETE public.snappydistroseries = SELECT, INSERT, UPDATE, DELETE public.snappyseries = SELECT, INSERT, UPDATE, DELETE +public.socialaccount= SELECT, INSERT, UPDATE, DELETE public.sourcepackageformatselection = SELECT public.sourcepackagepublishinghistory = SELECT public.sourcepackagerecipe = SELECT, INSERT, UPDATE, DELETE ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
- Updated to the singular form, but we have a bunch of tables with PascalCase looking at recent patches? - Added. Guruprasad had already suggested it. I didn't add it from the start because I doubt we will use it in the UI + API, but I agree it doesn't hurt to add and can be good for debugging. - Yes, but we wont' do that right now. For now the focus is adding a new social platform in a way that is sustainable to add others later; later we might migrate those existing tables. -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457221 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
Re: [Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
Launchpad PostgreSQL table names are lowercase and singular: it should be "socialaccount". Should we have an index on platform as well, to make debugging and maintenance operations easier? Could this replace the existing ircid, jabberid, wikiname tables? -- https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457221 Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp
[Launchpad-reviewers] [Merge] ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel
Ines Almeida has proposed merging ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. Commit message: db: create new SocialAccounts table Requested reviews: William Grant (wgrant): db Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/457221 This is the initial step for the Matrix integration with Launchpad -- Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:db-add-social-accounts-table into launchpad:db-devel. diff --git a/database/schema/patch-2211-25-0.sql b/database/schema/patch-2211-25-0.sql new file mode 100644 index 000..11be02c --- /dev/null +++ b/database/schema/patch-2211-25-0.sql @@ -0,0 +1,19 @@ +-- Copyright 2023 Canonical Ltd. This software is licensed under the +-- GNU Affero General Public License version 3 (see the file LICENSE). + +SET client_min_messages=ERROR; + +CREATE TABLE SocialAccounts ( +id serial PRIMARY KEY, +person integer REFERENCES Person NOT NULL, +platform integer NOT NULL, +identifier jsonb NOT NULL +); + +COMMENT ON COLUMN SocialAccounts.person IS 'Person the social media account belongs to.'; +COMMENT ON COLUMN SocialAccounts.platform IS 'Social media platform.'; +COMMENT ON COLUMN SocialAccounts.identifier IS 'Identifier for the social media account (JSON format specific per social media platform).'; + +CREATE INDEX socialaccounts__person__idx ON SocialAccounts (person); + +INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 25, 0); ___ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp