mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
11 lines
544 B
SQL
11 lines
544 B
SQL
-- Durable, deployment-global authority for the public NIP-PL push gateway.
|
|
-- This state is intentionally outside relay community tenancy: installations
|
|
-- delegate to relay signing keys and may authorize multiple relay deployments.
|
|
CREATE TABLE push_gateway_challenges (
|
|
id UUID PRIMARY KEY,
|
|
challenge_hash BYTEA NOT NULL CHECK (length(challenge_hash) = 32),
|
|
expires_at TIMESTAMPTZ NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
CREATE INDEX push_gateway_challenges_expiry ON push_gateway_challenges (expires_at);
|