public.instance_ai_events¶
列¶
| 名称 | 类型 | 默认值 | 可空 | 子项 | 父项 | 注释 |
|---|---|---|---|---|---|---|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| payload | text | false | 规范 InstanceAiEvent 的 JSON | |||
| runId | varchar(64) | false | 发出事件的运行 — 来自代理运行时的不透明 ID | |||
| seq | integer | false | 线程内单调递增序列 — SSE 重放游标 | |||
| threadId | uuid | false | public.instance_ai_threads | |||
| type | varchar(64) | false | 事件类型判别器,从 payload 中冗余提取 | |||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |
约束¶
| 名称 | 类型 | 定义 |
|---|---|---|
| FK_35909c5576a4a6c1d6a6fb71caa | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_12489cd6197feeac2089acc7ef6 | PRIMARY KEY | PRIMARY KEY ("threadId", seq) |
| instance_ai_events_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_events_payload_not_null | n | NOT NULL payload |
| instance_ai_events_runId_not_null | n | NOT NULL "runId" |
| instance_ai_events_seq_not_null | n | NOT NULL seq |
| instance_ai_events_threadId_not_null | n | NOT NULL "threadId" |
| instance_ai_events_type_not_null | n | NOT NULL type |
| instance_ai_events_updatedAt_not_null | n | NOT NULL "updatedAt" |
索引¶
| 名称 | 定义 |
|---|---|
| IDX_32cdd799675715fb1d2a8683e9 | CREATE INDEX "IDX_32cdd799675715fb1d2a8683e9" ON public.instance_ai_events USING btree ("threadId", "runId") |
| PK_12489cd6197feeac2089acc7ef6 | CREATE UNIQUE INDEX "PK_12489cd6197feeac2089acc7ef6" ON public.instance_ai_events USING btree ("threadId", seq) |
关系¶
erDiagram
"public.instance_ai_events" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_events" {
timestamp_3__with_time_zone createdAt
text payload
varchar_64_ runId
integer seq
uuid threadId FK
varchar_64_ 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