Index

public.chatbot_conversation_suggested_messages

Description

Messages that the user is suggested to send to the chatbot next. New messages are generated after every chatbot message

Columns

Name Type Default Nullable Children Parents Comment
conversation_message_id uuid false public.chatbot_conversation_messages The chatbot conversation message after which this suggested message was generated. This is how we know which suggested messages to display at the current point in time.
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.
message varchar(32376) false The message that is suggested.
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
chatbot_conversation_suggested_conversation_message_id_not_null n NOT NULL conversation_message_id
chatbot_conversation_suggested_mes_conversation_message_id_fkey FOREIGN KEY FOREIGN KEY (conversation_message_id) REFERENCES chatbot_conversation_messages(id)
chatbot_conversation_suggested_messages_created_at_not_null n NOT NULL created_at
chatbot_conversation_suggested_messages_id_not_null n NOT NULL id
chatbot_conversation_suggested_messages_message_not_null n NOT NULL message
chatbot_conversation_suggested_messages_pkey PRIMARY KEY PRIMARY KEY (id)
chatbot_conversation_suggested_messages_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
chatbot_conversation_suggested_mess_conversation_message_id_idx CREATE INDEX chatbot_conversation_suggested_mess_conversation_message_id_idx ON public.chatbot_conversation_suggested_messages USING btree (conversation_message_id) WHERE (deleted_at IS NULL)
chatbot_conversation_suggested_messages_pkey CREATE UNIQUE INDEX chatbot_conversation_suggested_messages_pkey ON public.chatbot_conversation_suggested_messages USING btree (id)

Triggers

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

Relations

er

Generated by tbls