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:
@@ -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)
|
||||
);
|
||||
);
|
||||
|
||||
25
pkg/coredata/migrations/20260116T170015Z.sql
Normal file
25
pkg/coredata/migrations/20260116T170015Z.sql
Normal 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;
|
||||
Reference in New Issue
Block a user