Index

public.email_address_mail_budgets

Description

How many budgeted account mails (password resets, codes to unproven addresses) each inbox has been sent on a UTC day. Every address variant that reaches the same inbox shares one row. A mail is queued only while the day’s count is under the daily budget. Rows older than two days 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.
day date false The UTC day the mails were queued on.
inbox_key bytea false Keyed HMAC-SHA-256 of the recipient address reduced to its inbox (provider aliases, dots and +tags folded). Not reversible to an address and never used to identify an account.
mails_queued integer 1 false Budgeted mails queued to the inbox on the day.
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
email_address_mail_budgets_created_at_not_null n NOT NULL created_at
email_address_mail_budgets_day_not_null n NOT NULL day
email_address_mail_budgets_inbox_key_check CHECK CHECK ((length(inbox_key) = 32))
email_address_mail_budgets_inbox_key_not_null n NOT NULL inbox_key
email_address_mail_budgets_mails_queued_check CHECK CHECK ((mails_queued > 0))
email_address_mail_budgets_mails_queued_not_null n NOT NULL mails_queued
email_address_mail_budgets_pkey PRIMARY KEY PRIMARY KEY (inbox_key, day)
email_address_mail_budgets_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
email_address_mail_budgets_day CREATE INDEX email_address_mail_budgets_day ON public.email_address_mail_budgets USING btree (day)
email_address_mail_budgets_pkey CREATE UNIQUE INDEX email_address_mail_budgets_pkey ON public.email_address_mail_budgets USING btree (inbox_key, day)

Triggers

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

Relations

er

Generated by tbls