The policy version of row-level security: the migration number.
A migration that changes a policy appends its own version in the same transaction as its DDL. So the rules and the record of what they became commit together or not at all, and a decision after it names that number. the events document under "Policy version" has the event and what it carries.
The content is the policies as pg_policy renders them. A version
carries it by value under the cap the caller gives, and as a pointer to
the tables above it. The content hash is the SHA-256 of that text either
way.
Summary
Functions
@spec of(module(), [Mediate.Postgres.Policy.t()], keyword()) :: Mediate.PolicyVersion.t()
The version a migration publishes, from the policies it read back.
Requires version:, author:, approval:, at:, and content_bytes:.
@spec publish(Mediate.PolicyVersion.t()) :: {:ok, Mediate.PolicyVersion.t()}
Emit the version once per call, and answer the version it emitted.
@spec telemetry_event() :: [atom()]
The telemetry event publish/1 emits, once per call.