mirror of
https://github.com/block/buzz.git
synced 2026-10-28 13:01:10 +00:00
Keep v1 natural drain with an optional UTC cutoff. Serialize claim and mint policy reads with restriction and owner writes. Share historical revocation repair across migration and desired-state upgrades while retaining deletion fences. Co-authored-by: Codex <codex@openai.com> Signed-off-by: Brad Seiler <seiler@squareup.com> Signed-off-by: Local Builder <1c476cb1127ea270cb900bdc3891060140bdd1173f91498030ee9b4db01c2f20@buzz.block.builderlab.xyz>
6 lines
270 B
PL/PgSQL
6 lines
270 B
PL/PgSQL
-- Serialize invitation admission with restriction and ownership changes per tenant.
|
|
CREATE FUNCTION invite_admission_lock(community UUID) RETURNS VOID
|
|
LANGUAGE sql AS $$
|
|
SELECT pg_advisory_xact_lock(hashtextextended('invite-admission:' || community::text, 0));
|
|
$$;
|