Fix iam membership profiles migration and add corresponding identities to trust center accesses

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-16 17:36:07 +04:00
committed by Bryan Frimin
parent 3669df3f8a
commit 600cbbc92b
2 changed files with 26 additions and 1 deletions

View File

@@ -3,4 +3,4 @@ CREATE TABLE iam_tokens (
hashed_value BYTEA NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
CONSTRAINT iam_tokens_hashed_value_unique UNIQUE (hashed_value)
);
);

View File

@@ -0,0 +1,25 @@
WITH tas AS (
SELECT
name,
email
FROM
trust_center_accesses
)
INSERT INTO
identities (
id,
created_at,
updated_at,
email_address,
email_address_verified,
full_name
)
SELECT
generate_gid('\x0000000000000000' :: bytea, 11),
NOW(),
NOW(),
email,
'F',
name
FROM
tas ON CONFLICT DO NOTHING;