Mint certificate GIDs with entity type 106
Certificate backfill migrations used entity type 104, which belongs to commitment groups. Use 106 so migrated certificate IDs decode correctly. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -42,7 +42,7 @@ CREATE INDEX idx_certificates_http_challenge_token ON certificates(http_challeng
|
|||||||
WHERE http_challenge_token IS NOT NULL;
|
WHERE http_challenge_token IS NOT NULL;
|
||||||
|
|
||||||
-- Backfill one certificate per existing custom domain. A fresh GID is minted
|
-- Backfill one certificate per existing custom domain. A fresh GID is minted
|
||||||
-- for each row with generate_gid (entity type 104 = CertificateEntityType).
|
-- for each row with generate_gid (entity type 106 = CertificateEntityType).
|
||||||
-- The certificate hostname equals the custom domain name, which lets us link
|
-- The certificate hostname equals the custom domain name, which lets us link
|
||||||
-- the two afterwards.
|
-- the two afterwards.
|
||||||
INSERT INTO certificates (
|
INSERT INTO certificates (
|
||||||
@@ -65,7 +65,7 @@ INSERT INTO certificates (
|
|||||||
updated_at
|
updated_at
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
generate_gid(decode_base64_unpadded(cd.tenant_id), 104),
|
generate_gid(decode_base64_unpadded(cd.tenant_id), 106),
|
||||||
cd.tenant_id,
|
cd.tenant_id,
|
||||||
cd.domain,
|
cd.domain,
|
||||||
cd.ssl_certificate,
|
cd.ssl_certificate,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ minted_certificates AS (
|
|||||||
updated_at
|
updated_at
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
generate_gid(decode_base64_unpadded(pp.tenant_id), 104),
|
generate_gid(decode_base64_unpadded(pp.tenant_id), 106),
|
||||||
pp.tenant_id,
|
pp.tenant_id,
|
||||||
pp.hostname,
|
pp.hostname,
|
||||||
'PENDING'::custom_domain_ssl_status,
|
'PENDING'::custom_domain_ssl_status,
|
||||||
|
|||||||
Reference in New Issue
Block a user