Skip to content

public.quota_reservations

Description

Columns

NameTypeDefaultNullableChildrenParentsComment
iduuidgen_random_uuid()false
user_iduuidfalsepublic.users
event_typeusage_event_typefalse
reserved_amountintegerfalse
job_idbigintfalse
expires_attimestamp with time zone(now() + '01:00:00'::interval)false
created_attimestamp with time zonenow()false

Constraints

NameTypeDefinition
chk_reserved_amount_positiveCHECKCHECK ((reserved_amount > 0))
fk_quota_reservations_userFOREIGN KEYFOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
quota_reservations_pkeyPRIMARY KEYPRIMARY KEY (id)
uq_quota_reservations_job_idUNIQUEUNIQUE (job_id)

Indexes

NameDefinition
quota_reservations_pkeyCREATE UNIQUE INDEX quota_reservations_pkey ON public.quota_reservations USING btree (id)
uq_quota_reservations_job_idCREATE UNIQUE INDEX uq_quota_reservations_job_id ON public.quota_reservations USING btree (job_id)
idx_quota_reservations_expiresCREATE INDEX idx_quota_reservations_expires ON public.quota_reservations USING btree (expires_at)
idx_quota_reservations_user_eventCREATE INDEX idx_quota_reservations_user_event ON public.quota_reservations USING btree (user_id, event_type)

Relations


Generated by tbls

Open-source test coverage insights