public.idempotency_key¶
列¶
| 名称 | 类型 | 默认值 | 可空 | 子级 | 父级 | 注释 |
|---|---|---|---|---|---|---|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| fingerprint | text | false | 请求方法、路径和请求体的哈希 | |||
| id | varchar(16) | false | 应用生成的 n8n nano ID | |||
| idempotencyKey | varchar(128) | false | 客户端 Idempotency-Key 请求头。不透明的 ASCII,长度 1 到 128 | |||
| responseBody | json | true | 存储的响应体。status 为 processing 时为 NULL | |||
| responseStatus | smallint | true | 存储响应的 HTTP 状态。处理中为 NULL,完成后必填 | |||
| status | varchar(16) | 'processing'::character varying | false | 处理器运行时为 processing,响应存储后为 completed | ||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| userId | uuid | false | public.user |
约束¶
| 名称 | 类型 | 定义 |
|---|---|---|
| CHK_idempotency_key_responseStatus | CHECK | CHECK (((((status)::text = 'processing'::text) AND ("responseStatus" IS NULL)) OR (((status)::text = 'completed'::text) AND ("responseStatus" IS NOT NULL)))) |
| CHK_idempotency_key_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['processing'::character varying, 'completed'::character varying])::text[]))) |
| FK_idempotency_key_userId | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_213f125e14469be304f9ff1d452 | PRIMARY KEY | PRIMARY KEY (id) |
| idempotency_key_createdAt_not_null | n | NOT NULL "createdAt" |
| idempotency_key_fingerprint_not_null | n | NOT NULL fingerprint |
| idempotency_key_id_not_null | n | NOT NULL id |
| idempotency_key_idempotencyKey_not_null | n | NOT NULL "idempotencyKey" |
| idempotency_key_status_not_null | n | NOT NULL status |
| idempotency_key_updatedAt_not_null | n | NOT NULL "updatedAt" |
| idempotency_key_userId_not_null | n | NOT NULL "userId" |
索引¶
| 名称 | 定义 |
|---|---|
| IDX_25289244569e505292cde510d7 | CREATE UNIQUE INDEX "IDX_25289244569e505292cde510d7" ON public.idempotency_key USING btree ("userId", "idempotencyKey") |
| IDX_38536b1937c55d305af4d69a97 | CREATE INDEX "IDX_38536b1937c55d305af4d69a97" ON public.idempotency_key USING btree ("createdAt") |
| PK_213f125e14469be304f9ff1d452 | CREATE UNIQUE INDEX "PK_213f125e14469be304f9ff1d452" ON public.idempotency_key USING btree (id) |
关系¶
erDiagram
"public.idempotency_key" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.idempotency_key" {
timestamp_3__with_time_zone createdAt
text fingerprint
varchar_16_ id
varchar_128_ idempotencyKey
json responseBody
smallint responseStatus
varchar_16_ status
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
varchar_16_ kind
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}由 tbls 生成
本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 n8/n8n