# public.chat_hub_session_tools ## Columns | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | sessionId | uuid | | false | | [public.chat_hub_sessions](public.chat_hub_sessions.md) | | | toolId | uuid | | false | | [public.chat_hub_tools](public.chat_hub_tools.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | FK_6596a328affd8d4967ffb303eee | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE | | FK_e649bf1295f4ed8d4299ed290f9 | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE | | PK_87aea76ff4c274c4a5ac838ebe3 | PRIMARY KEY | PRIMARY KEY ("sessionId", "toolId") | | chat_hub_session_tools_sessionId_not_null | n | NOT NULL "sessionId" | | chat_hub_session_tools_toolId_not_null | n | NOT NULL "toolId" | ## Indexes | Name | Definition | | ---- | ---------- | | PK_87aea76ff4c274c4a5ac838ebe3 | CREATE UNIQUE INDEX "PK_87aea76ff4c274c4a5ac838ebe3" ON public.chat_hub_session_tools USING btree ("sessionId", "toolId") | ## Relations ```mermaid erDiagram "public.chat_hub_session_tools" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" "public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" "public.chat_hub_session_tools" { uuid sessionId FK uuid toolId FK } "public.chat_hub_sessions" { uuid agentId FK varchar_128_ agentName timestamp_3__with_time_zone createdAt varchar_36_ credentialId FK uuid id timestamp_3__with_time_zone lastMessageAt varchar_256_ model uuid ownerId FK varchar_16_ provider varchar_256_ title varchar_16_ type timestamp_3__with_time_zone updatedAt varchar_36_ workflowId FK } "public.chat_hub_tools" { timestamp_3__with_time_zone createdAt json definition boolean enabled uuid id varchar_255_ name uuid ownerId FK varchar_255_ type double_precision typeVersion timestamp_3__with_time_zone updatedAt } ``` --- > Generated by [tbls](https://github.com/k1LoW/tbls)