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:
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