Index

public.credit_registration_daily_attention_snapshots

Description

The Needs attention count once a day, for its trend line. No history before the table existed.

Columns

Name Type Default Nullable Children Parents Comment
created_at timestamp with time zone now() false Timestamp when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
needs_attention_count integer false The Needs attention count when the snapshot was taken: the same number as the tab badge.
snapshot_date date false The UTC day this row describes.
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
credit_registration_daily_attent_needs_attention_count_not_null n NOT NULL needs_attention_count
credit_registration_daily_attention_snap_snapshot_date_not_null n NOT NULL snapshot_date
credit_registration_daily_attention_snapsho_created_at_not_null n NOT NULL created_at
credit_registration_daily_attention_snapsho_updated_at_not_null n NOT NULL updated_at
credit_registration_daily_attention_snapshots_count CHECK CHECK ((needs_attention_count >= 0))
credit_registration_daily_attention_snapshots_id_not_null n NOT NULL id
credit_registration_daily_attention_snapshots_pkey PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
credit_registration_daily_attention_snapshots_pkey CREATE UNIQUE INDEX credit_registration_daily_attention_snapshots_pkey ON public.credit_registration_daily_attention_snapshots USING btree (id)
uq_credit_registration_daily_attention_snapshots CREATE UNIQUE INDEX uq_credit_registration_daily_attention_snapshots ON public.credit_registration_daily_attention_snapshots USING btree (snapshot_date, deleted_at) NULLS NOT DISTINCT

Triggers

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

Relations

er

Generated by tbls