An email delivery table, which contains info about if an email has been sent to an user or if it failed
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. | |||
email_template_id | uuid | false | public.email_templates | The email template that is being sent in this email delivery. | ||
error | varchar(255) | NULL::character varying | true | If null, no error has occurred with sending. Otherwise the field contains the error as a string. | ||
id | uuid | uuid_generate_v4() | false | A unique, stable identifier for the record. | ||
sent | boolean | false | false | Whether the email was sent or not. If false, a background daemon will try to send this email message. | ||
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. | ||
user_id | uuid | false | public.users | The user to whom the email should be sent to. If the email template contains dynamic portions with user-specific information (like a grade from a course) this user_id will be used to derive the information. |
Name | Type | Definition |
---|---|---|
email_deliveries_created_at_not_null | n | NOT NULL created_at |
email_deliveries_email_template_id_not_null | n | NOT NULL email_template_id |
email_deliveries_id_not_null | n | NOT NULL id |
email_deliveries_pkey | PRIMARY KEY | PRIMARY KEY (id) |
email_deliveries_sent_not_null | n | NOT NULL sent |
email_deliveries_updated_at_not_null | n | NOT NULL updated_at |
email_deliveries_user_id_fkey | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users(id) |
email_deliveries_user_id_not_null | n | NOT NULL user_id |
email_template_fk | FOREIGN KEY | FOREIGN KEY (email_template_id) REFERENCES email_templates(id) |
Name | Definition |
---|---|
email_deliveries_pkey | CREATE UNIQUE INDEX email_deliveries_pkey ON public.email_deliveries USING btree (id) |
Name | Definition |
---|---|
set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.email_deliveries FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls