跳转至

public.instance_ai_observation_locks

列

名称 类型 默认值 可空 子表 父表 注释
createdAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false
heldUntil timestamp(3) with time zone false
holderId varchar(64) false 临时后台任务锁持有者令牌,不是用户 ID
observationScopeId uuid false public.instance_ai_threads instance_ai_threads.id 源流,为观察任务锁定
taskKind varchar(20) false
updatedAt timestamp(3) with time zone CURRENT_TIMESTAMP(3) false

约束

名称 类型 定义
CHK_instance_ai_observation_locks_taskKind CHECK CHECK ((("taskKind")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[])))
FK_103e2e5f454860b28ea05a82c74 FOREIGN KEY FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE
PK_fc491dd378b9448655c3c683f85 PRIMARY KEY PRIMARY KEY ("observationScopeId", "taskKind")
instance_ai_observation_locks_createdAt_not_null n NOT NULL "createdAt"
instance_ai_observation_locks_heldUntil_not_null n NOT NULL "heldUntil"
instance_ai_observation_locks_holderId_not_null n NOT NULL "holderId"
instance_ai_observation_locks_observationScopeId_not_null n NOT NULL "observationScopeId"
instance_ai_observation_locks_taskKind_not_null n NOT NULL "taskKind"
instance_ai_observation_locks_updatedAt_not_null n NOT NULL "updatedAt"

索引

名称 定义
PK_fc491dd378b9448655c3c683f85 CREATE UNIQUE INDEX "PK_fc491dd378b9448655c3c683f85" ON public.instance_ai_observation_locks USING btree ("observationScopeId", "taskKind")

关系

erDiagram

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

"public.instance_ai_observation_locks" {
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone heldUntil
  varchar_64_ holderId
  uuid observationScopeId FK
  varchar_20_ taskKind
  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