跳转至

public.instance_ai_messages

列

名称 类型 默认值 可空 子表 父表 备注
content text false
createdAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
id varchar(36) false
resourceId varchar(255) true
role varchar(16) false
threadId uuid false public.instance_ai_threads
type varchar(32) true
updatedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false

约束

名称 类型 定义
FK_1eeb64cb9d66a927988de759e6 FOREIGN KEY FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE
PK_156c6f287225e9befe0181bb02b PRIMARY KEY PRIMARY KEY (id)
instance_ai_messages_content_not_null n NOT NULL content
instance_ai_messages_createdAt_not_null n NOT NULL "createdAt"
instance_ai_messages_id_not_null n NOT NULL id
instance_ai_messages_role_not_null n NOT NULL role
instance_ai_messages_threadId_not_null n NOT NULL "threadId"
instance_ai_messages_updatedAt_not_null n NOT NULL "updatedAt"

索引

名称 定义
IDX_1eeb64cb9d66a927988de759e6 CREATE INDEX "IDX_1eeb64cb9d66a927988de759e6" ON public.instance_ai_messages USING btree ("threadId")
IDX_76e212c6867fbaa06bf0decd6f CREATE INDEX "IDX_76e212c6867fbaa06bf0decd6f" ON public.instance_ai_messages USING btree ("resourceId")
PK_156c6f287225e9befe0181bb02b CREATE UNIQUE INDEX "PK_156c6f287225e9befe0181bb02b" ON public.instance_ai_messages USING btree (id)

关系

erDiagram

"public.instance_ai_messages" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"

"public.instance_ai_messages" {
  text content
  timestamp_3__with_time_zone createdAt
  varchar_36_ id
  varchar_255_ resourceId
  varchar_16_ role
  uuid threadId FK
  varchar_32_ type
  timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_threads" {
  timestamp_3__with_time_zone createdAt
  uuid id
  json metadata
  varchar_36_ projectId FK
  varchar_255_ resourceId
  text title
  timestamp_3__with_time_zone updatedAt
}

由 tbls 生成

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 n8/n8n