Changelog - 2026-08-31
PolicyDefinition domain split - Release B
Breaking Change Migration RequiredIn one line. domain_type and domain_id are now the only stored form of a policy's domain, and the domain column can be dropped.
WARNING
Ship Release A first, deploy every consumer, verify the backfill, then ship this. Release B removes the column Release A was still reading.
What changed
ScopedCasbinAdapterbuilds the<Type>_<id>domain token fromdomain_typeanddomain_id. Enforcement is unchanged.AuthorizationPolicyBuilderno longer emitsdomain.grant,customGrantandassignRolewrite onlydomainTypeanddomainId, andserializeDomainis removed.extraPolicyDefinitionColumnsno longer declaresdomain.- A null domain is still
ANY_MEMBER.
Who is affected
- Anyone reading the
domaincolumn directly. Readdomain_typeanddomain_idinstead. - Anyone inserting rows built by
AuthorizationPolicyBuilder. Thedomainfield is gone from the row. - Anyone who has not run the Release A backfill. Do not deploy this release; the pair is the only source now.
Breaking changes
Run this after every consumer is on this release. Until then, old code still selects the column.
sql
ALTER TABLE policy_definitions DROP COLUMN domain;CAUTION
Do not verify a backfill with a SELECT that follows the UPDATE. With a pooler or a read replica, the read can land on a node that has not caught up and report zero rows changed while the write succeeded. Count from the write itself with RETURNING.