Add migration to fix wrong GIDs

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-19 18:34:11 +04:00
parent 8559a11be5
commit acdbc79a8f
3 changed files with 14 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
UPDATE
iam_memberships m
SET
id = generate_gid(decode_base64_unpadded(o.tenant_id), 39)
FROM
organizations o
WHERE
o.id = m.organization_id
AND extract_entity_type(parse_gid(m.id)) = 38;