public.agents_observation_locks¶
列¶
| 名称 | 类型 | 默认值 | 可空 | 子表 | 父表 | 备注 |
|---|---|---|---|---|---|---|
| agentId | varchar(36) | false | public.agents | 拥有此锁的 Agent | ||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| heldUntil | timestamp(3) with time zone | false | ||||
| holderId | varchar(64) | false | 临时后台任务锁的拥有者令牌,不是用户 ID | |||
| observationScopeId | varchar(255) | false | public.agents_threads | 用于观察任务而被锁定的 agents_threads.id 源流 | ||
| taskKind | varchar(20) | false | ||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |
约束¶
| 名称 | 类型 | 定义 |
|---|---|---|
| CHK_agents_observation_locks_taskKind | CHECK | CHECK ((("taskKind")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[]))) |
| FK_093e44ae20f2518e97d83a95433 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_6b55089892e447c2f82e5ec60ed | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| PK_7e2e315162ac3d80587e15ac2c3 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId", "taskKind") |
| agents_observation_locks_agentId_not_null | n | NOT NULL "agentId" |
| agents_observation_locks_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_observation_locks_heldUntil_not_null | n | NOT NULL "heldUntil" |
| agents_observation_locks_holderId_not_null | n | NOT NULL "holderId" |
| agents_observation_locks_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
| agents_observation_locks_taskKind_not_null | n | NOT NULL "taskKind" |
| agents_observation_locks_updatedAt_not_null | n | NOT NULL "updatedAt" |
索引¶
| 名称 | 定义 |
|---|---|
| IDX_6b55089892e447c2f82e5ec60e | CREATE INDEX "IDX_6b55089892e447c2f82e5ec60e" ON public.agents_observation_locks USING btree ("observationScopeId") |
| PK_7e2e315162ac3d80587e15ac2c3 | CREATE UNIQUE INDEX "PK_7e2e315162ac3d80587e15ac2c3" ON public.agents_observation_locks USING btree ("agentId", "observationScopeId", "taskKind") |
关系¶
erDiagram
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_locks" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_observation_locks" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
varchar_64_ holderId
varchar_255_ observationScopeId FK
varchar_20_ taskKind
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ activeVersionId FK
varchar_36_ approvalWorkflowId FK
boolean availableInMCP
timestamp_3__with_time_zone createdAt
varchar_36_ id
uuid identityId FK
json integrations
boolean isArchived
varchar_128_ name
varchar_36_ parentFolderId FK
varchar_255_ projectId FK
integer publicationRevision
integer revision
json schema
varchar_16_ scope
timestamp_3__with_time_zone setupCompletedAt
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents_threads" {
timestamp_3__with_time_zone createdAt
varchar_128_ id
text metadata
varchar_255_ resourceId
varchar_255_ title
timestamp_3__with_time_zone updatedAt
}由 tbls 生成
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 n8/n8n