Move trust center profile onto the page
Store website, email, and headquarters on the trust center so public and admin surfaces read branding from one place. Drop the trust API organization type and wire console, MCP, CLI, and apps through the updated schema. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -389,10 +389,7 @@ WITH combined AS (
|
||||
COALESCE(cf.organization_id, tc.organization_id) AS organization_id,
|
||||
COALESCE(cf.trust_center_id, tc.id) AS trust_center_id,
|
||||
f.id AS framework_id,
|
||||
CASE
|
||||
WHEN cf.id IS NOT NULL THEN cf.rank
|
||||
ELSE COALESCE(MAX(cf.rank) OVER (), 0) + ROW_NUMBER() OVER (PARTITION BY (cf.id IS NULL) ORDER BY f.created_at)
|
||||
END AS rank,
|
||||
ROW_NUMBER() OVER (ORDER BY f.created_at, f.id) AS rank,
|
||||
CASE WHEN cf.id IS NULL THEN 'NONE' ELSE 'PUBLIC' END AS visibility,
|
||||
COALESCE(cf.created_at, f.created_at) AS created_at,
|
||||
COALESCE(cf.updated_at, f.updated_at) AS updated_at
|
||||
|
||||
24
pkg/coredata/migrations/20260710T144904Z.sql
Normal file
24
pkg/coredata/migrations/20260710T144904Z.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- Copyright (c) 2026 Probo Inc <hello@probo.com>.
|
||||
--
|
||||
-- Permission to use, copy, modify, and/or distribute this software for any
|
||||
-- purpose with or without fee is hereby granted, provided that the above
|
||||
-- copyright notice and this permission notice appear in all copies.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
-- PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ALTER TABLE trust_centers
|
||||
ADD COLUMN page_title TEXT;
|
||||
|
||||
UPDATE trust_centers tc
|
||||
SET page_title = o.name
|
||||
FROM organizations o
|
||||
WHERE tc.organization_id = o.id;
|
||||
|
||||
ALTER TABLE trust_centers
|
||||
ALTER COLUMN page_title SET NOT NULL;
|
||||
16
pkg/coredata/migrations/20260710T152544Z.sql
Normal file
16
pkg/coredata/migrations/20260710T152544Z.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Copyright (c) 2026 Probo Inc <hello@probo.com>.
|
||||
--
|
||||
-- Permission to use, copy, modify, and/or distribute this software for any
|
||||
-- purpose with or without fee is hereby granted, provided that the above
|
||||
-- copyright notice and this permission notice appear in all copies.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
-- PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ALTER TABLE trust_centers
|
||||
RENAME COLUMN page_title TO title;
|
||||
@@ -49,6 +49,7 @@ type (
|
||||
NonDisclosureAgreementFileID *gid.GID `db:"non_disclosure_agreement_file_id"`
|
||||
DefaultDomainID *gid.GID `db:"default_domain_id"`
|
||||
CustomDomainID *gid.GID `db:"custom_domain_id"`
|
||||
Title string `db:"title"`
|
||||
Description *string `db:"description"`
|
||||
WebsiteURL *string `db:"website_url"`
|
||||
Email *string `db:"email"`
|
||||
@@ -128,6 +129,7 @@ SELECT
|
||||
non_disclosure_agreement_file_id,
|
||||
default_domain_id,
|
||||
custom_domain_id,
|
||||
title,
|
||||
description,
|
||||
website_url,
|
||||
email,
|
||||
@@ -186,6 +188,7 @@ SELECT
|
||||
non_disclosure_agreement_file_id,
|
||||
default_domain_id,
|
||||
custom_domain_id,
|
||||
title,
|
||||
description,
|
||||
website_url,
|
||||
email,
|
||||
@@ -244,6 +247,7 @@ SELECT
|
||||
non_disclosure_agreement_file_id,
|
||||
default_domain_id,
|
||||
custom_domain_id,
|
||||
title,
|
||||
description,
|
||||
website_url,
|
||||
email,
|
||||
@@ -302,6 +306,7 @@ SELECT
|
||||
non_disclosure_agreement_file_id,
|
||||
default_domain_id,
|
||||
custom_domain_id,
|
||||
title,
|
||||
description,
|
||||
website_url,
|
||||
email,
|
||||
@@ -360,6 +365,7 @@ SELECT
|
||||
non_disclosure_agreement_file_id,
|
||||
default_domain_id,
|
||||
custom_domain_id,
|
||||
title,
|
||||
description,
|
||||
website_url,
|
||||
email,
|
||||
@@ -414,6 +420,7 @@ INSERT INTO trust_centers (
|
||||
non_disclosure_agreement_file_id,
|
||||
default_domain_id,
|
||||
custom_domain_id,
|
||||
title,
|
||||
description,
|
||||
website_url,
|
||||
email,
|
||||
@@ -433,6 +440,7 @@ INSERT INTO trust_centers (
|
||||
@non_disclosure_agreement_file_id,
|
||||
@default_domain_id,
|
||||
@custom_domain_id,
|
||||
@title,
|
||||
@description,
|
||||
@website_url,
|
||||
@email,
|
||||
@@ -455,6 +463,7 @@ INSERT INTO trust_centers (
|
||||
"non_disclosure_agreement_file_id": tc.NonDisclosureAgreementFileID,
|
||||
"default_domain_id": tc.DefaultDomainID,
|
||||
"custom_domain_id": tc.CustomDomainID,
|
||||
"title": tc.Title,
|
||||
"description": tc.Description,
|
||||
"website_url": tc.WebsiteURL,
|
||||
"email": tc.Email,
|
||||
@@ -493,6 +502,7 @@ SET
|
||||
non_disclosure_agreement_file_id = @non_disclosure_agreement_file_id,
|
||||
default_domain_id = @default_domain_id,
|
||||
custom_domain_id = @custom_domain_id,
|
||||
title = @title,
|
||||
description = @description,
|
||||
website_url = @website_url,
|
||||
email = @email,
|
||||
@@ -515,6 +525,7 @@ WHERE
|
||||
"non_disclosure_agreement_file_id": tc.NonDisclosureAgreementFileID,
|
||||
"default_domain_id": tc.DefaultDomainID,
|
||||
"custom_domain_id": tc.CustomDomainID,
|
||||
"title": tc.Title,
|
||||
"description": tc.Description,
|
||||
"website_url": tc.WebsiteURL,
|
||||
"email": tc.Email,
|
||||
|
||||
Reference in New Issue
Block a user