Load identity email_address on coredata.MembershipProfile

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-03 19:45:03 +04:00
parent e156a428d4
commit 6328952c6f
7 changed files with 95 additions and 54 deletions

View File

@@ -1,6 +1,8 @@
-- 1. Add peoples column onto profiles
ALTER TABLE
iam_membership_profiles
ADD
COLUMN identity_id REFERENCES identities(id) NOT NULL,
ADD
COLUMN additional_email_addresses CITEXT [] NOT NULL,
ADD
@@ -12,6 +14,15 @@ ADD
ADD
COLUMN position TEXT;
UPDATE
iam_membership_profiles mp
SET
identity_id = m.identity_id
FROM
iam_memberships m
WHERE
m.id = mp.membership_id;
-- 2. Add profile references to all table referencing peoples
-- was owner_id, NOT NULL
ALTER TABLE