Index

public.altcha_spent_challenges

Description

Form challenges already redeemed by a form submission, so each solved challenge is accepted once. Kept until the challenge expires, after which it is refused anyway; expired rows are hard-deleted.

Columns

Name Type Default Nullable Children Parents Comment
created_at timestamp with time zone now() false Timestamp when the record was created.
expires_at timestamp with time zone false When the challenge expires.
signature_digest bytea false SHA-256 of the challenge’s server signature, which identifies the challenge.
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.

Constraints

Name Type Definition
altcha_spent_challenges_created_at_not_null n NOT NULL created_at
altcha_spent_challenges_expires_at_not_null n NOT NULL expires_at
altcha_spent_challenges_pkey PRIMARY KEY PRIMARY KEY (signature_digest)
altcha_spent_challenges_signature_digest_check CHECK CHECK ((length(signature_digest) = 32))
altcha_spent_challenges_signature_digest_not_null n NOT NULL signature_digest
altcha_spent_challenges_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
altcha_spent_challenges_expires_at CREATE INDEX altcha_spent_challenges_expires_at ON public.altcha_spent_challenges USING btree (expires_at)
altcha_spent_challenges_pkey CREATE UNIQUE INDEX altcha_spent_challenges_pkey ON public.altcha_spent_challenges USING btree (signature_digest)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.altcha_spent_challenges FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls