From 600cbbc92b2d69e475db702a9e7a0462b3ba63a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Fri, 16 Jan 2026 17:36:07 +0400 Subject: [PATCH] Fix iam membership profiles migration and add corresponding identities to trust center accesses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Émile Ré --- pkg/coredata/migrations/20260116T104702Z.sql | 2 +- pkg/coredata/migrations/20260116T170015Z.sql | 25 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 pkg/coredata/migrations/20260116T170015Z.sql diff --git a/pkg/coredata/migrations/20260116T104702Z.sql b/pkg/coredata/migrations/20260116T104702Z.sql index 537403921..8a9d824a8 100644 --- a/pkg/coredata/migrations/20260116T104702Z.sql +++ b/pkg/coredata/migrations/20260116T104702Z.sql @@ -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) -); \ No newline at end of file +); diff --git a/pkg/coredata/migrations/20260116T170015Z.sql b/pkg/coredata/migrations/20260116T170015Z.sql new file mode 100644 index 000000000..cf593eff8 --- /dev/null +++ b/pkg/coredata/migrations/20260116T170015Z.sql @@ -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;