chore(core): Make DB schema docs generation deterministic (#32373)

This commit is contained in:
Tomi Turtiainen
2026-06-16 14:35:33 +03:00
committed by GitHub
parent 59971c86c4
commit 711f8abc57
222 changed files with 9180 additions and 41895 deletions
+4 -1
View File
@@ -5,11 +5,14 @@ desc: Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by h
dsn: ${TBLS_DSN}
docPath: docs/generated/postgres-schema
# Skip the machine-readable schema.json dump; only the Markdown docs are committed.
disableOutputSchema: true
er:
format: mermaid
format:
sortTablesByName: true
sort: true
# The migrations bookkeeping table is operational noise, not part of the schema.
exclude:
+4 -1
View File
@@ -5,11 +5,14 @@ desc: Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand.
dsn: ${TBLS_DSN}
docPath: docs/generated/sqlite-schema
# Skip the machine-readable schema.json dump; only the Markdown docs are committed.
disableOutputSchema: true
er:
format: mermaid
format:
sortTablesByName: true
sort: true
# The migrations bookkeeping table is operational noise, not part of the schema.
exclude:
File diff suppressed because it is too large Load Diff
@@ -5,10 +5,10 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this subscription |
| integrationType | varchar(64) | | false | | | Chat integration platform for this subscription |
| credentialId | varchar(255) | | false | | | Credential connection that owns this subscription |
| threadId | varchar(255) | | false | | | Platform thread ID the agent is subscribed to |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credentialId | varchar(255) | | false | | | Credential connection that owns this subscription |
| integrationType | varchar(64) | | false | | | Chat integration platform for this subscription |
| threadId | varchar(255) | | false | | | Platform thread ID the agent is subscribed to |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -16,14 +16,14 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_agent_chat_subscriptions_integrationType | CHECK | CHECK ((("integrationType")::text = ANY ((ARRAY['telegram'::character varying, 'slack'::character varying, 'linear'::character varying])::text[]))) |
| FK_e79153bd179c011e779d5016796 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_76598cf91038bee1f3ac94c94bc | PRIMARY KEY | PRIMARY KEY ("agentId", "integrationType", "credentialId", "threadId") |
| agent_chat_subscriptions_agentId_not_null | n | NOT NULL "agentId" |
| agent_chat_subscriptions_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_chat_subscriptions_credentialId_not_null | n | NOT NULL "credentialId" |
| agent_chat_subscriptions_integrationType_not_null | n | NOT NULL "integrationType" |
| agent_chat_subscriptions_threadId_not_null | n | NOT NULL "threadId" |
| agent_chat_subscriptions_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_e79153bd179c011e779d5016796 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_76598cf91038bee1f3ac94c94bc | PRIMARY KEY | PRIMARY KEY ("agentId", "integrationType", "credentialId", "threadId") |
## Indexes
@@ -40,25 +40,25 @@ erDiagram
"public.agent_chat_subscriptions" {
varchar_36_ agentId FK
varchar_64_ integrationType
varchar_255_ credentialId
varchar_255_ threadId
timestamp_3__with_time_zone createdAt
varchar_255_ credentialId
varchar_64_ integrationType
varchar_255_ threadId
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
@@ -4,30 +4,30 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| runId | varchar(255) | | false | | | |
| agentId | varchar(255) | | true | | [public.agents](public.agents.md) | |
| state | text | | true | | | |
| expired | boolean | false | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| expired | boolean | false | false | | | |
| runId | varchar(255) | | false | | | |
| state | text | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_5e31c210f896d539964bf99fe32 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_50a27cbafa6806c9b162304b5fd | PRIMARY KEY | PRIMARY KEY ("runId") |
| agent_checkpoints_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_checkpoints_expired_not_null | n | NOT NULL expired |
| agent_checkpoints_runId_not_null | n | NOT NULL "runId" |
| agent_checkpoints_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_5e31c210f896d539964bf99fe32 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_50a27cbafa6806c9b162304b5fd | PRIMARY KEY | PRIMARY KEY ("runId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_50a27cbafa6806c9b162304b5fd | CREATE UNIQUE INDEX "PK_50a27cbafa6806c9b162304b5fd" ON public.agent_checkpoints USING btree ("runId") |
| IDX_5e31c210f896d539964bf99fe3 | CREATE INDEX "IDX_5e31c210f896d539964bf99fe3" ON public.agent_checkpoints USING btree ("agentId") |
| PK_50a27cbafa6806c9b162304b5fd | CREATE UNIQUE INDEX "PK_50a27cbafa6806c9b162304b5fd" ON public.agent_checkpoints USING btree ("runId") |
## Relations
@@ -37,26 +37,26 @@ erDiagram
"public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_checkpoints" {
varchar_255_ runId
varchar_255_ agentId FK
text state
boolean expired
timestamp_3__with_time_zone createdAt
boolean expired
varchar_255_ runId
text state
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
@@ -4,26 +4,26 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| threadId | varchar(128) | | false | | [public.agent_execution_threads](public.agent_execution_threads.md) | |
| status | varchar(16) | | false | | | |
| startedAt | timestamp(3) with time zone | | true | | | |
| stoppedAt | timestamp(3) with time zone | | true | | | |
| duration | integer | 0 | false | | | |
| userMessage | text | | false | | | |
| assistantResponse | text | | false | | | |
| model | varchar(255) | | true | | | |
| promptTokens | integer | | true | | | |
| completionTokens | integer | | true | | | |
| totalTokens | integer | | true | | | |
| cost | double precision | | true | | | |
| toolCalls | json | | true | | | |
| timeline | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| duration | integer | 0 | false | | | |
| error | text | | true | | | |
| hitlStatus | varchar(16) | | true | | | |
| id | varchar(36) | | false | | | |
| model | varchar(255) | | true | | | |
| promptTokens | integer | | true | | | |
| source | varchar(32) | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| startedAt | timestamp(3) with time zone | | true | | | |
| status | varchar(16) | | false | | | |
| stoppedAt | timestamp(3) with time zone | | true | | | |
| threadId | varchar(128) | | false | | [public.agent_execution_threads](public.agent_execution_threads.md) | |
| timeline | json | | true | | | |
| toolCalls | json | | true | | | |
| totalTokens | integer | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userMessage | text | | false | | | |
## Constraints
@@ -31,6 +31,8 @@
| ---- | ---- | ---------- |
| CHK_agent_execution_hitlStatus | CHECK | CHECK ((("hitlStatus")::text = ANY ((ARRAY['suspended'::character varying, 'resumed'::character varying])::text[]))) |
| CHK_agent_execution_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['success'::character varying, 'error'::character varying])::text[]))) |
| FK_add2432fb6034cc18b6af299dce | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agent_execution_threads(id) ON DELETE CASCADE |
| PK_ba438acc8532addc12d1ef17049 | PRIMARY KEY | PRIMARY KEY (id) |
| agent_execution_assistantResponse_not_null | n | NOT NULL "assistantResponse" |
| agent_execution_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_execution_duration_not_null | n | NOT NULL duration |
@@ -39,15 +41,13 @@
| agent_execution_threadId_not_null | n | NOT NULL "threadId" |
| agent_execution_updatedAt_not_null | n | NOT NULL "updatedAt" |
| agent_execution_userMessage_not_null | n | NOT NULL "userMessage" |
| PK_ba438acc8532addc12d1ef17049 | PRIMARY KEY | PRIMARY KEY (id) |
| FK_add2432fb6034cc18b6af299dce | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agent_execution_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_ba438acc8532addc12d1ef17049 | CREATE UNIQUE INDEX "PK_ba438acc8532addc12d1ef17049" ON public.agent_execution USING btree (id) |
| IDX_63d3c3a68b9cebf05f967f0b1c | CREATE INDEX "IDX_63d3c3a68b9cebf05f967f0b1c" ON public.agent_execution USING btree ("threadId", "createdAt") |
| PK_ba438acc8532addc12d1ef17049 | CREATE UNIQUE INDEX "PK_ba438acc8532addc12d1ef17049" ON public.agent_execution USING btree (id) |
## Relations
@@ -57,45 +57,45 @@ erDiagram
"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
"public.agent_execution" {
varchar_36_ id
varchar_128_ threadId FK
varchar_16_ status
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
integer duration
text userMessage
text assistantResponse
varchar_255_ model
integer promptTokens
integer completionTokens
integer totalTokens
double_precision cost
json toolCalls
json timeline
timestamp_3__with_time_zone createdAt
integer duration
text error
varchar_16_ hitlStatus
varchar_36_ id
varchar_255_ model
integer promptTokens
varchar_32_ source
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone startedAt
varchar_16_ status
timestamp_3__with_time_zone stoppedAt
varchar_128_ threadId FK
json timeline
json toolCalls
integer totalTokens
timestamp_3__with_time_zone updatedAt
text userMessage
}
"public.agent_execution_threads" {
varchar_128_ id
varchar_36_ agentId FK
varchar_255_ agentName
timestamp_3__with_time_zone createdAt
varchar_8_ emoji
varchar_128_ id
varchar_36_ parentAgentId
varchar_128_ parentThreadId
varchar_255_ projectId FK
integer sessionNumber
integer totalPromptTokens
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_255_ title
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
varchar_255_ title
varchar_8_ emoji
timestamp_3__with_time_zone createdAt
integer totalPromptTokens
timestamp_3__with_time_zone updatedAt
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_128_ parentThreadId
varchar_36_ parentAgentId
}
```
@@ -4,28 +4,32 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(128) | | false | [public.agent_execution](public.agent_execution.md) | | |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | |
| agentName | varchar(255) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| emoji | varchar(8) | | true | | | |
| id | varchar(128) | | false | [public.agent_execution](public.agent_execution.md) | | |
| parentAgentId | varchar(36) | | true | | | Saved agent id of the parent that delegated this subagent run. |
| parentThreadId | varchar(128) | | true | | | Parent session thread id that delegated this subagent run. |
| projectId | varchar(255) | | false | | [public.project](public.project.md) | |
| sessionNumber | integer | 0 | false | | | |
| totalPromptTokens | integer | 0 | false | | | |
| taskId | varchar(32) | | true | | | Published task ID that triggered this session; not an FK because published runs can outlive draft task definition rows |
| taskVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | Published agent_history version that supplied the task snapshot |
| title | varchar(255) | | true | | | |
| totalCompletionTokens | integer | 0 | false | | | |
| totalCost | double precision | 0 | false | | | |
| totalDuration | integer | 0 | false | | | |
| title | varchar(255) | | true | | | |
| emoji | varchar(8) | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| totalPromptTokens | integer | 0 | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| taskId | varchar(32) | | true | | | Published task ID that triggered this session; not an FK because published runs can outlive draft task definition rows |
| taskVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | Published agent_history version that supplied the task snapshot |
| parentThreadId | varchar(128) | | true | | | Parent session thread id that delegated this subagent run. |
| parentAgentId | varchar(36) | | true | | | Saved agent id of the parent that delegated this subagent run. |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_0468a9dc35597314e641d4722aa | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_0e2f8bf92a7a9c88b89670f701c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_f00b52d74fe11838e1fe086deea | FOREIGN KEY | FOREIGN KEY ("taskVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL |
| PK_22373dbf6ba6929d8ac50093309 | PRIMARY KEY | PRIMARY KEY (id) |
| agent_execution_threads_agentId_not_null | n | NOT NULL "agentId" |
| agent_execution_threads_agentName_not_null | n | NOT NULL "agentName" |
| agent_execution_threads_createdAt_not_null | n | NOT NULL "createdAt" |
@@ -37,10 +41,6 @@
| agent_execution_threads_totalDuration_not_null | n | NOT NULL "totalDuration" |
| agent_execution_threads_totalPromptTokens_not_null | n | NOT NULL "totalPromptTokens" |
| agent_execution_threads_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_0e2f8bf92a7a9c88b89670f701c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_0468a9dc35597314e641d4722aa | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_f00b52d74fe11838e1fe086deea | FOREIGN KEY | FOREIGN KEY ("taskVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL |
| PK_22373dbf6ba6929d8ac50093309 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -56,87 +56,87 @@
```mermaid
erDiagram
"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agent_execution_threads" {
varchar_128_ id
varchar_36_ agentId FK
varchar_255_ agentName
timestamp_3__with_time_zone createdAt
varchar_8_ emoji
varchar_128_ id
varchar_36_ parentAgentId
varchar_128_ parentThreadId
varchar_255_ projectId FK
integer sessionNumber
integer totalPromptTokens
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_255_ title
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
varchar_255_ title
varchar_8_ emoji
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_128_ parentThreadId
varchar_36_ parentAgentId
}
"public.agent_execution" {
varchar_36_ id
varchar_128_ threadId FK
varchar_16_ status
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
integer duration
text userMessage
text assistantResponse
varchar_255_ model
integer promptTokens
integer completionTokens
integer totalTokens
double_precision cost
json toolCalls
json timeline
text error
varchar_16_ hitlStatus
varchar_32_ source
timestamp_3__with_time_zone createdAt
integer totalPromptTokens
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agent_execution" {
text assistantResponse
integer completionTokens
double_precision cost
timestamp_3__with_time_zone createdAt
integer duration
text error
varchar_16_ hitlStatus
varchar_36_ id
varchar_255_ model
integer promptTokens
varchar_32_ source
timestamp_3__with_time_zone startedAt
varchar_16_ status
timestamp_3__with_time_zone stoppedAt
varchar_128_ threadId FK
json timeline
json toolCalls
integer totalTokens
timestamp_3__with_time_zone updatedAt
text userMessage
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.agent_history" {
varchar_36_ versionId
varchar_36_ agentId FK
json schema
json tools
json skills
uuid publishedById FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
uuid publishedById FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
@@ -4,19 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(16) | | false | | | Application-generated n8n nano ID |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this uploaded file |
| binaryDataId | text | | false | | | Opaque BinaryDataService reference (mode-prefixed, e.g. "filesystem-v2:\<uuid\>"); not an FK to binary_data, which only has rows in DB storage mode |
| fileName | varchar(255) | | false | | | |
| mimeType | varchar(255) | | false | | | |
| fileSizeBytes | integer | | false | | | Uploaded file size in bytes |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| fileName | varchar(255) | | false | | | |
| fileSizeBytes | integer | | false | | | Uploaded file size in bytes |
| id | varchar(16) | | false | | | Application-generated n8n nano ID |
| mimeType | varchar(255) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_aca4514cb500494b64356c2e164 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_692920e59217af7d124cd95106f | PRIMARY KEY | PRIMARY KEY (id) |
| agent_files_agentId_not_null | n | NOT NULL "agentId" |
| agent_files_binaryDataId_not_null | n | NOT NULL "binaryDataId" |
| agent_files_createdAt_not_null | n | NOT NULL "createdAt" |
@@ -25,15 +27,13 @@
| agent_files_id_not_null | n | NOT NULL id |
| agent_files_mimeType_not_null | n | NOT NULL "mimeType" |
| agent_files_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_aca4514cb500494b64356c2e164 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_692920e59217af7d124cd95106f | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_692920e59217af7d124cd95106f | CREATE UNIQUE INDEX "PK_692920e59217af7d124cd95106f" ON public.agent_files USING btree (id) |
| IDX_45dafc48fe2ce95eac30fc8ffd | CREATE INDEX "IDX_45dafc48fe2ce95eac30fc8ffd" ON public.agent_files USING btree ("agentId", "createdAt") |
| PK_692920e59217af7d124cd95106f | CREATE UNIQUE INDEX "PK_692920e59217af7d124cd95106f" ON public.agent_files USING btree (id) |
## Relations
@@ -43,28 +43,28 @@ erDiagram
"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_files" {
varchar_16_ id
varchar_36_ agentId FK
text binaryDataId
varchar_255_ fileName
varchar_255_ mimeType
integer fileSizeBytes
timestamp_3__with_time_zone createdAt
varchar_255_ fileName
integer fileSizeBytes
varchar_16_ id
varchar_255_ mimeType
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
@@ -4,117 +4,117 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| versionId | varchar(36) | | false | [public.agents](public.agents.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_task_snapshot](public.agent_task_snapshot.md) | | |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | |
| schema | json | | true | | | Frozen snapshot of the published AgentJsonConfig |
| tools | json | | true | | | Frozen map of `toolId → { code, descriptor }` at publish time |
| skills | json | | true | | | Frozen map of `skillId → AgentSkill` at publish time |
| publishedById | uuid | | true | | [public.user](public.user.md) | |
| author | varchar(255) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| publishedById | uuid | | true | | [public.user](public.user.md) | |
| schema | json | | true | | | Frozen snapshot of the published AgentJsonConfig |
| skills | json | | true | | | Frozen map of `skillId → AgentSkill` at publish time |
| tools | json | | true | | | Frozen map of `toolId → { code, descriptor }` at publish time |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| versionId | varchar(36) | | false | [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_task_snapshot](public.agent_task_snapshot.md) [public.agents](public.agents.md) | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_8771675f44c58fb40e0feb9ee35 | FOREIGN KEY | FOREIGN KEY ("publishedById") REFERENCES "user"(id) ON DELETE SET NULL |
| FK_87cd5a8da20304b089ea2f83fec | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_65ffcfe7a8e112fb826311fb092 | PRIMARY KEY | PRIMARY KEY ("versionId") |
| agent_history_agentId_not_null | n | NOT NULL "agentId" |
| agent_history_author_not_null | n | NOT NULL author |
| agent_history_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_history_updatedAt_not_null | n | NOT NULL "updatedAt" |
| agent_history_versionId_not_null | n | NOT NULL "versionId" |
| FK_8771675f44c58fb40e0feb9ee35 | FOREIGN KEY | FOREIGN KEY ("publishedById") REFERENCES "user"(id) ON DELETE SET NULL |
| FK_87cd5a8da20304b089ea2f83fec | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_65ffcfe7a8e112fb826311fb092 | PRIMARY KEY | PRIMARY KEY ("versionId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_65ffcfe7a8e112fb826311fb092 | CREATE UNIQUE INDEX "PK_65ffcfe7a8e112fb826311fb092" ON public.agent_history USING btree ("versionId") |
| IDX_87cd5a8da20304b089ea2f83fe | CREATE INDEX "IDX_87cd5a8da20304b089ea2f83fe" ON public.agent_history USING btree ("agentId") |
| PK_65ffcfe7a8e112fb826311fb092 | CREATE UNIQUE INDEX "PK_65ffcfe7a8e112fb826311fb092" ON public.agent_history USING btree ("versionId") |
## Relations
```mermaid
erDiagram
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agent_history" {
varchar_36_ versionId
varchar_36_ agentId FK
json schema
json tools
json skills
uuid publishedById FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
uuid publishedById FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
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
}
"public.agent_execution_threads" {
varchar_128_ id
varchar_36_ agentId FK
varchar_255_ agentName
timestamp_3__with_time_zone createdAt
varchar_8_ emoji
varchar_128_ id
varchar_36_ parentAgentId
varchar_128_ parentThreadId
varchar_255_ projectId FK
integer sessionNumber
integer totalPromptTokens
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_255_ title
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
varchar_255_ title
varchar_8_ emoji
timestamp_3__with_time_zone createdAt
integer totalPromptTokens
timestamp_3__with_time_zone updatedAt
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_128_ parentThreadId
varchar_36_ parentAgentId
}
"public.agent_task_snapshot" {
varchar_36_ versionId FK
varchar_32_ taskId
timestamp_3__with_time_zone createdAt
varchar_128_ cronExpression
boolean enabled
varchar_128_ name
text objective
varchar_128_ cronExpression
timestamp_3__with_time_zone createdAt
varchar_32_ taskId
timestamp_3__with_time_zone updatedAt
}
"public.user" {
uuid id
varchar_255_ email
varchar_32_ firstName
varchar_32_ lastName
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
varchar_36_ versionId FK
}
```
@@ -4,18 +4,20 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(32) | | false | | | Application-generated task ID referenced from agent JSON config |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Owning agent; task definitions are deleted when the agent is deleted |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone |
| id | varchar(32) | | false | | | Application-generated task ID referenced from agent JSON config |
| name | varchar(128) | | false | | | |
| objective | text | | false | | | User-authored instruction sent to the agent when this task runs |
| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_f45d0535a2ed59b6c2dd6da98a0 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_1756c11c637903e97629a7a784a | PRIMARY KEY | PRIMARY KEY (id) |
| agent_task_definition_agentId_not_null | n | NOT NULL "agentId" |
| agent_task_definition_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_task_definition_cronExpression_not_null | n | NOT NULL "cronExpression" |
@@ -23,15 +25,13 @@
| agent_task_definition_name_not_null | n | NOT NULL name |
| agent_task_definition_objective_not_null | n | NOT NULL objective |
| agent_task_definition_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_f45d0535a2ed59b6c2dd6da98a0 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_1756c11c637903e97629a7a784a | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_1756c11c637903e97629a7a784a | CREATE UNIQUE INDEX "PK_1756c11c637903e97629a7a784a" ON public.agent_task_definition USING btree (id) |
| IDX_f45d0535a2ed59b6c2dd6da98a | CREATE INDEX "IDX_f45d0535a2ed59b6c2dd6da98a" ON public.agent_task_definition USING btree ("agentId") |
| PK_1756c11c637903e97629a7a784a | CREATE UNIQUE INDEX "PK_1756c11c637903e97629a7a784a" ON public.agent_task_definition USING btree (id) |
## Relations
@@ -41,27 +41,27 @@ erDiagram
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_task_definition" {
varchar_32_ id
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_128_ cronExpression
varchar_32_ id
varchar_128_ name
text objective
varchar_128_ cronExpression
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
@@ -5,24 +5,24 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Published agent whose scheduled task run is locked |
| taskId | varchar(32) | | false | | | Published task ID whose scheduled run is locked |
| holderId | uuid | | false | | | Ephemeral lock owner token generated by the running main |
| heldUntil | timestamp(3) with time zone | | false | | | Time after which another main can claim this task run lock |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| heldUntil | timestamp(3) with time zone | | false | | | Time after which another main can claim this task run lock |
| holderId | uuid | | false | | | Ephemeral lock owner token generated by the running main |
| taskId | varchar(32) | | false | | | Published task ID whose scheduled run is locked |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_b57a2862ae869aab24e54cefd48 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_f593adaf7230e964d3c25deda64 | PRIMARY KEY | PRIMARY KEY ("agentId", "taskId") |
| agent_task_run_lock_agentId_not_null | n | NOT NULL "agentId" |
| agent_task_run_lock_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_task_run_lock_heldUntil_not_null | n | NOT NULL "heldUntil" |
| agent_task_run_lock_holderId_not_null | n | NOT NULL "holderId" |
| agent_task_run_lock_taskId_not_null | n | NOT NULL "taskId" |
| agent_task_run_lock_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_b57a2862ae869aab24e54cefd48 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_f593adaf7230e964d3c25deda64 | PRIMARY KEY | PRIMARY KEY ("agentId", "taskId") |
## Indexes
@@ -39,25 +39,25 @@ erDiagram
"public.agent_task_run_lock" {
varchar_36_ agentId FK
varchar_32_ taskId
uuid holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
uuid holderId
varchar_32_ taskId
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
@@ -4,19 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| versionId | varchar(36) | | false | | [public.agent_history](public.agent_history.md) | Published agent_history version this task snapshot belongs to |
| taskId | varchar(32) | | false | | | Stable task ID referenced from the published agent JSON config |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone |
| enabled | boolean | | false | | | Published enabled state for this task at publish time |
| name | varchar(128) | | false | | | |
| objective | text | | false | | | User-authored instruction sent to the agent when this task runs |
| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| taskId | varchar(32) | | false | | | Stable task ID referenced from the published agent JSON config |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| versionId | varchar(36) | | false | | [public.agent_history](public.agent_history.md) | Published agent_history version this task snapshot belongs to |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_1acedce6690392ef1611cca8b88 | FOREIGN KEY | FOREIGN KEY ("versionId") REFERENCES agent_history("versionId") ON DELETE CASCADE |
| PK_2142a8bcda2360c3c5e34f82640 | PRIMARY KEY | PRIMARY KEY ("versionId", "taskId") |
| agent_task_snapshot_createdAt_not_null | n | NOT NULL "createdAt" |
| agent_task_snapshot_cronExpression_not_null | n | NOT NULL "cronExpression" |
| agent_task_snapshot_enabled_not_null | n | NOT NULL enabled |
@@ -25,8 +27,6 @@
| agent_task_snapshot_taskId_not_null | n | NOT NULL "taskId" |
| agent_task_snapshot_updatedAt_not_null | n | NOT NULL "updatedAt" |
| agent_task_snapshot_versionId_not_null | n | NOT NULL "versionId" |
| FK_1acedce6690392ef1611cca8b88 | FOREIGN KEY | FOREIGN KEY ("versionId") REFERENCES agent_history("versionId") ON DELETE CASCADE |
| PK_2142a8bcda2360c3c5e34f82640 | PRIMARY KEY | PRIMARY KEY ("versionId", "taskId") |
## Indexes
@@ -42,25 +42,25 @@ erDiagram
"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE"
"public.agent_task_snapshot" {
varchar_36_ versionId FK
varchar_32_ taskId
timestamp_3__with_time_zone createdAt
varchar_128_ cronExpression
boolean enabled
varchar_128_ name
text objective
varchar_128_ cronExpression
timestamp_3__with_time_zone createdAt
varchar_32_ taskId
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId FK
}
"public.agent_history" {
varchar_36_ versionId
varchar_36_ agentId FK
json schema
json tools
json skills
uuid publishedById FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
uuid publishedById FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
```
+150 -150
View File
@@ -4,23 +4,26 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.agent_checkpoints](public.agent_checkpoints.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agents_observations](public.agents_observations.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) [public.agent_history](public.agent_history.md) [public.agent_files](public.agent_files.md) [public.agent_task_definition](public.agent_task_definition.md) [public.agent_task_run_lock](public.agent_task_run_lock.md) [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) | | |
| name | varchar(128) | | false | | | |
| description | varchar(512) | | true | | | |
| projectId | varchar(255) | | false | | [public.project](public.project.md) | |
| integrations | json | '[]'::json | false | | | |
| schema | json | | true | | | |
| tools | json | '{}'::json | false | | | |
| skills | json | '{}'::json | false | | | |
| versionId | varchar(36) | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| activeVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| description | varchar(512) | | true | | | |
| id | varchar(36) | | false | [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) [public.agent_checkpoints](public.agent_checkpoints.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_files](public.agent_files.md) [public.agent_history](public.agent_history.md) [public.agent_task_definition](public.agent_task_definition.md) [public.agent_task_run_lock](public.agent_task_run_lock.md) [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_observations](public.agents_observations.md) | | |
| integrations | json | '[]'::json | false | | | |
| name | varchar(128) | | false | | | |
| projectId | varchar(255) | | false | | [public.project](public.project.md) | |
| schema | json | | true | | | |
| skills | json | '{}'::json | false | | | |
| tools | json | '{}'::json | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| versionId | varchar(36) | | true | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_940597dfe9753375309ce6aeea0 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL |
| FK_a30d560207c4071d98aa03c179c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_9c653f28ae19c5884d5baf6a1d9 | PRIMARY KEY | PRIMARY KEY (id) |
| agents_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_id_not_null | n | NOT NULL id |
| agents_integrations_not_null | n | NOT NULL integrations |
@@ -29,209 +32,206 @@
| agents_skills_not_null | n | NOT NULL skills |
| agents_tools_not_null | n | NOT NULL tools |
| agents_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_a30d560207c4071d98aa03c179c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_9c653f28ae19c5884d5baf6a1d9 | PRIMARY KEY | PRIMARY KEY (id) |
| FK_940597dfe9753375309ce6aeea0 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_9c653f28ae19c5884d5baf6a1d9 | CREATE UNIQUE INDEX "PK_9c653f28ae19c5884d5baf6a1d9" ON public.agents USING btree (id) |
| IDX_a30d560207c4071d98aa03c179 | CREATE INDEX "IDX_a30d560207c4071d98aa03c179" ON public.agents USING btree ("projectId") |
| IDX_agents_projectId | CREATE INDEX "IDX_agents_projectId" ON public.agents USING btree ("projectId") |
| PK_9c653f28ae19c5884d5baf6a1d9 | CREATE UNIQUE INDEX "PK_9c653f28ae19c5884d5baf6a1d9" ON public.agents USING btree (id) |
## Relations
```mermaid
erDiagram
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agent_history" {
varchar_36_ agentId FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
uuid publishedById FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agent_chat_subscriptions" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_255_ credentialId
varchar_64_ integrationType
varchar_255_ threadId
timestamp_3__with_time_zone updatedAt
}
"public.agent_checkpoints" {
varchar_255_ runId
varchar_255_ agentId FK
text state
boolean expired
timestamp_3__with_time_zone createdAt
boolean expired
varchar_255_ runId
text state
timestamp_3__with_time_zone updatedAt
}
"public.agent_execution_threads" {
varchar_128_ id
varchar_36_ agentId FK
varchar_255_ agentName
timestamp_3__with_time_zone createdAt
varchar_8_ emoji
varchar_128_ id
varchar_36_ parentAgentId
varchar_128_ parentThreadId
varchar_255_ projectId FK
integer sessionNumber
integer totalPromptTokens
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_255_ title
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
varchar_255_ title
varchar_8_ emoji
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_128_ parentThreadId
varchar_36_ parentAgentId
}
"public.agents_observations" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_16_ marker
text text
varchar_36_ parentId FK
integer tokenCount
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_observation_cursors" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_36_ lastObservedMessageId
timestamp_3__with_time_zone lastObservedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_observation_locks" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_20_ taskKind
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entries" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ resourceId FK
text content
varchar_64_ contentHash
varchar_16_ status
varchar_36_ supersededBy FK
varchar_128_ embeddingModel
json embedding
json metadata
timestamp_3__with_time_zone lastSeenAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_locks" {
varchar_36_ agentId FK
varchar_255_ resourceId FK
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ id
varchar_36_ agentId FK
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
varchar_64_ evidenceHash
text evidenceText
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_cursors" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_36_ lastIndexedObservationId
timestamp_3__with_time_zone lastIndexedObservationCreatedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agent_history" {
varchar_36_ versionId
varchar_36_ agentId FK
json schema
json tools
json skills
uuid publishedById FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
integer totalPromptTokens
timestamp_3__with_time_zone updatedAt
}
"public.agent_files" {
varchar_16_ id
varchar_36_ agentId FK
text binaryDataId
varchar_255_ fileName
varchar_255_ mimeType
integer fileSizeBytes
timestamp_3__with_time_zone createdAt
varchar_255_ fileName
integer fileSizeBytes
varchar_16_ id
varchar_255_ mimeType
timestamp_3__with_time_zone updatedAt
}
"public.agent_task_definition" {
varchar_32_ id
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_128_ cronExpression
varchar_32_ id
varchar_128_ name
text objective
varchar_128_ cronExpression
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agent_task_run_lock" {
varchar_36_ agentId FK
varchar_32_ taskId
uuid holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
uuid holderId
varchar_32_ taskId
timestamp_3__with_time_zone updatedAt
}
"public.agent_chat_subscriptions" {
"public.agents_memory_entries" {
varchar_36_ agentId FK
varchar_64_ integrationType
varchar_255_ credentialId
varchar_255_ threadId
text content
varchar_64_ contentHash
timestamp_3__with_time_zone createdAt
json embedding
varchar_128_ embeddingModel
varchar_36_ id
timestamp_3__with_time_zone lastSeenAt
json metadata
varchar_255_ resourceId FK
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_cursors" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastIndexedObservationCreatedAt
varchar_36_ lastIndexedObservationId
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_locks" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
varchar_64_ holderId
varchar_255_ resourceId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_64_ evidenceHash
text evidenceText
varchar_36_ id
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_observation_cursors" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastObservedAt
varchar_36_ lastObservedMessageId
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"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_observations" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_16_ marker
varchar_255_ observationScopeId FK
varchar_36_ parentId FK
varchar_16_ status
varchar_36_ supersededBy FK
text text
integer tokenCount
timestamp_3__with_time_zone updatedAt
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
```
@@ -4,18 +4,18 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | | |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this episodic memory entry |
| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition used for episodic recall scope |
| content | text | | false | | | |
| contentHash | varchar(64) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| embedding | json | | true | | | Embedding vector for episodic recall |
| embeddingModel | varchar(128) | | true | | | Embedding model used to produce embedding |
| id | varchar(36) | | false | [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | | |
| lastSeenAt | timestamp(3) with time zone | | false | | | Last time equivalent content was observed; updatedAt tracks row mutation time |
| metadata | json | | true | | | Optional system metadata for ranking and debugging |
| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition used for episodic recall scope |
| status | varchar(16) | | false | | | |
| supersededBy | varchar(36) | | true | | [public.agents_memory_entries](public.agents_memory_entries.md) | Self-reference to replacement memory entry |
| embeddingModel | varchar(128) | | true | | | Embedding model used to produce embedding |
| embedding | json | | true | | | Embedding vector for episodic recall |
| metadata | json | | true | | | Optional system metadata for ranking and debugging |
| lastSeenAt | timestamp(3) with time zone | | false | | | Last time equivalent content was observed; updatedAt tracks row mutation time |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -23,6 +23,10 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_agents_memory_entries_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) |
| FK_0edf1226b77ddc525eae4938079 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_memory_entries(id) |
| FK_1443a75e59adbfb796071d66393 | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE |
| FK_28e981fb675e9b44ce02f0ec1dd | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_bfbc45dc88f66fae4e4b4a15fec | PRIMARY KEY | PRIMARY KEY (id) |
| agents_memory_entries_agentId_not_null | n | NOT NULL "agentId" |
| agents_memory_entries_contentHash_not_null | n | NOT NULL "contentHash" |
| agents_memory_entries_content_not_null | n | NOT NULL content |
@@ -32,75 +36,71 @@
| agents_memory_entries_resourceId_not_null | n | NOT NULL "resourceId" |
| agents_memory_entries_status_not_null | n | NOT NULL status |
| agents_memory_entries_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_28e981fb675e9b44ce02f0ec1dd | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_1443a75e59adbfb796071d66393 | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE |
| FK_0edf1226b77ddc525eae4938079 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_memory_entries(id) |
| PK_bfbc45dc88f66fae4e4b4a15fec | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_bfbc45dc88f66fae4e4b4a15fec | CREATE UNIQUE INDEX "PK_bfbc45dc88f66fae4e4b4a15fec" ON public.agents_memory_entries USING btree (id) |
| IDX_aff2807b31eccbafe59d0474f0 | CREATE INDEX "IDX_aff2807b31eccbafe59d0474f0" ON public.agents_memory_entries USING btree ("agentId", "resourceId", status, "createdAt", id) |
| IDX_a03e04e94bea8439dd166d4b52 | CREATE UNIQUE INDEX "IDX_a03e04e94bea8439dd166d4b52" ON public.agents_memory_entries USING btree ("agentId", "resourceId", "contentHash") |
| IDX_1443a75e59adbfb796071d6639 | CREATE INDEX "IDX_1443a75e59adbfb796071d6639" ON public.agents_memory_entries USING btree ("resourceId") |
| IDX_0edf1226b77ddc525eae493807 | CREATE INDEX "IDX_0edf1226b77ddc525eae493807" ON public.agents_memory_entries USING btree ("supersededBy") |
| IDX_1443a75e59adbfb796071d6639 | CREATE INDEX "IDX_1443a75e59adbfb796071d6639" ON public.agents_memory_entries USING btree ("resourceId") |
| IDX_a03e04e94bea8439dd166d4b52 | CREATE UNIQUE INDEX "IDX_a03e04e94bea8439dd166d4b52" ON public.agents_memory_entries USING btree ("agentId", "resourceId", "contentHash") |
| IDX_aff2807b31eccbafe59d0474f0 | CREATE INDEX "IDX_aff2807b31eccbafe59d0474f0" ON public.agents_memory_entries USING btree ("agentId", "resourceId", status, "createdAt", id) |
| PK_bfbc45dc88f66fae4e4b4a15fec | CREATE UNIQUE INDEX "PK_bfbc45dc88f66fae4e4b4a15fec" ON public.agents_memory_entries USING btree (id) |
## Relations
```mermaid
erDiagram
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entries" }o--o| "public.agents_memory_entries" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_memory_entries(id)"
"public.agents_memory_entry_sources" }o--|| "public.agents_memory_entries" : "FOREIGN KEY (#quot;memoryEntryId#quot;) REFERENCES agents_memory_entries(id) ON DELETE CASCADE"
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
"public.agents_memory_entries" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ resourceId FK
text content
varchar_64_ contentHash
timestamp_3__with_time_zone createdAt
json embedding
varchar_128_ embeddingModel
varchar_36_ id
timestamp_3__with_time_zone lastSeenAt
json metadata
varchar_255_ resourceId FK
varchar_16_ status
varchar_36_ supersededBy FK
varchar_128_ embeddingModel
json embedding
json metadata
timestamp_3__with_time_zone lastSeenAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ id
varchar_36_ agentId FK
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
varchar_64_ evidenceHash
text evidenceText
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents_memory_entry_sources" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_64_ evidenceHash
text evidenceText
varchar_36_ id
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_resources" {
timestamp_3__with_time_zone createdAt
varchar_255_ id
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -5,32 +5,32 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this cursor |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream indexed into episodic memory |
| lastIndexedObservationId | varchar(36) | | false | | | Last observation-log row indexed into episodic memory |
| lastIndexedObservationCreatedAt | timestamp(3) with time zone | | false | | | Creation timestamp for the last indexed observation-log row |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| lastIndexedObservationCreatedAt | timestamp(3) with time zone | | false | | | Creation timestamp for the last indexed observation-log row |
| lastIndexedObservationId | varchar(36) | | false | | | Last observation-log row indexed into episodic memory |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream indexed into episodic memory |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_069e791e428391a5569e7a96b20 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| FK_746780fd115e5e4352457a3c617 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_b31a1d5c009a27f4cc5ef8f102a | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") |
| agents_memory_entry_cursors_agentId_not_null | n | NOT NULL "agentId" |
| agents_memory_entry_cursors_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_memory_entry_cursors_lastIndexedObservationCrea_not_null | n | NOT NULL "lastIndexedObservationCreatedAt" |
| agents_memory_entry_cursors_lastIndexedObservationId_not_null | n | NOT NULL "lastIndexedObservationId" |
| agents_memory_entry_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
| agents_memory_entry_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_746780fd115e5e4352457a3c617 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_b31a1d5c009a27f4cc5ef8f102a | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") |
| FK_069e791e428391a5569e7a96b20 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_b31a1d5c009a27f4cc5ef8f102a | CREATE UNIQUE INDEX "PK_b31a1d5c009a27f4cc5ef8f102a" ON public.agents_memory_entry_cursors USING btree ("agentId", "observationScopeId") |
| IDX_069e791e428391a5569e7a96b2 | CREATE INDEX "IDX_069e791e428391a5569e7a96b2" ON public.agents_memory_entry_cursors USING btree ("observationScopeId") |
| PK_b31a1d5c009a27f4cc5ef8f102a | CREATE UNIQUE INDEX "PK_b31a1d5c009a27f4cc5ef8f102a" ON public.agents_memory_entry_cursors USING btree ("agentId", "observationScopeId") |
## Relations
@@ -42,32 +42,32 @@ erDiagram
"public.agents_memory_entry_cursors" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_36_ lastIndexedObservationId
timestamp_3__with_time_zone lastIndexedObservationCreatedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastIndexedObservationCreatedAt
varchar_36_ lastIndexedObservationId
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
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
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -5,32 +5,32 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this lock |
| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition locked for episodic indexing |
| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token |
| heldUntil | timestamp(3) with time zone | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| heldUntil | timestamp(3) with time zone | | false | | | |
| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token |
| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition locked for episodic indexing |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_0ccf6d9ea6f44fa1c264fc2f795 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_9594c0983cfee1c8ff49b05848b | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE |
| PK_a8e0f570d04a174292bea104ae6 | PRIMARY KEY | PRIMARY KEY ("agentId", "resourceId") |
| agents_memory_entry_locks_agentId_not_null | n | NOT NULL "agentId" |
| agents_memory_entry_locks_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_memory_entry_locks_heldUntil_not_null | n | NOT NULL "heldUntil" |
| agents_memory_entry_locks_holderId_not_null | n | NOT NULL "holderId" |
| agents_memory_entry_locks_resourceId_not_null | n | NOT NULL "resourceId" |
| agents_memory_entry_locks_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_0ccf6d9ea6f44fa1c264fc2f795 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_9594c0983cfee1c8ff49b05848b | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE |
| PK_a8e0f570d04a174292bea104ae6 | PRIMARY KEY | PRIMARY KEY ("agentId", "resourceId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_a8e0f570d04a174292bea104ae6 | CREATE UNIQUE INDEX "PK_a8e0f570d04a174292bea104ae6" ON public.agents_memory_entry_locks USING btree ("agentId", "resourceId") |
| IDX_9594c0983cfee1c8ff49b05848 | CREATE INDEX "IDX_9594c0983cfee1c8ff49b05848" ON public.agents_memory_entry_locks USING btree ("resourceId") |
| PK_a8e0f570d04a174292bea104ae6 | CREATE UNIQUE INDEX "PK_a8e0f570d04a174292bea104ae6" ON public.agents_memory_entry_locks USING btree ("agentId", "resourceId") |
## Relations
@@ -42,30 +42,30 @@ erDiagram
"public.agents_memory_entry_locks" {
varchar_36_ agentId FK
varchar_255_ resourceId FK
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
varchar_64_ holderId
varchar_255_ resourceId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents_resources" {
timestamp_3__with_time_zone createdAt
varchar_255_ id
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,20 +4,25 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns the linked episodic memory entry source |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| evidenceHash | varchar(64) | | false | | | Bounded hash used to deduplicate exact evidence links |
| evidenceText | text | | false | | | Exact source evidence text from the observation, not recall scope |
| id | varchar(36) | | false | | | |
| memoryEntryId | varchar(36) | | false | | [public.agents_memory_entries](public.agents_memory_entries.md) | Episodic memory entry linked to this source evidence |
| observationId | varchar(36) | | false | | [public.agents_observations](public.agents_observations.md) | Observation-log row used as source evidence |
| threadId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | Source conversation thread that produced the linked observation |
| evidenceHash | varchar(64) | | false | | | Bounded hash used to deduplicate exact evidence links |
| evidenceText | text | | false | | | Exact source evidence text from the observation, not recall scope |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_451d387a182fa8dd8002dfc3a77 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| FK_4706f6223313959b7437a2b48df | FOREIGN KEY | FOREIGN KEY ("memoryEntryId") REFERENCES agents_memory_entries(id) ON DELETE CASCADE |
| FK_c38e8a57a36b880e39a52ada2e8 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_cb7c15d22fd068a0806aa57fc03 | FOREIGN KEY | FOREIGN KEY ("observationId") REFERENCES agents_observations(id) ON DELETE CASCADE |
| PK_278f05e98e74baaaa93f52b4bab | PRIMARY KEY | PRIMARY KEY (id) |
| agents_memory_entry_sources_agentId_not_null | n | NOT NULL "agentId" |
| agents_memory_entry_sources_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_memory_entry_sources_evidenceHash_not_null | n | NOT NULL "evidenceHash" |
@@ -27,21 +32,16 @@
| agents_memory_entry_sources_observationId_not_null | n | NOT NULL "observationId" |
| agents_memory_entry_sources_threadId_not_null | n | NOT NULL "threadId" |
| agents_memory_entry_sources_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_c38e8a57a36b880e39a52ada2e8 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_cb7c15d22fd068a0806aa57fc03 | FOREIGN KEY | FOREIGN KEY ("observationId") REFERENCES agents_observations(id) ON DELETE CASCADE |
| FK_4706f6223313959b7437a2b48df | FOREIGN KEY | FOREIGN KEY ("memoryEntryId") REFERENCES agents_memory_entries(id) ON DELETE CASCADE |
| PK_278f05e98e74baaaa93f52b4bab | PRIMARY KEY | PRIMARY KEY (id) |
| FK_451d387a182fa8dd8002dfc3a77 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_278f05e98e74baaaa93f52b4bab | CREATE UNIQUE INDEX "PK_278f05e98e74baaaa93f52b4bab" ON public.agents_memory_entry_sources USING btree (id) |
| IDX_451d387a182fa8dd8002dfc3a7 | CREATE INDEX "IDX_451d387a182fa8dd8002dfc3a7" ON public.agents_memory_entry_sources USING btree ("threadId") |
| IDX_a353ac251315ef0af6ad3c9f0a | CREATE UNIQUE INDEX "IDX_a353ac251315ef0af6ad3c9f0a" ON public.agents_memory_entry_sources USING btree ("memoryEntryId", "observationId", "evidenceHash") |
| IDX_cb7c15d22fd068a0806aa57fc0 | CREATE INDEX "IDX_cb7c15d22fd068a0806aa57fc0" ON public.agents_memory_entry_sources USING btree ("observationId") |
| IDX_f9573af4ed653f13b0ba1f7b12 | CREATE INDEX "IDX_f9573af4ed653f13b0ba1f7b12" ON public.agents_memory_entry_sources USING btree ("agentId", "threadId") |
| IDX_451d387a182fa8dd8002dfc3a7 | CREATE INDEX "IDX_451d387a182fa8dd8002dfc3a7" ON public.agents_memory_entry_sources USING btree ("threadId") |
| PK_278f05e98e74baaaa93f52b4bab | CREATE UNIQUE INDEX "PK_278f05e98e74baaaa93f52b4bab" ON public.agents_memory_entry_sources USING btree (id) |
## Relations
@@ -54,64 +54,64 @@ erDiagram
"public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_memory_entry_sources" {
varchar_36_ id
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_64_ evidenceHash
text evidenceText
varchar_36_ id
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
varchar_64_ evidenceHash
text evidenceText
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents_memory_entries" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ resourceId FK
text content
varchar_64_ contentHash
timestamp_3__with_time_zone createdAt
json embedding
varchar_128_ embeddingModel
varchar_36_ id
timestamp_3__with_time_zone lastSeenAt
json metadata
varchar_255_ resourceId FK
varchar_16_ status
varchar_36_ supersededBy FK
varchar_128_ embeddingModel
json embedding
json metadata
timestamp_3__with_time_zone lastSeenAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_observations" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_16_ marker
text text
varchar_255_ observationScopeId FK
varchar_36_ parentId FK
integer tokenCount
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone createdAt
text text
integer tokenCount
timestamp_3__with_time_zone updatedAt
}
"public.agents_threads" {
timestamp_3__with_time_zone createdAt
varchar_128_ id
text metadata
varchar_255_ resourceId
varchar_255_ title
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,19 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| threadId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | |
| resourceId | varchar(255) | | false | | | |
| role | varchar(36) | | false | | | |
| type | varchar(36) | | true | | | |
| content | json | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | | | |
| resourceId | varchar(255) | | false | | | |
| role | varchar(36) | | false | | | |
| threadId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | |
| type | varchar(36) | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_0a8057a61afabd2999608ffd0d9 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| PK_81020dc608dfb0af1ede386d907 | PRIMARY KEY | PRIMARY KEY (id) |
| agents_messages_content_not_null | n | NOT NULL content |
| agents_messages_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_messages_id_not_null | n | NOT NULL id |
@@ -24,16 +26,14 @@
| agents_messages_role_not_null | n | NOT NULL role |
| agents_messages_threadId_not_null | n | NOT NULL "threadId" |
| agents_messages_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_81020dc608dfb0af1ede386d907 | PRIMARY KEY | PRIMARY KEY (id) |
| FK_0a8057a61afabd2999608ffd0d9 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_81020dc608dfb0af1ede386d907 | CREATE UNIQUE INDEX "PK_81020dc608dfb0af1ede386d907" ON public.agents_messages USING btree (id) |
| IDX_fc7bf858660bfafd19181e8e35 | CREATE INDEX "IDX_fc7bf858660bfafd19181e8e35" ON public.agents_messages USING btree ("threadId", "createdAt") |
| IDX_agents_messages_threadId_createdAt | CREATE INDEX "IDX_agents_messages_threadId_createdAt" ON public.agents_messages USING btree ("threadId", "createdAt") |
| IDX_fc7bf858660bfafd19181e8e35 | CREATE INDEX "IDX_fc7bf858660bfafd19181e8e35" ON public.agents_messages USING btree ("threadId", "createdAt") |
| PK_81020dc608dfb0af1ede386d907 | CREATE UNIQUE INDEX "PK_81020dc608dfb0af1ede386d907" ON public.agents_messages USING btree (id) |
## Relations
@@ -43,21 +43,21 @@ erDiagram
"public.agents_messages" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_messages" {
varchar_36_ id
varchar_255_ threadId FK
varchar_255_ resourceId
varchar_36_ role
varchar_36_ type
json content
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_255_ resourceId
varchar_36_ role
varchar_255_ threadId FK
varchar_36_ type
timestamp_3__with_time_zone updatedAt
}
"public.agents_threads" {
timestamp_3__with_time_zone createdAt
varchar_128_ id
text metadata
varchar_255_ resourceId
varchar_255_ title
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -5,32 +5,32 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this cursor |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream checkpointed by this cursor |
| lastObservedMessageId | varchar(36) | | false | | | |
| lastObservedAt | timestamp(3) with time zone | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| lastObservedAt | timestamp(3) with time zone | | false | | | |
| lastObservedMessageId | varchar(36) | | false | | | |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream checkpointed by this cursor |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_64e92819f4b413661ed6e2c3c3d | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_87aa187d27ea67eafd164905154 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| PK_eb777ac57ab872d38f8ebd19317 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") |
| agents_observation_cursors_agentId_not_null | n | NOT NULL "agentId" |
| agents_observation_cursors_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_observation_cursors_lastObservedAt_not_null | n | NOT NULL "lastObservedAt" |
| agents_observation_cursors_lastObservedMessageId_not_null | n | NOT NULL "lastObservedMessageId" |
| agents_observation_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
| agents_observation_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_64e92819f4b413661ed6e2c3c3d | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_eb777ac57ab872d38f8ebd19317 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") |
| FK_87aa187d27ea67eafd164905154 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_eb777ac57ab872d38f8ebd19317 | CREATE UNIQUE INDEX "PK_eb777ac57ab872d38f8ebd19317" ON public.agents_observation_cursors USING btree ("agentId", "observationScopeId") |
| IDX_87aa187d27ea67eafd16490515 | CREATE INDEX "IDX_87aa187d27ea67eafd16490515" ON public.agents_observation_cursors USING btree ("observationScopeId") |
| PK_eb777ac57ab872d38f8ebd19317 | CREATE UNIQUE INDEX "PK_eb777ac57ab872d38f8ebd19317" ON public.agents_observation_cursors USING btree ("agentId", "observationScopeId") |
## Relations
@@ -42,32 +42,32 @@ erDiagram
"public.agents_observation_cursors" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_36_ lastObservedMessageId
timestamp_3__with_time_zone lastObservedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastObservedAt
varchar_36_ lastObservedMessageId
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
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
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -5,11 +5,11 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this lock |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| heldUntil | timestamp(3) with time zone | | false | | | |
| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream locked for observation tasks |
| taskKind | varchar(20) | | false | | | |
| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID |
| heldUntil | timestamp(3) with time zone | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -17,6 +17,9 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| 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" |
@@ -24,16 +27,13 @@
| 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" |
| FK_093e44ae20f2518e97d83a95433 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_7e2e315162ac3d80587e15ac2c3 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId", "taskKind") |
| FK_6b55089892e447c2f82e5ec60ed | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_7e2e315162ac3d80587e15ac2c3 | CREATE UNIQUE INDEX "PK_7e2e315162ac3d80587e15ac2c3" ON public.agents_observation_locks USING btree ("agentId", "observationScopeId", "taskKind") |
| 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") |
## Relations
@@ -45,33 +45,33 @@ erDiagram
"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
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
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
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,16 +4,16 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.agents_observations](public.agents_observations.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | | Application-generated n8n string ID, not a database UUID |
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this observation row |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream for this observation log |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_observations](public.agents_observations.md) | | Application-generated n8n string ID, not a database UUID |
| marker | varchar(16) | | false | | | |
| text | text | | false | | | |
| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream for this observation log |
| parentId | varchar(36) | | true | | [public.agents_observations](public.agents_observations.md) | |
| tokenCount | integer | 0 | false | | | |
| status | varchar(16) | | false | | | |
| supersededBy | varchar(36) | | true | | [public.agents_observations](public.agents_observations.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| text | text | | false | | | |
| tokenCount | integer | 0 | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -22,6 +22,11 @@
| ---- | ---- | ---------- |
| CHK_agents_observations_marker | CHECK | CHECK (((marker)::text = ANY ((ARRAY['critical'::character varying, 'important'::character varying, 'info'::character varying, 'completion'::character varying])::text[]))) |
| CHK_agents_observations_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) |
| FK_127ee1078ffa952bb37b511efad | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_observations(id) |
| FK_4cfd8a70ebb0a5b0cf047dca3cf | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| FK_501e2d1701a10e24fb69ab5fc5f | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES agents_observations(id) |
| FK_d206432be97b7ed88d187479b1b | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| PK_9ad319654d12c2649f7caf27135 | PRIMARY KEY | PRIMARY KEY (id) |
| agents_observations_agentId_not_null | n | NOT NULL "agentId" |
| agents_observations_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_observations_id_not_null | n | NOT NULL id |
@@ -31,77 +36,72 @@
| agents_observations_text_not_null | n | NOT NULL text |
| agents_observations_tokenCount_not_null | n | NOT NULL "tokenCount" |
| agents_observations_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_d206432be97b7ed88d187479b1b | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_127ee1078ffa952bb37b511efad | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_observations(id) |
| FK_501e2d1701a10e24fb69ab5fc5f | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES agents_observations(id) |
| PK_9ad319654d12c2649f7caf27135 | PRIMARY KEY | PRIMARY KEY (id) |
| FK_4cfd8a70ebb0a5b0cf047dca3cf | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_9ad319654d12c2649f7caf27135 | CREATE UNIQUE INDEX "PK_9ad319654d12c2649f7caf27135" ON public.agents_observations USING btree (id) |
| IDX_07cb1e4a302629c5fa5d74d2bb | CREATE INDEX "IDX_07cb1e4a302629c5fa5d74d2bb" ON public.agents_observations USING btree ("agentId", "observationScopeId", status) |
| IDX_127ee1078ffa952bb37b511efa | CREATE INDEX "IDX_127ee1078ffa952bb37b511efa" ON public.agents_observations USING btree ("supersededBy") |
| IDX_4cfd8a70ebb0a5b0cf047dca3c | CREATE INDEX "IDX_4cfd8a70ebb0a5b0cf047dca3c" ON public.agents_observations USING btree ("observationScopeId") |
| IDX_501e2d1701a10e24fb69ab5fc5 | CREATE INDEX "IDX_501e2d1701a10e24fb69ab5fc5" ON public.agents_observations USING btree ("parentId") |
| IDX_127ee1078ffa952bb37b511efa | CREATE INDEX "IDX_127ee1078ffa952bb37b511efa" ON public.agents_observations USING btree ("supersededBy") |
| PK_9ad319654d12c2649f7caf27135 | CREATE UNIQUE INDEX "PK_9ad319654d12c2649f7caf27135" ON public.agents_observations USING btree (id) |
## Relations
```mermaid
erDiagram
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(id) ON DELETE CASCADE"
"public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_observations(id)"
"public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES agents_observations(id)"
"public.agents_memory_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_observations" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_16_ marker
text text
varchar_255_ observationScopeId FK
varchar_36_ parentId FK
integer tokenCount
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ id
varchar_36_ agentId FK
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
varchar_64_ evidenceHash
text evidenceText
timestamp_3__with_time_zone createdAt
text text
integer tokenCount
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
varchar_36_ id
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents_memory_entry_sources" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_64_ evidenceHash
text evidenceText
varchar_36_ id
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_threads" {
timestamp_3__with_time_zone createdAt
varchar_128_ id
text metadata
varchar_255_ resourceId
varchar_255_ title
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,19 +4,19 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(255) | | false | [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) | | |
| metadata | text | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_fa6b20b2d31a9991529dbf8ef7d | PRIMARY KEY | PRIMARY KEY (id) |
| agents_resources_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_resources_id_not_null | n | NOT NULL id |
| agents_resources_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_fa6b20b2d31a9991529dbf8ef7d | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -33,32 +33,32 @@ erDiagram
"public.agents_memory_entry_locks" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
"public.agents_resources" {
timestamp_3__with_time_zone createdAt
varchar_255_ id
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entries" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ resourceId FK
text content
varchar_64_ contentHash
timestamp_3__with_time_zone createdAt
json embedding
varchar_128_ embeddingModel
varchar_36_ id
timestamp_3__with_time_zone lastSeenAt
json metadata
varchar_255_ resourceId FK
varchar_16_ status
varchar_36_ supersededBy FK
varchar_128_ embeddingModel
json embedding
json metadata
timestamp_3__with_time_zone lastSeenAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_locks" {
varchar_36_ agentId FK
varchar_255_ resourceId FK
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
varchar_64_ holderId
varchar_255_ resourceId FK
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,22 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(128) | | false | [public.agents_messages](public.agents_messages.md) [public.agents_observations](public.agents_observations.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(128) | | false | [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_messages](public.agents_messages.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_observations](public.agents_observations.md) | | |
| metadata | text | | true | | | |
| resourceId | varchar(255) | | false | | | |
| title | varchar(255) | | true | | | |
| metadata | text | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_4a3feb0a13ffe315c009cce64e5 | PRIMARY KEY | PRIMARY KEY (id) |
| agents_threads_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_threads_id_not_null | n | NOT NULL id |
| agents_threads_resourceId_not_null | n | NOT NULL "resourceId" |
| agents_threads_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_4a3feb0a13ffe315c009cce64e5 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -33,78 +33,78 @@
```mermaid
erDiagram
"public.agents_memory_entry_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_messages" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_observation_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(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_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_memory_entry_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_threads" {
timestamp_3__with_time_zone createdAt
varchar_128_ id
text metadata
varchar_255_ resourceId
varchar_255_ title
text metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_messages" {
varchar_36_ id
varchar_255_ threadId FK
varchar_255_ resourceId
varchar_36_ role
varchar_36_ type
json content
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_observations" {
varchar_36_ id
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_16_ marker
text text
varchar_36_ parentId FK
integer tokenCount
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_observation_cursors" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_36_ lastObservedMessageId
timestamp_3__with_time_zone lastObservedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_observation_locks" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_20_ taskKind
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ id
varchar_36_ agentId FK
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
varchar_64_ evidenceHash
text evidenceText
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_cursors" {
varchar_36_ agentId FK
varchar_255_ observationScopeId FK
varchar_36_ lastIndexedObservationId
timestamp_3__with_time_zone lastIndexedObservationCreatedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastIndexedObservationCreatedAt
varchar_36_ lastIndexedObservationId
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_64_ evidenceHash
text evidenceText
varchar_36_ id
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_messages" {
json content
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_255_ resourceId
varchar_36_ role
varchar_255_ threadId FK
varchar_36_ type
timestamp_3__with_time_zone updatedAt
}
"public.agents_observation_cursors" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastObservedAt
varchar_36_ lastObservedMessageId
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"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_observations" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_16_ marker
varchar_255_ observationScopeId FK
varchar_36_ parentId FK
varchar_16_ status
varchar_36_ supersededBy FK
text text
integer tokenCount
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,74 +4,74 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_39b07732e819fb561d74c38763f | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| FK_85a87a1ba0f61999fe11dc56325 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_85a87a1ba0f61999fe11dc56325 | PRIMARY KEY | PRIMARY KEY ("workflowId") |
| ai_builder_temporary_workflow_createdAt_not_null | n | NOT NULL "createdAt" |
| ai_builder_temporary_workflow_threadId_not_null | n | NOT NULL "threadId" |
| ai_builder_temporary_workflow_updatedAt_not_null | n | NOT NULL "updatedAt" |
| ai_builder_temporary_workflow_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_85a87a1ba0f61999fe11dc56325 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| FK_39b07732e819fb561d74c38763f | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_85a87a1ba0f61999fe11dc56325 | PRIMARY KEY | PRIMARY KEY ("workflowId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_85a87a1ba0f61999fe11dc56325 | CREATE UNIQUE INDEX "PK_85a87a1ba0f61999fe11dc56325" ON public.ai_builder_temporary_workflow USING btree ("workflowId") |
| IDX_39b07732e819fb561d74c38763 | CREATE INDEX "IDX_39b07732e819fb561d74c38763" ON public.ai_builder_temporary_workflow USING btree ("threadId") |
| PK_85a87a1ba0f61999fe11dc56325 | CREATE UNIQUE INDEX "PK_85a87a1ba0f61999fe11dc56325" ON public.ai_builder_temporary_workflow USING btree ("workflowId") |
## Relations
```mermaid
erDiagram
"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.ai_builder_temporary_workflow" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.ai_builder_temporary_workflow" {
varchar_36_ workflowId FK
uuid threadId FK
timestamp_3__with_time_zone createdAt
uuid threadId FK
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"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
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
}
"public.instance_ai_threads" {
uuid id
varchar_255_ resourceId
text title
json metadata
timestamp_3__with_time_zone createdAt
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
integer versionCounter
character_36_ versionId
}
```
@@ -4,27 +4,27 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(16) | | false | [public.execution_annotation_tags](public.execution_annotation_tags.md) | | |
| name | varchar(24) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_69dfa041592c30bbc0d4b84aa00 | PRIMARY KEY | PRIMARY KEY (id) |
| annotation_tag_entity_createdAt_not_null | n | NOT NULL "createdAt" |
| annotation_tag_entity_id_not_null | n | NOT NULL id |
| annotation_tag_entity_name_not_null | n | NOT NULL name |
| annotation_tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_69dfa041592c30bbc0d4b84aa00 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_69dfa041592c30bbc0d4b84aa00 | CREATE UNIQUE INDEX "PK_69dfa041592c30bbc0d4b84aa00" ON public.annotation_tag_entity USING btree (id) |
| IDX_ae51b54c4bb430cf92f48b623f | CREATE UNIQUE INDEX "IDX_ae51b54c4bb430cf92f48b623f" ON public.annotation_tag_entity USING btree (name) |
| PK_69dfa041592c30bbc0d4b84aa00 | CREATE UNIQUE INDEX "PK_69dfa041592c30bbc0d4b84aa00" ON public.annotation_tag_entity USING btree (id) |
## Relations
@@ -34,9 +34,9 @@ erDiagram
"public.execution_annotation_tags" }o--|| "public.annotation_tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES annotation_tag_entity(id) ON DELETE CASCADE"
"public.annotation_tag_entity" {
timestamp_3__with_time_zone createdAt
varchar_16_ id
varchar_24_ name
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.execution_annotation_tags" {
@@ -4,22 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| userId | uuid | | true | | [public.user](public.user.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| providerId | varchar(255) | | false | | | |
| providerType | varchar(32) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | true | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| auth_identity_createdAt_not_null | n | NOT NULL "createdAt" |
| auth_identity_pkey | PRIMARY KEY | PRIMARY KEY ("providerId", "providerType") |
| auth_identity_providerId_not_null | n | NOT NULL "providerId" |
| auth_identity_providerType_not_null | n | NOT NULL "providerType" |
| auth_identity_updatedAt_not_null | n | NOT NULL "updatedAt" |
| auth_identity_userId_fkey | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) |
| auth_identity_pkey | PRIMARY KEY | PRIMARY KEY ("providerId", "providerType") |
## Indexes
@@ -35,28 +35,28 @@ erDiagram
"public.auth_identity" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id)"
"public.auth_identity" {
uuid userId FK
timestamp_3__with_time_zone createdAt
varchar_255_ providerId
varchar_32_ providerType
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,17 +4,17 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| created | integer | | false | | | |
| disabled | integer | | false | | | |
| endedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | |
| error | text | | true | | | |
| id | integer | nextval('auth_provider_sync_history_id_seq'::regclass) | false | | | |
| providerType | varchar(32) | | false | | | |
| runMode | text | | false | | | |
| status | text | | false | | | |
| startedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | |
| endedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | |
| scanned | integer | | false | | | |
| created | integer | | false | | | |
| startedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | |
| status | text | | false | | | |
| updated | integer | | false | | | |
| disabled | integer | | false | | | |
| error | text | | true | | | |
## Constraints
@@ -24,13 +24,13 @@
| auth_provider_sync_history_disabled_not_null | n | NOT NULL disabled |
| auth_provider_sync_history_endedAt_not_null | n | NOT NULL "endedAt" |
| auth_provider_sync_history_id_not_null | n | NOT NULL id |
| auth_provider_sync_history_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| auth_provider_sync_history_providerType_not_null | n | NOT NULL "providerType" |
| auth_provider_sync_history_runMode_not_null | n | NOT NULL "runMode" |
| auth_provider_sync_history_scanned_not_null | n | NOT NULL scanned |
| auth_provider_sync_history_startedAt_not_null | n | NOT NULL "startedAt" |
| auth_provider_sync_history_status_not_null | n | NOT NULL status |
| auth_provider_sync_history_updated_not_null | n | NOT NULL updated |
| auth_provider_sync_history_pkey | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -45,17 +45,17 @@ erDiagram
"public.auth_provider_sync_history" {
integer created
integer disabled
timestamp_3__with_time_zone endedAt
text error
integer id
varchar_32_ providerType
text runMode
text status
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone endedAt
integer scanned
integer created
timestamp_3__with_time_zone startedAt
text status
integer updated
integer disabled
text error
}
```
@@ -4,14 +4,14 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| fileId | uuid | | false | | | |
| sourceType | varchar(50) | | false | | | Source the file belongs to, e.g. 'execution' |
| sourceId | varchar(255) | | false | | | ID of the source, e.g. execution ID |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| data | bytea | | false | | | Raw, not base64 encoded |
| mimeType | varchar(255) | | true | | | |
| fileId | uuid | | false | | | |
| fileName | varchar(255) | | true | | | |
| fileSize | integer | | false | | | In bytes |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| mimeType | varchar(255) | | true | | | |
| sourceId | varchar(255) | | false | | | ID of the source, e.g. execution ID |
| sourceType | varchar(50) | | false | | | Source the file belongs to, e.g. 'execution' |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -19,6 +19,7 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_binary_data_sourceType | CHECK | CHECK ((("sourceType")::text = ANY ((ARRAY['execution'::character varying, 'chat_message_attachment'::character varying, 'agent_file'::character varying])::text[]))) |
| PK_fc3691585b39408bb0551122af6 | PRIMARY KEY | PRIMARY KEY ("fileId") |
| binary_data_createdAt_not_null | n | NOT NULL "createdAt" |
| binary_data_data_not_null | n | NOT NULL data |
| binary_data_fileId_not_null | n | NOT NULL "fileId" |
@@ -26,14 +27,13 @@
| binary_data_sourceId_not_null | n | NOT NULL "sourceId" |
| binary_data_sourceType_not_null | n | NOT NULL "sourceType" |
| binary_data_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_fc3691585b39408bb0551122af6 | PRIMARY KEY | PRIMARY KEY ("fileId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_fc3691585b39408bb0551122af6 | CREATE UNIQUE INDEX "PK_fc3691585b39408bb0551122af6" ON public.binary_data USING btree ("fileId") |
| IDX_56900edc3cfd16612e2ef2c6a8 | CREATE INDEX "IDX_56900edc3cfd16612e2ef2c6a8" ON public.binary_data USING btree ("sourceType", "sourceId") |
| PK_fc3691585b39408bb0551122af6 | CREATE UNIQUE INDEX "PK_fc3691585b39408bb0551122af6" ON public.binary_data USING btree ("fileId") |
## Relations
@@ -42,14 +42,14 @@ erDiagram
"public.binary_data" {
uuid fileId
varchar_50_ sourceType
varchar_255_ sourceId
timestamp_3__with_time_zone createdAt
bytea data
varchar_255_ mimeType
uuid fileId
varchar_255_ fileName
integer fileSize
timestamp_3__with_time_zone createdAt
varchar_255_ mimeType
varchar_255_ sourceId
varchar_50_ sourceType
timestamp_3__with_time_zone updatedAt
}
```
@@ -11,11 +11,11 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| chat_hub_agent_tools_agentId_not_null | n | NOT NULL "agentId" |
| chat_hub_agent_tools_toolId_not_null | n | NOT NULL "toolId" |
| FK_2b53d796b3dbae91b1a9553c048 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE CASCADE |
| FK_43e70f04c53344f82483d0570f6 | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE |
| PK_cc8806fdea48297a7d497035d72 | PRIMARY KEY | PRIMARY KEY ("agentId", "toolId") |
| chat_hub_agent_tools_agentId_not_null | n | NOT NULL "agentId" |
| chat_hub_agent_tools_toolId_not_null | n | NOT NULL "toolId" |
## Indexes
@@ -36,29 +36,29 @@ erDiagram
uuid toolId FK
}
"public.chat_hub_agents" {
uuid id
varchar_256_ name
varchar_512_ description
text systemPrompt
uuid ownerId FK
varchar_36_ credentialId FK
varchar_16_ provider
varchar_64_ model
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_36_ credentialId FK
varchar_512_ description
json files
json icon
uuid id
varchar_64_ model
varchar_256_ name
uuid ownerId FK
varchar_16_ provider
json suggestedPrompts
text systemPrompt
timestamp_3__with_time_zone updatedAt
}
"public.chat_hub_tools" {
uuid id
varchar_255_ name
varchar_255_ type
double_precision typeVersion
uuid ownerId FK
timestamp_3__with_time_zone createdAt
json definition
boolean enabled
timestamp_3__with_time_zone createdAt
uuid id
varchar_255_ name
uuid ownerId FK
varchar_255_ type
double_precision typeVersion
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,24 +4,27 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) | | |
| name | varchar(256) | | false | | | |
| description | varchar(512) | | true | | | |
| systemPrompt | text | | false | | | |
| ownerId | uuid | | false | | [public.user](public.user.md) | |
| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | |
| provider | varchar(16) | | false | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" |
| model | varchar(64) | | false | | | Model name used at the respective Model node, ie. "gpt-4" |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| icon | json | | true | | | |
| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | |
| description | varchar(512) | | true | | | |
| files | json | '[]'::json | false | | | |
| icon | json | | true | | | |
| id | uuid | | false | [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) | | |
| model | varchar(64) | | false | | | Model name used at the respective Model node, ie. "gpt-4" |
| name | varchar(256) | | false | | | |
| ownerId | uuid | | false | | [public.user](public.user.md) | |
| provider | varchar(16) | | false | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" |
| suggestedPrompts | json | '[]'::json | false | | | |
| systemPrompt | text | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_441ba2caba11e077ce3fbfa2cd8 | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_9c61ad497dcbae499c96a6a78ba | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL |
| PK_f39a3b36bbdf0e2979ddb21cf78 | PRIMARY KEY | PRIMARY KEY (id) |
| chat_hub_agents_createdAt_not_null | n | NOT NULL "createdAt" |
| chat_hub_agents_files_not_null | n | NOT NULL files |
| chat_hub_agents_id_not_null | n | NOT NULL id |
@@ -32,9 +35,6 @@
| chat_hub_agents_suggestedPrompts_not_null | n | NOT NULL "suggestedPrompts" |
| chat_hub_agents_systemPrompt_not_null | n | NOT NULL "systemPrompt" |
| chat_hub_agents_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_441ba2caba11e077ce3fbfa2cd8 | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_9c61ad497dcbae499c96a6a78ba | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL |
| PK_f39a3b36bbdf0e2979ddb21cf78 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -47,94 +47,94 @@
```mermaid
erDiagram
"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_agent_tools" }o--|| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE CASCADE"
"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_agents" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL"
"public.chat_hub_agent_tools" }o--|| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE CASCADE"
"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_agents" {
uuid id
varchar_256_ name
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_512_ description
text systemPrompt
uuid ownerId FK
varchar_36_ credentialId FK
varchar_16_ provider
varchar_64_ model
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
json files
json suggestedPrompts
}
"public.chat_hub_sessions" {
json icon
uuid id
varchar_256_ title
varchar_64_ model
varchar_256_ name
uuid ownerId FK
timestamp_3__with_time_zone lastMessageAt
varchar_36_ credentialId FK
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
json suggestedPrompts
text systemPrompt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_128_ agentName
varchar_16_ type
}
"public.chat_hub_messages" {
uuid id
uuid sessionId FK
uuid previousMessageId FK
uuid revisionOfMessageId FK
uuid retryOfMessageId FK
varchar_16_ type
varchar_128_ name
text content
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
integer executionId FK
"public.credentials_entity" {
timestamp_3__with_time_zone createdAt
text data
varchar_36_ id
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_16_ status
json attachments
}
"public.chat_hub_agent_tools" {
uuid agentId FK
uuid toolId FK
}
"public.user" {
"public.chat_hub_messages" {
uuid agentId FK
json attachments
text content
timestamp_3__with_time_zone createdAt
integer executionId FK
uuid id
varchar_256_ model
varchar_128_ name
uuid previousMessageId FK
varchar_16_ provider
uuid retryOfMessageId FK
uuid revisionOfMessageId FK
uuid sessionId FK
varchar_16_ status
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.chat_hub_sessions" {
uuid agentId FK
varchar_128_ agentName
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
timestamp_3__with_time_zone lastMessageAt
varchar_256_ model
uuid ownerId FK
varchar_16_ provider
varchar_256_ title
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
json settings
timestamp_3__with_time_zone updatedAt
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isResolvable
boolean resolvableAllowFallback
varchar_16_ resolverId FK
}
```
@@ -4,28 +4,36 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) | | |
| sessionId | uuid | | false | | [public.chat_hub_sessions](public.chat_hub_sessions.md) | |
| previousMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | |
| revisionOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | |
| retryOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | |
| type | varchar(16) | | false | | | ChatHubMessageType enum: "human", "ai", "system", "tool", "generic" |
| name | varchar(128) | | false | | | |
| content | text | | false | | | |
| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" |
| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" |
| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | |
| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| agentId | uuid | | true | | [public.chat_hub_agents](public.chat_hub_agents.md) | ID of the custom agent (if provider is "custom-agent") |
| status | varchar(16) | 'success'::character varying | false | | | ChatHubMessageStatus enum, eg. "success", "error", "running", "cancelled" |
| attachments | json | | true | | | File attachments for the message (if any), stored as JSON. Files are stored as base64-encoded data URLs. |
| content | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | |
| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) | | |
| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" |
| name | varchar(128) | | false | | | |
| previousMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | |
| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" |
| retryOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | |
| revisionOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | |
| sessionId | uuid | | false | | [public.chat_hub_sessions](public.chat_hub_sessions.md) | |
| status | varchar(16) | 'success'::character varying | false | | | ChatHubMessageStatus enum, eg. "success", "error", "running", "cancelled" |
| type | varchar(16) | | false | | | ChatHubMessageType enum: "human", "ai", "system", "tool", "generic" |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_1f4998c8a7dec9e00a9ab15550e | FOREIGN KEY | FOREIGN KEY ("revisionOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE |
| FK_25c9736e7f769f3a005eef4b372 | FOREIGN KEY | FOREIGN KEY ("retryOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE |
| FK_6afb260449dd7a9b85355d4e0c9 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL |
| FK_acf8926098f063cdbbad8497fd1 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL |
| FK_chat_hub_messages_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL |
| FK_e22538eb50a71a17954cd7e076c | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE |
| FK_e5d1fa722c5a8d38ac204746662 | FOREIGN KEY | FOREIGN KEY ("previousMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE |
| PK_7704a5add6baed43eef835f0bfb | PRIMARY KEY | PRIMARY KEY (id) |
| chat_hub_messages_content_not_null | n | NOT NULL content |
| chat_hub_messages_createdAt_not_null | n | NOT NULL "createdAt" |
| chat_hub_messages_id_not_null | n | NOT NULL id |
@@ -34,124 +42,116 @@
| chat_hub_messages_status_not_null | n | NOT NULL status |
| chat_hub_messages_type_not_null | n | NOT NULL type |
| chat_hub_messages_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_6afb260449dd7a9b85355d4e0c9 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL |
| FK_acf8926098f063cdbbad8497fd1 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL |
| FK_e22538eb50a71a17954cd7e076c | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE |
| FK_1f4998c8a7dec9e00a9ab15550e | FOREIGN KEY | FOREIGN KEY ("revisionOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE |
| FK_25c9736e7f769f3a005eef4b372 | FOREIGN KEY | FOREIGN KEY ("retryOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE |
| FK_e5d1fa722c5a8d38ac204746662 | FOREIGN KEY | FOREIGN KEY ("previousMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE |
| PK_7704a5add6baed43eef835f0bfb | PRIMARY KEY | PRIMARY KEY (id) |
| FK_chat_hub_messages_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_7704a5add6baed43eef835f0bfb | CREATE UNIQUE INDEX "PK_7704a5add6baed43eef835f0bfb" ON public.chat_hub_messages USING btree (id) |
| IDX_chat_hub_messages_sessionId | CREATE INDEX "IDX_chat_hub_messages_sessionId" ON public.chat_hub_messages USING btree ("sessionId") |
| PK_7704a5add6baed43eef835f0bfb | CREATE UNIQUE INDEX "PK_7704a5add6baed43eef835f0bfb" ON public.chat_hub_messages USING btree (id) |
## Relations
```mermaid
erDiagram
"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;revisionOfMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE"
"public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;retryOfMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE"
"public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;previousMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE"
"public.chat_hub_messages" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE"
"public.chat_hub_messages" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_messages" {
uuid id
uuid sessionId FK
uuid previousMessageId FK
uuid revisionOfMessageId FK
uuid retryOfMessageId FK
varchar_16_ type
varchar_128_ name
text content
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
integer executionId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_16_ status
json attachments
}
"public.chat_hub_sessions" {
text content
timestamp_3__with_time_zone createdAt
integer executionId FK
uuid id
varchar_256_ title
uuid ownerId FK
timestamp_3__with_time_zone lastMessageAt
varchar_36_ credentialId FK
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_128_ agentName
varchar_16_ type
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
json connections
timestamp_3__with_time_zone createdAt
uuid previousMessageId FK
varchar_16_ provider
uuid retryOfMessageId FK
uuid revisionOfMessageId FK
uuid sessionId FK
varchar_16_ status
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.chat_hub_agents" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_512_ description
json files
json icon
uuid id
varchar_64_ model
varchar_256_ name
uuid ownerId FK
varchar_16_ provider
json suggestedPrompts
text systemPrompt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
json nodeGroups
varchar sourceWorkflowId
}
"public.execution_entity" {
integer id
timestamp_3__with_time_zone createdAt
varchar_255_ deduplicationKey
timestamp_3__with_time_zone deletedAt
boolean finished
integer id
bigint jsonSizeBytes
varchar mode
varchar retryOf
varchar retrySuccessId
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
timestamp_3__with_time_zone waitTill
varchar status
varchar_36_ workflowId FK
timestamp_3__with_time_zone deletedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
json tracingContext
varchar_255_ deduplicationKey
bigint jsonSizeBytes
timestamp_3__with_time_zone waitTill
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
"public.chat_hub_agents" {
uuid id
varchar_256_ name
varchar_512_ description
text systemPrompt
uuid ownerId FK
varchar_36_ credentialId FK
varchar_16_ provider
varchar_64_ model
"public.chat_hub_sessions" {
uuid agentId FK
varchar_128_ agentName
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
timestamp_3__with_time_zone lastMessageAt
varchar_256_ model
uuid ownerId FK
varchar_16_ provider
varchar_256_ title
varchar_16_ type
timestamp_3__with_time_zone updatedAt
json icon
json files
json suggestedPrompts
varchar_36_ workflowId FK
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -11,11 +11,11 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_6596a328affd8d4967ffb303eee | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE |
| FK_e649bf1295f4ed8d4299ed290f9 | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE |
| PK_87aea76ff4c274c4a5ac838ebe3 | PRIMARY KEY | PRIMARY KEY ("sessionId", "toolId") |
| chat_hub_session_tools_sessionId_not_null | n | NOT NULL "sessionId" |
| chat_hub_session_tools_toolId_not_null | n | NOT NULL "toolId" |
| FK_e649bf1295f4ed8d4299ed290f9 | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE |
| FK_6596a328affd8d4967ffb303eee | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE |
| PK_87aea76ff4c274c4a5ac838ebe3 | PRIMARY KEY | PRIMARY KEY ("sessionId", "toolId") |
## Indexes
@@ -36,29 +36,29 @@ erDiagram
uuid toolId FK
}
"public.chat_hub_sessions" {
uuid id
varchar_256_ title
uuid ownerId FK
timestamp_3__with_time_zone lastMessageAt
varchar_36_ credentialId FK
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_128_ agentName
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
timestamp_3__with_time_zone lastMessageAt
varchar_256_ model
uuid ownerId FK
varchar_16_ provider
varchar_256_ title
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.chat_hub_tools" {
uuid id
varchar_255_ name
varchar_255_ type
double_precision typeVersion
uuid ownerId FK
timestamp_3__with_time_zone createdAt
json definition
boolean enabled
timestamp_3__with_time_zone createdAt
uuid id
varchar_255_ name
uuid ownerId FK
varchar_255_ type
double_precision typeVersion
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,25 +4,30 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | | |
| title | varchar(256) | | false | | | |
| ownerId | uuid | | false | | [public.user](public.user.md) | |
| lastMessageAt | timestamp(3) with time zone | | false | | | |
| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | |
| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" |
| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" |
| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| agentId | uuid | | true | | [public.chat_hub_agents](public.chat_hub_agents.md) | ID of the custom agent (if provider is "custom-agent") |
| agentName | varchar(128) | | true | | | Cached name of the custom agent (if provider is "custom-agent") |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | |
| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | | |
| lastMessageAt | timestamp(3) with time zone | | false | | | |
| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" |
| ownerId | uuid | | false | | [public.user](public.user.md) | |
| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" |
| title | varchar(256) | | false | | | |
| type | varchar(16) | 'production'::character varying | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_chat_hub_sessions_type | CHECK | CHECK (((type)::text = ANY ((ARRAY['production'::character varying, 'manual'::character varying])::text[]))) |
| FK_7bc13b4c7e6afbfaf9be326c189 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL |
| FK_9f9293d9f552496c40e0d1a8f80 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL |
| FK_chat_hub_sessions_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL |
| FK_e9ecf8ede7d989fcd18790fe36a | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_1eafef1273c70e4464fec703412 | PRIMARY KEY | PRIMARY KEY (id) |
| chat_hub_sessions_createdAt_not_null | n | NOT NULL "createdAt" |
| chat_hub_sessions_id_not_null | n | NOT NULL id |
| chat_hub_sessions_lastMessageAt_not_null | n | NOT NULL "lastMessageAt" |
@@ -30,135 +35,130 @@
| chat_hub_sessions_title_not_null | n | NOT NULL title |
| chat_hub_sessions_type_not_null | n | NOT NULL type |
| chat_hub_sessions_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_e9ecf8ede7d989fcd18790fe36a | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_9f9293d9f552496c40e0d1a8f80 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL |
| FK_7bc13b4c7e6afbfaf9be326c189 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL |
| PK_1eafef1273c70e4464fec703412 | PRIMARY KEY | PRIMARY KEY (id) |
| FK_chat_hub_sessions_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_1eafef1273c70e4464fec703412 | CREATE UNIQUE INDEX "PK_1eafef1273c70e4464fec703412" ON public.chat_hub_sessions USING btree (id) |
| IDX_chat_hub_sessions_owner_lastmsg_id | CREATE INDEX "IDX_chat_hub_sessions_owner_lastmsg_id" ON public.chat_hub_sessions USING btree ("ownerId", "lastMessageAt" DESC, id) |
| PK_1eafef1273c70e4464fec703412 | CREATE UNIQUE INDEX "PK_1eafef1273c70e4464fec703412" ON public.chat_hub_sessions USING btree (id) |
## Relations
```mermaid
erDiagram
"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE"
"public.chat_hub_session_tools" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE"
"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL"
"public.chat_hub_sessions" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL"
"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
"public.chat_hub_sessions" {
uuid id
varchar_256_ title
uuid ownerId FK
timestamp_3__with_time_zone lastMessageAt
varchar_36_ credentialId FK
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_128_ agentName
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
timestamp_3__with_time_zone lastMessageAt
varchar_256_ model
uuid ownerId FK
varchar_16_ provider
varchar_256_ title
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.chat_hub_agents" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_512_ description
json files
json icon
uuid id
varchar_64_ model
varchar_256_ name
uuid ownerId FK
varchar_16_ provider
json suggestedPrompts
text systemPrompt
timestamp_3__with_time_zone updatedAt
}
"public.credentials_entity" {
timestamp_3__with_time_zone createdAt
text data
varchar_36_ id
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
"public.chat_hub_messages" {
uuid id
uuid sessionId FK
uuid previousMessageId FK
uuid revisionOfMessageId FK
uuid retryOfMessageId FK
varchar_16_ type
varchar_128_ name
text content
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
integer executionId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_16_ status
json attachments
text content
timestamp_3__with_time_zone createdAt
integer executionId FK
uuid id
varchar_256_ model
varchar_128_ name
uuid previousMessageId FK
varchar_16_ provider
uuid retryOfMessageId FK
uuid revisionOfMessageId FK
uuid sessionId FK
varchar_16_ status
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.chat_hub_session_tools" {
uuid sessionId FK
uuid toolId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
json settings
timestamp_3__with_time_zone updatedAt
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isResolvable
boolean resolvableAllowFallback
varchar_16_ resolverId FK
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
}
"public.chat_hub_agents" {
uuid id
varchar_256_ name
varchar_512_ description
text systemPrompt
uuid ownerId FK
varchar_36_ credentialId FK
varchar_16_ provider
varchar_64_ model
timestamp_3__with_time_zone createdAt
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
json icon
json files
json suggestedPrompts
integer versionCounter
character_36_ versionId
}
```
@@ -4,20 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | [public.chat_hub_session_tools](public.chat_hub_session_tools.md) [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) | | |
| name | varchar(255) | | false | | | |
| type | varchar(255) | | false | | | |
| typeVersion | double precision | | false | | | |
| ownerId | uuid | | false | | [public.user](public.user.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| definition | json | | false | | | |
| enabled | boolean | true | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | uuid | | false | [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | | |
| name | varchar(255) | | false | | | |
| ownerId | uuid | | false | | [public.user](public.user.md) | |
| type | varchar(255) | | false | | | |
| typeVersion | double precision | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_b8030b47af9213f1fd15450fb7f | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_696d26426c704fba79b2c195ef5 | PRIMARY KEY | PRIMARY KEY (id) |
| chat_hub_tools_createdAt_not_null | n | NOT NULL "createdAt" |
| chat_hub_tools_definition_not_null | n | NOT NULL definition |
| chat_hub_tools_enabled_not_null | n | NOT NULL enabled |
@@ -27,60 +29,58 @@
| chat_hub_tools_typeVersion_not_null | n | NOT NULL "typeVersion" |
| chat_hub_tools_type_not_null | n | NOT NULL type |
| chat_hub_tools_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_b8030b47af9213f1fd15450fb7f | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_696d26426c704fba79b2c195ef5 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_696d26426c704fba79b2c195ef5 | CREATE UNIQUE INDEX "PK_696d26426c704fba79b2c195ef5" ON public.chat_hub_tools USING btree (id) |
| IDX_4c72ebdb265d1775bf61147af0 | CREATE UNIQUE INDEX "IDX_4c72ebdb265d1775bf61147af0" ON public.chat_hub_tools USING btree ("ownerId", name) |
| PK_696d26426c704fba79b2c195ef5 | CREATE UNIQUE INDEX "PK_696d26426c704fba79b2c195ef5" ON public.chat_hub_tools USING btree (id) |
## Relations
```mermaid
erDiagram
"public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
"public.chat_hub_agent_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
"public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_tools" {
uuid id
varchar_255_ name
varchar_255_ type
double_precision typeVersion
uuid ownerId FK
timestamp_3__with_time_zone createdAt
json definition
boolean enabled
timestamp_3__with_time_zone createdAt
uuid id
varchar_255_ name
uuid ownerId FK
varchar_255_ type
double_precision typeVersion
timestamp_3__with_time_zone updatedAt
}
"public.chat_hub_session_tools" {
uuid sessionId FK
uuid toolId FK
}
"public.chat_hub_agent_tools" {
uuid agentId FK
uuid toolId FK
}
"public.chat_hub_session_tools" {
uuid sessionId FK
uuid toolId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,32 +4,32 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | | false | | | |
| credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| dependencyType | varchar(64) | | false | | | |
| dependencyId | varchar(255) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| dependencyId | varchar(255) | | false | | | |
| dependencyType | varchar(64) | | false | | | |
| id | integer | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_5ec8e8c8d3539f3696cf73b43bf | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| PK_80212729ed0ffa0709417ab28f4 | PRIMARY KEY | PRIMARY KEY (id) |
| credential_dependency_createdAt_not_null | n | NOT NULL "createdAt" |
| credential_dependency_credentialId_not_null | n | NOT NULL "credentialId" |
| credential_dependency_dependencyId_not_null | n | NOT NULL "dependencyId" |
| credential_dependency_dependencyType_not_null | n | NOT NULL "dependencyType" |
| credential_dependency_id_not_null | n | NOT NULL id |
| FK_5ec8e8c8d3539f3696cf73b43bf | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| PK_80212729ed0ffa0709417ab28f4 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_80212729ed0ffa0709417ab28f4 | CREATE UNIQUE INDEX "PK_80212729ed0ffa0709417ab28f4" ON public.credential_dependency USING btree (id) |
| IDX_5ec8e8c8d3539f3696cf73b43b | CREATE INDEX "IDX_5ec8e8c8d3539f3696cf73b43b" ON public.credential_dependency USING btree ("credentialId") |
| IDX_91ee85fa9619dd6776725e117b | CREATE INDEX "IDX_91ee85fa9619dd6776725e117b" ON public.credential_dependency USING btree ("dependencyType", "dependencyId") |
| IDX_credential_dependency_credentialId_dependencyType_dependenc | CREATE UNIQUE INDEX "IDX_credential_dependency_credentialId_dependencyType_dependenc" ON public.credential_dependency USING btree ("credentialId", "dependencyType", "dependencyId") |
| PK_80212729ed0ffa0709417ab28f4 | CREATE UNIQUE INDEX "PK_80212729ed0ffa0709417ab28f4" ON public.credential_dependency USING btree (id) |
## Relations
@@ -39,24 +39,24 @@ erDiagram
"public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.credential_dependency" {
integer id
varchar_36_ credentialId FK
varchar_64_ dependencyType
varchar_255_ dependencyId
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_255_ dependencyId
varchar_64_ dependencyType
integer id
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,17 +4,17 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| name | varchar(128) | | false | | | |
| data | text | | false | | | |
| type | varchar(128) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.shared_credentials](public.shared_credentials.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) [public.credential_dependency](public.credential_dependency.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | | |
| isManaged | boolean | false | false | | | |
| data | text | | false | | | |
| id | varchar(36) | | false | [public.chat_hub_agents](public.chat_hub_agents.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.credential_dependency](public.credential_dependency.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) [public.shared_credentials](public.shared_credentials.md) | | |
| isGlobal | boolean | false | false | | | |
| isManaged | boolean | false | false | | | |
| isResolvable | boolean | false | false | | | |
| name | varchar(128) | | false | | | |
| resolvableAllowFallback | boolean | false | false | | | |
| resolverId | varchar(16) | | true | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | |
| type | varchar(128) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -27,122 +27,122 @@
| credentials_entity_isManaged_not_null | n | NOT NULL "isManaged" |
| credentials_entity_isResolvable_not_null | n | NOT NULL "isResolvable" |
| credentials_entity_name_not_null | n | NOT NULL name |
| credentials_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| credentials_entity_resolvableAllowFallback_not_null | n | NOT NULL "resolvableAllowFallback" |
| credentials_entity_resolverId_foreign | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL |
| credentials_entity_type_not_null | n | NOT NULL type |
| credentials_entity_updatedAt_not_null | n | NOT NULL "updatedAt" |
| credentials_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| credentials_entity_resolverId_foreign | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL |
## Indexes
| Name | Definition |
| ---- | ---------- |
| credentials_entity_pkey | CREATE UNIQUE INDEX credentials_entity_pkey ON public.credentials_entity USING btree (id) |
| idx_07fde106c0b471d8cc80a64fc8 | CREATE INDEX idx_07fde106c0b471d8cc80a64fc8 ON public.credentials_entity USING btree (type) |
| pk_credentials_entity_id | CREATE UNIQUE INDEX pk_credentials_entity_id ON public.credentials_entity USING btree (id) |
| credentials_entity_pkey | CREATE UNIQUE INDEX credentials_entity_pkey ON public.credentials_entity USING btree (id) |
## Relations
```mermaid
erDiagram
"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL"
"public.chat_hub_agents" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL"
"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL"
"public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.instance_ai_mcp_registry_connections" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL"
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
"public.shared_credentials" {
varchar_36_ credentialsId FK
varchar_36_ projectId FK
text role
"public.chat_hub_agents" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_512_ description
json files
json icon
uuid id
varchar_64_ model
varchar_256_ name
uuid ownerId FK
varchar_16_ provider
json suggestedPrompts
text systemPrompt
timestamp_3__with_time_zone updatedAt
}
"public.chat_hub_sessions" {
uuid id
varchar_256_ title
uuid ownerId FK
timestamp_3__with_time_zone lastMessageAt
varchar_36_ credentialId FK
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_128_ agentName
varchar_16_ type
}
"public.chat_hub_agents" {
uuid id
varchar_256_ name
varchar_512_ description
text systemPrompt
uuid ownerId FK
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
timestamp_3__with_time_zone lastMessageAt
varchar_256_ model
uuid ownerId FK
varchar_16_ provider
varchar_64_ model
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
json files
json suggestedPrompts
}
"public.dynamic_credential_user_entry" {
varchar_16_ credentialId FK
uuid userId FK
varchar_16_ resolverId FK
text data
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_entry" {
varchar_16_ credential_id FK
varchar_2048_ subject_id
varchar_16_ resolver_id FK
text data
timestamp_3__with_time_zone createdAt
varchar_256_ title
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.credential_dependency" {
integer id
varchar_36_ credentialId FK
varchar_64_ dependencyType
varchar_255_ dependencyId
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_255_ dependencyId
varchar_64_ dependencyType
integer id
}
"public.dynamic_credential_entry" {
timestamp_3__with_time_zone createdAt
varchar_16_ credential_id FK
text data
varchar_16_ resolver_id FK
varchar_2048_ subject_id
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_user_entry" {
timestamp_3__with_time_zone createdAt
varchar_16_ credentialId FK
text data
varchar_16_ resolverId FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.instance_ai_mcp_registry_connections" {
uuid id
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
varchar_255_ serverSlug FK
json toolFilter
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.shared_credentials" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialsId FK
varchar_36_ projectId FK
text role
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_resolver" {
text config
timestamp_3__with_time_zone createdAt
varchar_16_ id
varchar_128_ name
varchar_128_ type
text config
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,24 +4,24 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.data_table_column](public.data_table_column.md) | | |
| name | varchar(128) | | false | | | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_c2a794257dee48af7c9abf681de | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_e226d0001b9e6097cbfe70617cb | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_b23096ef747281ac944d28e8b0d | UNIQUE | UNIQUE ("projectId", name) |
| data_table_createdAt_not_null | n | NOT NULL "createdAt" |
| data_table_id_not_null | n | NOT NULL id |
| data_table_name_not_null | n | NOT NULL name |
| data_table_projectId_not_null | n | NOT NULL "projectId" |
| data_table_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_c2a794257dee48af7c9abf681de | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_e226d0001b9e6097cbfe70617cb | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_b23096ef747281ac944d28e8b0d | UNIQUE | UNIQUE ("projectId", name) |
## Indexes
@@ -39,31 +39,31 @@ erDiagram
"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.data_table" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_128_ name
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.data_table_column" {
timestamp_3__with_time_zone createdAt
varchar_36_ dataTableId FK
varchar_36_ id
integer index
varchar_128_ name
varchar_32_ type
integer index
varchar_36_ dataTableId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
```
@@ -4,18 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| dataTableId | varchar(36) | | false | | [public.data_table](public.data_table.md) | |
| id | varchar(36) | | false | | | |
| index | integer | | false | | | Column order, starting from 0 (0 = first column) |
| name | varchar(128) | | false | | | |
| type | varchar(32) | | false | | | Expected: string, number, boolean, or date (not enforced as a constraint) |
| index | integer | | false | | | Column order, starting from 0 (0 = first column) |
| dataTableId | varchar(36) | | false | | [public.data_table](public.data_table.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_930b6e8faaf88294cef23484160 | FOREIGN KEY | FOREIGN KEY ("dataTableId") REFERENCES data_table(id) ON DELETE CASCADE |
| PK_673cb121ee4a8a5e27850c72c51 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_8082ec4890f892f0bc77473a123 | UNIQUE | UNIQUE ("dataTableId", name) |
| data_table_column_createdAt_not_null | n | NOT NULL "createdAt" |
| data_table_column_dataTableId_not_null | n | NOT NULL "dataTableId" |
| data_table_column_id_not_null | n | NOT NULL id |
@@ -23,9 +26,6 @@
| data_table_column_name_not_null | n | NOT NULL name |
| data_table_column_type_not_null | n | NOT NULL type |
| data_table_column_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_930b6e8faaf88294cef23484160 | FOREIGN KEY | FOREIGN KEY ("dataTableId") REFERENCES data_table(id) ON DELETE CASCADE |
| PK_673cb121ee4a8a5e27850c72c51 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_8082ec4890f892f0bc77473a123 | UNIQUE | UNIQUE ("dataTableId", name) |
## Indexes
@@ -42,19 +42,19 @@ erDiagram
"public.data_table_column" }o--|| "public.data_table" : "FOREIGN KEY (#quot;dataTableId#quot;) REFERENCES data_table(id) ON DELETE CASCADE"
"public.data_table_column" {
timestamp_3__with_time_zone createdAt
varchar_36_ dataTableId FK
varchar_36_ id
integer index
varchar_128_ name
varchar_32_ type
integer index
varchar_36_ dataTableId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.data_table" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_128_ name
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,37 +4,37 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| type | varchar(64) | | false | | | |
| value | text | | false | | | |
| algorithm | varchar(20) | | true | | | |
| status | varchar(20) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | | | |
| status | varchar(20) | | false | | | |
| type | varchar(64) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| value | text | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_94bb7aeb5def5a0284a5fe9f9a0 | PRIMARY KEY | PRIMARY KEY (id) |
| deployment_key_createdAt_not_null | n | NOT NULL "createdAt" |
| deployment_key_id_not_null | n | NOT NULL id |
| deployment_key_status_not_null | n | NOT NULL status |
| deployment_key_type_not_null | n | NOT NULL type |
| deployment_key_updatedAt_not_null | n | NOT NULL "updatedAt" |
| deployment_key_value_not_null | n | NOT NULL value |
| PK_94bb7aeb5def5a0284a5fe9f9a0 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_94bb7aeb5def5a0284a5fe9f9a0 | CREATE UNIQUE INDEX "PK_94bb7aeb5def5a0284a5fe9f9a0" ON public.deployment_key USING btree (id) |
| IDX_deployment_key_data_encryption_active | CREATE UNIQUE INDEX "IDX_deployment_key_data_encryption_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'data_encryption'::text)) |
| IDX_deployment_key_instance_id_active | CREATE UNIQUE INDEX "IDX_deployment_key_instance_id_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'instance.id'::text)) |
| IDX_deployment_key_signing_jwt_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_jwt_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.jwt'::text)) |
| IDX_deployment_key_signing_hmac_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_hmac_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.hmac'::text)) |
| IDX_deployment_key_signing_binary_data_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_binary_data_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.binary_data'::text)) |
| IDX_deployment_key_jwe_private_key_active | CREATE UNIQUE INDEX "IDX_deployment_key_jwe_private_key_active" ON public.deployment_key USING btree (type, algorithm) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'jwe.private-key'::text)) |
| IDX_deployment_key_signing_binary_data_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_binary_data_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.binary_data'::text)) |
| IDX_deployment_key_signing_hmac_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_hmac_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.hmac'::text)) |
| IDX_deployment_key_signing_jwt_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_jwt_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.jwt'::text)) |
| PK_94bb7aeb5def5a0284a5fe9f9a0 | CREATE UNIQUE INDEX "PK_94bb7aeb5def5a0284a5fe9f9a0" ON public.deployment_key USING btree (id) |
## Relations
@@ -43,13 +43,13 @@ erDiagram
"public.deployment_key" {
varchar_36_ id
varchar_64_ type
text value
varchar_20_ algorithm
varchar_20_ status
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_20_ status
varchar_64_ type
timestamp_3__with_time_zone updatedAt
text value
}
```
@@ -4,34 +4,34 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| credential_id | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| subject_id | varchar(2048) | | false | | | |
| resolver_id | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | |
| data | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credential_id | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| data | text | | false | | | |
| resolver_id | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | |
| subject_id | varchar(2048) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_a6d1dd080958304a47a02952aab | FOREIGN KEY | FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_d61a12235d268a49af6a3c09c13 | FOREIGN KEY | FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE |
| PK_5135ffcabecad4727ff6b9b803d | PRIMARY KEY | PRIMARY KEY (credential_id, subject_id, resolver_id) |
| tmp_dynamic_credential_entry_createdAt_not_null | n | NOT NULL "createdAt" |
| tmp_dynamic_credential_entry_credential_id_not_null | n | NOT NULL credential_id |
| tmp_dynamic_credential_entry_data_not_null | n | NOT NULL data |
| tmp_dynamic_credential_entry_resolver_id_not_null | n | NOT NULL resolver_id |
| tmp_dynamic_credential_entry_subject_id_not_null | n | NOT NULL subject_id |
| tmp_dynamic_credential_entry_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_a6d1dd080958304a47a02952aab | FOREIGN KEY | FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_d61a12235d268a49af6a3c09c13 | FOREIGN KEY | FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE |
| PK_5135ffcabecad4727ff6b9b803d | PRIMARY KEY | PRIMARY KEY (credential_id, subject_id, resolver_id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_5135ffcabecad4727ff6b9b803d | CREATE UNIQUE INDEX "PK_5135ffcabecad4727ff6b9b803d" ON public.dynamic_credential_entry USING btree (credential_id, subject_id, resolver_id) |
| IDX_62476b94b56d9dc7ed9ed75d3d | CREATE INDEX "IDX_62476b94b56d9dc7ed9ed75d3d" ON public.dynamic_credential_entry USING btree (subject_id) |
| IDX_d61a12235d268a49af6a3c09c1 | CREATE INDEX "IDX_d61a12235d268a49af6a3c09c1" ON public.dynamic_credential_entry USING btree (resolver_id) |
| PK_5135ffcabecad4727ff6b9b803d | CREATE UNIQUE INDEX "PK_5135ffcabecad4727ff6b9b803d" ON public.dynamic_credential_entry USING btree (credential_id, subject_id, resolver_id) |
## Relations
@@ -42,32 +42,32 @@ erDiagram
"public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
"public.dynamic_credential_entry" {
varchar_16_ credential_id FK
varchar_2048_ subject_id
varchar_16_ resolver_id FK
text data
timestamp_3__with_time_zone createdAt
varchar_16_ credential_id FK
text data
varchar_16_ resolver_id FK
varchar_2048_ subject_id
timestamp_3__with_time_zone updatedAt
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_resolver" {
text config
timestamp_3__with_time_zone createdAt
varchar_16_ id
varchar_128_ name
varchar_128_ type
text config
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,31 +4,31 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(16) | | false | [public.credentials_entity](public.credentials_entity.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) | | |
| name | varchar(128) | | false | | | |
| type | varchar(128) | | false | | | |
| config | text | | false | | | Encrypted resolver configuration (JSON encrypted as string) |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(16) | | false | [public.credentials_entity](public.credentials_entity.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) | | |
| name | varchar(128) | | false | | | |
| type | varchar(128) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_b76cfb088dcdaf5275e9980bb64 | PRIMARY KEY | PRIMARY KEY (id) |
| dynamic_credential_resolver_config_not_null | n | NOT NULL config |
| dynamic_credential_resolver_createdAt_not_null | n | NOT NULL "createdAt" |
| dynamic_credential_resolver_id_not_null | n | NOT NULL id |
| dynamic_credential_resolver_name_not_null | n | NOT NULL name |
| dynamic_credential_resolver_type_not_null | n | NOT NULL type |
| dynamic_credential_resolver_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_b76cfb088dcdaf5275e9980bb64 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_b76cfb088dcdaf5275e9980bb64 | CREATE UNIQUE INDEX "PK_b76cfb088dcdaf5275e9980bb64" ON public.dynamic_credential_resolver USING btree (id) |
| IDX_9c9ee9df586e60bb723234e499 | CREATE INDEX "IDX_9c9ee9df586e60bb723234e499" ON public.dynamic_credential_resolver USING btree (type) |
| PK_b76cfb088dcdaf5275e9980bb64 | CREATE UNIQUE INDEX "PK_b76cfb088dcdaf5275e9980bb64" ON public.dynamic_credential_resolver USING btree (id) |
## Relations
@@ -36,46 +36,46 @@
erDiagram
"public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL"
"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
"public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
"public.dynamic_credential_resolver" {
text config
timestamp_3__with_time_zone createdAt
varchar_16_ id
varchar_128_ name
varchar_128_ type
text config
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
}
"public.dynamic_credential_user_entry" {
varchar_16_ credentialId FK
uuid userId FK
varchar_16_ resolverId FK
text data
timestamp_3__with_time_zone createdAt
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_entry" {
varchar_16_ credential_id FK
varchar_2048_ subject_id
varchar_16_ resolver_id FK
text data
timestamp_3__with_time_zone createdAt
varchar_16_ credential_id FK
text data
varchar_16_ resolver_id FK
varchar_2048_ subject_id
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_user_entry" {
timestamp_3__with_time_zone createdAt
varchar_16_ credentialId FK
text data
varchar_16_ resolverId FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
```
---
@@ -4,35 +4,35 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| credentialId | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| resolverId | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | |
| data | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credentialId | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| data | text | | false | | | |
| resolverId | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_6edec973a6450990977bb854c38 | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE |
| FK_945ba70b342a066d1306b12ccd2 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_a36dc616fabc3f736bb82410a22 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_74f548e633abc66dc27c8f0ca77 | PRIMARY KEY | PRIMARY KEY ("credentialId", "userId", "resolverId") |
| dynamic_credential_user_entry_createdAt_not_null | n | NOT NULL "createdAt" |
| dynamic_credential_user_entry_credentialId_not_null | n | NOT NULL "credentialId" |
| dynamic_credential_user_entry_data_not_null | n | NOT NULL data |
| dynamic_credential_user_entry_resolverId_not_null | n | NOT NULL "resolverId" |
| dynamic_credential_user_entry_updatedAt_not_null | n | NOT NULL "updatedAt" |
| dynamic_credential_user_entry_userId_not_null | n | NOT NULL "userId" |
| FK_a36dc616fabc3f736bb82410a22 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_945ba70b342a066d1306b12ccd2 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_6edec973a6450990977bb854c38 | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE |
| PK_74f548e633abc66dc27c8f0ca77 | PRIMARY KEY | PRIMARY KEY ("credentialId", "userId", "resolverId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_74f548e633abc66dc27c8f0ca77 | CREATE UNIQUE INDEX "PK_74f548e633abc66dc27c8f0ca77" ON public.dynamic_credential_user_entry USING btree ("credentialId", "userId", "resolverId") |
| IDX_a36dc616fabc3f736bb82410a2 | CREATE INDEX "IDX_a36dc616fabc3f736bb82410a2" ON public.dynamic_credential_user_entry USING btree ("userId") |
| IDX_6edec973a6450990977bb854c3 | CREATE INDEX "IDX_6edec973a6450990977bb854c3" ON public.dynamic_credential_user_entry USING btree ("resolverId") |
| IDX_a36dc616fabc3f736bb82410a2 | CREATE INDEX "IDX_a36dc616fabc3f736bb82410a2" ON public.dynamic_credential_user_entry USING btree ("userId") |
| PK_74f548e633abc66dc27c8f0ca77 | CREATE UNIQUE INDEX "PK_74f548e633abc66dc27c8f0ca77" ON public.dynamic_credential_user_entry USING btree ("credentialId", "userId", "resolverId") |
## Relations
@@ -40,53 +40,53 @@
erDiagram
"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" {
varchar_16_ credentialId FK
uuid userId FK
varchar_16_ resolverId FK
text data
timestamp_3__with_time_zone createdAt
varchar_16_ credentialId FK
text data
varchar_16_ resolverId FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
}
"public.user" {
uuid id
varchar_255_ email
varchar_32_ firstName
varchar_32_ lastName
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
varchar_128_ type
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.dynamic_credential_resolver" {
text config
timestamp_3__with_time_zone createdAt
varchar_16_ id
varchar_128_ name
varchar_128_ type
text config
timestamp_3__with_time_zone updatedAt
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
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
}
```
@@ -4,130 +4,130 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.test_run](public.test_run.md) | | |
| name | varchar(128) | | false | | | |
| description | text | | true | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| evaluationConfigId | varchar(36) | | false | | [public.evaluation_config](public.evaluation_config.md) | |
| createdById | uuid | | true | | [public.user](public.user.md) | |
| insightsCache | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| createdById | uuid | | true | | [public.user](public.user.md) | |
| description | text | | true | | | |
| evaluationConfigId | varchar(36) | | false | | [public.evaluation_config](public.evaluation_config.md) | |
| id | varchar(36) | | false | [public.test_run](public.test_run.md) | | |
| insightsCache | json | | true | | | |
| name | varchar(128) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_a48ce930c3bc7604894b8f0eaad | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| FK_d634a0c93fd7de68a87eab951b2 | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE CASCADE |
| FK_f4561f38b5a22a4f090d5cd3eae | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
| PK_e720b6efc1e45b878ebb0b2ca30 | PRIMARY KEY | PRIMARY KEY (id) |
| evaluation_collection_createdAt_not_null | n | NOT NULL "createdAt" |
| evaluation_collection_evaluationConfigId_not_null | n | NOT NULL "evaluationConfigId" |
| evaluation_collection_id_not_null | n | NOT NULL id |
| evaluation_collection_name_not_null | n | NOT NULL name |
| evaluation_collection_updatedAt_not_null | n | NOT NULL "updatedAt" |
| evaluation_collection_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_f4561f38b5a22a4f090d5cd3eae | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
| FK_a48ce930c3bc7604894b8f0eaad | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| FK_d634a0c93fd7de68a87eab951b2 | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE CASCADE |
| PK_e720b6efc1e45b878ebb0b2ca30 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_e720b6efc1e45b878ebb0b2ca30 | CREATE UNIQUE INDEX "PK_e720b6efc1e45b878ebb0b2ca30" ON public.evaluation_collection USING btree (id) |
| IDX_a48ce930c3bc7604894b8f0eaa | CREATE INDEX "IDX_a48ce930c3bc7604894b8f0eaa" ON public.evaluation_collection USING btree ("workflowId") |
| IDX_d634a0c93fd7de68a87eab951b | CREATE INDEX "IDX_d634a0c93fd7de68a87eab951b" ON public.evaluation_collection USING btree ("evaluationConfigId") |
| PK_e720b6efc1e45b878ebb0b2ca30 | CREATE UNIQUE INDEX "PK_e720b6efc1e45b878ebb0b2ca30" ON public.evaluation_collection USING btree (id) |
## Relations
```mermaid
erDiagram
"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE"
"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL"
"public.evaluation_collection" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE"
"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.evaluation_collection" {
varchar_36_ id
varchar_128_ name
text description
varchar_36_ workflowId FK
varchar_36_ evaluationConfigId FK
timestamp_3__with_time_zone createdAt
uuid createdById FK
json insightsCache
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.test_run" {
varchar_36_ id
varchar_36_ workflowId FK
varchar status
varchar errorCode
json errorDetails
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_255_ runningInstanceId
boolean cancelRequested
varchar_36_ workflowVersionId
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ collectionId FK
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
json nodeGroups
varchar sourceWorkflowId
}
"public.evaluation_config" {
varchar_36_ evaluationConfigId FK
varchar_36_ id
varchar_36_ workflowId FK
json insightsCache
varchar_128_ name
varchar_16_ status
varchar_64_ invalidReason
varchar_32_ datasetSource
json datasetRef
varchar_255_ startNodeName
varchar_255_ endNodeName
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
"public.evaluation_config" {
timestamp_3__with_time_zone createdAt
json datasetRef
varchar_32_ datasetSource
varchar_255_ endNodeName
varchar_36_ id
varchar_64_ invalidReason
json metrics
varchar_128_ name
varchar_255_ startNodeName
varchar_16_ status
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.test_run" {
boolean cancelRequested
varchar_36_ collectionId FK
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ id
json metrics
timestamp_3__with_time_zone runAt
varchar_255_ runningInstanceId
varchar status
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -4,23 +4,26 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.test_run](public.test_run.md) [public.evaluation_collection](public.evaluation_collection.md) | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| name | varchar(128) | | false | | | |
| status | varchar(16) | 'valid'::character varying | false | | | |
| invalidReason | varchar(64) | | true | | | |
| datasetSource | varchar(32) | | false | | | |
| datasetRef | json | | false | | | |
| startNodeName | varchar(255) | | false | | | |
| endNodeName | varchar(255) | | false | | | |
| metrics | json | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| datasetRef | json | | false | | | |
| datasetSource | varchar(32) | | false | | | |
| endNodeName | varchar(255) | | false | | | |
| id | varchar(36) | | false | [public.evaluation_collection](public.evaluation_collection.md) [public.test_run](public.test_run.md) | | |
| invalidReason | varchar(64) | | true | | | |
| metrics | json | | false | | | |
| name | varchar(128) | | false | | | |
| startNodeName | varchar(255) | | false | | | |
| status | varchar(16) | 'valid'::character varying | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_fd7542bb123074760285dc1bbf3 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_59c14dccf8989df94070c2dcfda | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_3c3c99a712e971835c52292e44c | UNIQUE | UNIQUE ("workflowId", name) |
| evaluation_config_createdAt_not_null | n | NOT NULL "createdAt" |
| evaluation_config_datasetRef_not_null | n | NOT NULL "datasetRef" |
| evaluation_config_datasetSource_not_null | n | NOT NULL "datasetSource" |
@@ -32,91 +35,88 @@
| evaluation_config_status_not_null | n | NOT NULL status |
| evaluation_config_updatedAt_not_null | n | NOT NULL "updatedAt" |
| evaluation_config_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_fd7542bb123074760285dc1bbf3 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_59c14dccf8989df94070c2dcfda | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_3c3c99a712e971835c52292e44c | UNIQUE | UNIQUE ("workflowId", name) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| IDX_fd7542bb123074760285dc1bbf | CREATE INDEX "IDX_fd7542bb123074760285dc1bbf" ON public.evaluation_config USING btree ("workflowId") |
| PK_59c14dccf8989df94070c2dcfda | CREATE UNIQUE INDEX "PK_59c14dccf8989df94070c2dcfda" ON public.evaluation_config USING btree (id) |
| UQ_3c3c99a712e971835c52292e44c | CREATE UNIQUE INDEX "UQ_3c3c99a712e971835c52292e44c" ON public.evaluation_config USING btree ("workflowId", name) |
| IDX_fd7542bb123074760285dc1bbf | CREATE INDEX "IDX_fd7542bb123074760285dc1bbf" ON public.evaluation_config USING btree ("workflowId") |
## Relations
```mermaid
erDiagram
"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL"
"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE"
"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL"
"public.evaluation_config" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.evaluation_config" {
varchar_36_ id
varchar_36_ workflowId FK
varchar_128_ name
varchar_16_ status
varchar_64_ invalidReason
varchar_32_ datasetSource
timestamp_3__with_time_zone createdAt
json datasetRef
varchar_255_ startNodeName
varchar_32_ datasetSource
varchar_255_ endNodeName
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.test_run" {
varchar_36_ id
varchar_36_ workflowId FK
varchar status
varchar errorCode
json errorDetails
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
varchar_64_ invalidReason
json metrics
timestamp_3__with_time_zone createdAt
varchar_128_ name
varchar_255_ startNodeName
varchar_16_ status
timestamp_3__with_time_zone updatedAt
varchar_255_ runningInstanceId
boolean cancelRequested
varchar_36_ workflowVersionId
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ collectionId FK
varchar_36_ workflowId FK
}
"public.evaluation_collection" {
varchar_36_ id
varchar_128_ name
text description
varchar_36_ workflowId FK
varchar_36_ evaluationConfigId FK
uuid createdById FK
json insightsCache
timestamp_3__with_time_zone createdAt
uuid createdById FK
text description
varchar_36_ evaluationConfigId FK
varchar_36_ id
json insightsCache
varchar_128_ name
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.test_run" {
boolean cancelRequested
varchar_36_ collectionId FK
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ id
json metrics
timestamp_3__with_time_zone runAt
varchar_255_ runningInstanceId
varchar status
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -4,9 +4,9 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | | | |
| destination | jsonb | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| destination | jsonb | | false | | | |
| id | uuid | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -16,8 +16,8 @@
| event_destinations_createdAt_not_null | n | NOT NULL "createdAt" |
| event_destinations_destination_not_null | n | NOT NULL destination |
| event_destinations_id_not_null | n | NOT NULL id |
| event_destinations_updatedAt_not_null | n | NOT NULL "updatedAt" |
| event_destinations_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| event_destinations_updatedAt_not_null | n | NOT NULL "updatedAt" |
## Indexes
@@ -32,9 +32,9 @@ erDiagram
"public.event_destinations" {
uuid id
jsonb destination
timestamp_3__with_time_zone createdAt
jsonb destination
uuid id
timestamp_3__with_time_zone updatedAt
}
```
@@ -11,19 +11,19 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_a3697779b366e131b2bbdae2976 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES annotation_tag_entity(id) ON DELETE CASCADE |
| FK_c1519757391996eb06064f0e7c8 | FOREIGN KEY | FOREIGN KEY ("annotationId") REFERENCES execution_annotations(id) ON DELETE CASCADE |
| PK_979ec03d31294cca484be65d11f | PRIMARY KEY | PRIMARY KEY ("annotationId", "tagId") |
| execution_annotation_tags_annotationId_not_null | n | NOT NULL "annotationId" |
| execution_annotation_tags_tagId_not_null | n | NOT NULL "tagId" |
| FK_c1519757391996eb06064f0e7c8 | FOREIGN KEY | FOREIGN KEY ("annotationId") REFERENCES execution_annotations(id) ON DELETE CASCADE |
| FK_a3697779b366e131b2bbdae2976 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES annotation_tag_entity(id) ON DELETE CASCADE |
| PK_979ec03d31294cca484be65d11f | PRIMARY KEY | PRIMARY KEY ("annotationId", "tagId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_979ec03d31294cca484be65d11f | CREATE UNIQUE INDEX "PK_979ec03d31294cca484be65d11f" ON public.execution_annotation_tags USING btree ("annotationId", "tagId") |
| IDX_a3697779b366e131b2bbdae297 | CREATE INDEX "IDX_a3697779b366e131b2bbdae297" ON public.execution_annotation_tags USING btree ("tagId") |
| IDX_c1519757391996eb06064f0e7c | CREATE INDEX "IDX_c1519757391996eb06064f0e7c" ON public.execution_annotation_tags USING btree ("annotationId") |
| PK_979ec03d31294cca484be65d11f | CREATE UNIQUE INDEX "PK_979ec03d31294cca484be65d11f" ON public.execution_annotation_tags USING btree ("annotationId", "tagId") |
## Relations
@@ -38,17 +38,17 @@ erDiagram
varchar_24_ tagId FK
}
"public.execution_annotations" {
integer id
integer executionId FK
varchar_6_ vote
text note
timestamp_3__with_time_zone createdAt
integer executionId FK
integer id
text note
timestamp_3__with_time_zone updatedAt
varchar_6_ vote
}
"public.annotation_tag_entity" {
timestamp_3__with_time_zone createdAt
varchar_16_ id
varchar_24_ name
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,70 +4,70 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | nextval('execution_annotations_id_seq'::regclass) | false | [public.execution_annotation_tags](public.execution_annotation_tags.md) | | |
| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | |
| vote | varchar(6) | | true | | | |
| note | text | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | |
| id | integer | nextval('execution_annotations_id_seq'::regclass) | false | [public.execution_annotation_tags](public.execution_annotation_tags.md) | | |
| note | text | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| vote | varchar(6) | | true | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_97f863fa83c4786f19565084960 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE |
| PK_7afcf93ffa20c4252869a7c6a23 | PRIMARY KEY | PRIMARY KEY (id) |
| execution_annotations_createdAt_not_null | n | NOT NULL "createdAt" |
| execution_annotations_executionId_not_null | n | NOT NULL "executionId" |
| execution_annotations_id_not_null | n | NOT NULL id |
| execution_annotations_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_97f863fa83c4786f19565084960 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE |
| PK_7afcf93ffa20c4252869a7c6a23 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_7afcf93ffa20c4252869a7c6a23 | CREATE UNIQUE INDEX "PK_7afcf93ffa20c4252869a7c6a23" ON public.execution_annotations USING btree (id) |
| IDX_97f863fa83c4786f1956508496 | CREATE UNIQUE INDEX "IDX_97f863fa83c4786f1956508496" ON public.execution_annotations USING btree ("executionId") |
| PK_7afcf93ffa20c4252869a7c6a23 | CREATE UNIQUE INDEX "PK_7afcf93ffa20c4252869a7c6a23" ON public.execution_annotations USING btree (id) |
## Relations
```mermaid
erDiagram
"public.execution_annotation_tags" }o--|| "public.execution_annotations" : "FOREIGN KEY (#quot;annotationId#quot;) REFERENCES execution_annotations(id) ON DELETE CASCADE"
"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.execution_annotation_tags" }o--|| "public.execution_annotations" : "FOREIGN KEY (#quot;annotationId#quot;) REFERENCES execution_annotations(id) ON DELETE CASCADE"
"public.execution_annotations" {
integer id
integer executionId FK
varchar_6_ vote
text note
timestamp_3__with_time_zone createdAt
integer executionId FK
integer id
text note
timestamp_3__with_time_zone updatedAt
}
"public.execution_annotation_tags" {
integer annotationId FK
varchar_24_ tagId FK
varchar_6_ vote
}
"public.execution_entity" {
integer id
timestamp_3__with_time_zone createdAt
varchar_255_ deduplicationKey
timestamp_3__with_time_zone deletedAt
boolean finished
integer id
bigint jsonSizeBytes
varchar mode
varchar retryOf
varchar retrySuccessId
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
timestamp_3__with_time_zone waitTill
varchar status
varchar_36_ workflowId FK
timestamp_3__with_time_zone deletedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
json tracingContext
varchar_255_ deduplicationKey
bigint jsonSizeBytes
timestamp_3__with_time_zone waitTill
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
"public.execution_annotation_tags" {
integer annotationId FK
varchar_24_ tagId FK
}
```
---
@@ -4,9 +4,9 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| data | text | | false | | | |
| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | |
| workflowData | json | | false | | | |
| data | text | | false | | | |
| workflowVersionId | varchar(36) | | true | | | |
## Constraints
@@ -15,9 +15,9 @@
| ---- | ---- | ---------- |
| execution_data_data_not_null | n | NOT NULL data |
| execution_data_executionId_not_null | n | NOT NULL "executionId" |
| execution_data_workflowData_not_null | n | NOT NULL "workflowData" |
| execution_data_fk | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE |
| execution_data_pkey | PRIMARY KEY | PRIMARY KEY ("executionId") |
| execution_data_workflowData_not_null | n | NOT NULL "workflowData" |
## Indexes
@@ -33,28 +33,28 @@ erDiagram
"public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.execution_data" {
text data
integer executionId FK
json workflowData
text data
varchar_36_ workflowVersionId
}
"public.execution_entity" {
integer id
timestamp_3__with_time_zone createdAt
varchar_255_ deduplicationKey
timestamp_3__with_time_zone deletedAt
boolean finished
integer id
bigint jsonSizeBytes
varchar mode
varchar retryOf
varchar retrySuccessId
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
timestamp_3__with_time_zone waitTill
varchar status
varchar_36_ workflowId FK
timestamp_3__with_time_zone deletedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
json tracingContext
varchar_255_ deduplicationKey
bigint jsonSizeBytes
timestamp_3__with_time_zone waitTill
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
```
@@ -4,22 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | nextval('execution_entity_id_seq'::regclass) | false | [public.execution_data](public.execution_data.md) [public.execution_metadata](public.execution_metadata.md) [public.execution_annotations](public.execution_annotations.md) [public.test_case_execution](public.test_case_execution.md) [public.chat_hub_messages](public.chat_hub_messages.md) | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| deduplicationKey | varchar(255) | | true | | | |
| deletedAt | timestamp(3) with time zone | | true | | | |
| finished | boolean | | false | | | |
| id | integer | nextval('execution_entity_id_seq'::regclass) | false | [public.chat_hub_messages](public.chat_hub_messages.md) [public.execution_annotations](public.execution_annotations.md) [public.execution_data](public.execution_data.md) [public.execution_metadata](public.execution_metadata.md) [public.test_case_execution](public.test_case_execution.md) | | |
| jsonSizeBytes | bigint | 0 | false | | | Byte size of the JSON execution data bundle (run data, workflow snapshot, version id); excludes binary data. 0 means unknown. |
| mode | varchar | | false | | | |
| retryOf | varchar | | true | | | |
| retrySuccessId | varchar | | true | | | |
| startedAt | timestamp(3) with time zone | | true | | | |
| stoppedAt | timestamp(3) with time zone | | true | | | |
| waitTill | timestamp(3) with time zone | | true | | | |
| status | varchar | | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| deletedAt | timestamp(3) with time zone | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| stoppedAt | timestamp(3) with time zone | | true | | | |
| storedAt | varchar(2) | 'db'::character varying | false | | | |
| tracingContext | json | | true | | | |
| deduplicationKey | varchar(255) | | true | | | |
| jsonSizeBytes | bigint | 0 | false | | | Byte size of the JSON execution data bundle (run data, workflow snapshot, version id); excludes binary data. 0 means unknown. |
| waitTill | timestamp(3) with time zone | | true | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| workflowVersionId | varchar(36) | NULL::character varying | true | | | Version id of the workflow run by this execution; denormalized from the data bundle. |
## Constraints
@@ -35,128 +35,128 @@
| execution_entity_storedAt_check | CHECK | CHECK ((("storedAt")::text = ANY ((ARRAY['db'::character varying, 'fs'::character varying, 's3'::character varying])::text[]))) |
| execution_entity_storedAt_not_null | n | NOT NULL "storedAt" |
| execution_entity_workflowId_not_null | n | NOT NULL "workflowId" |
| pk_e3e63bbf986767844bbe1166d4e | PRIMARY KEY | PRIMARY KEY (id) |
| fk_execution_entity_workflow_id | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| pk_e3e63bbf986767844bbe1166d4e | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| pk_e3e63bbf986767844bbe1166d4e | CREATE UNIQUE INDEX pk_e3e63bbf986767844bbe1166d4e ON public.execution_entity USING btree (id) |
| IDX_execution_entity_deletedAt | CREATE INDEX "IDX_execution_entity_deletedAt" ON public.execution_entity USING btree ("deletedAt") |
| idx_execution_entity_workflow_id_started_at | CREATE INDEX idx_execution_entity_workflow_id_started_at ON public.execution_entity USING btree ("workflowId", "startedAt") WHERE (("startedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) |
| idx_execution_entity_wait_till_status_deleted_at | CREATE INDEX idx_execution_entity_wait_till_status_deleted_at ON public.execution_entity USING btree ("waitTill", status, "deletedAt") WHERE (("waitTill" IS NOT NULL) AND ("deletedAt" IS NULL)) |
| idx_execution_entity_stopped_at_status_deleted_at | CREATE INDEX idx_execution_entity_stopped_at_status_deleted_at ON public.execution_entity USING btree ("stoppedAt", status, "deletedAt") WHERE (("stoppedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) |
| IDX_execution_entity_deduplicationKey | CREATE UNIQUE INDEX "IDX_execution_entity_deduplicationKey" ON public.execution_entity USING btree ("deduplicationKey") WHERE ("deduplicationKey" IS NOT NULL) |
| IDX_execution_entity_deletedAt | CREATE INDEX "IDX_execution_entity_deletedAt" ON public.execution_entity USING btree ("deletedAt") |
| IDX_execution_entity_workflowId_status_id | CREATE INDEX "IDX_execution_entity_workflowId_status_id" ON public.execution_entity USING btree ("workflowId", status, id) WHERE ("deletedAt" IS NULL) |
| idx_execution_entity_stopped_at_status_deleted_at | CREATE INDEX idx_execution_entity_stopped_at_status_deleted_at ON public.execution_entity USING btree ("stoppedAt", status, "deletedAt") WHERE (("stoppedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) |
| idx_execution_entity_wait_till_status_deleted_at | CREATE INDEX idx_execution_entity_wait_till_status_deleted_at ON public.execution_entity USING btree ("waitTill", status, "deletedAt") WHERE (("waitTill" IS NOT NULL) AND ("deletedAt" IS NULL)) |
| idx_execution_entity_workflow_id_started_at | CREATE INDEX idx_execution_entity_workflow_id_started_at ON public.execution_entity USING btree ("workflowId", "startedAt") WHERE (("startedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) |
| pk_e3e63bbf986767844bbe1166d4e | CREATE UNIQUE INDEX pk_e3e63bbf986767844bbe1166d4e ON public.execution_entity USING btree (id) |
## Relations
```mermaid
erDiagram
"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.execution_metadata" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
"public.execution_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.execution_entity" {
integer id
timestamp_3__with_time_zone createdAt
varchar_255_ deduplicationKey
timestamp_3__with_time_zone deletedAt
boolean finished
integer id
bigint jsonSizeBytes
varchar mode
varchar retryOf
varchar retrySuccessId
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
timestamp_3__with_time_zone waitTill
varchar status
varchar_36_ workflowId FK
timestamp_3__with_time_zone deletedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
json tracingContext
varchar_255_ deduplicationKey
bigint jsonSizeBytes
timestamp_3__with_time_zone waitTill
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
"public.chat_hub_messages" {
uuid agentId FK
json attachments
text content
timestamp_3__with_time_zone createdAt
integer executionId FK
uuid id
varchar_256_ model
varchar_128_ name
uuid previousMessageId FK
varchar_16_ provider
uuid retryOfMessageId FK
uuid revisionOfMessageId FK
uuid sessionId FK
varchar_16_ status
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.execution_annotations" {
timestamp_3__with_time_zone createdAt
integer executionId FK
integer id
text note
timestamp_3__with_time_zone updatedAt
varchar_6_ vote
}
"public.execution_data" {
text data
integer executionId FK
json workflowData
text data
varchar_36_ workflowVersionId
}
"public.execution_metadata" {
integer id
integer executionId FK
integer id
varchar_255_ key
text value
}
"public.execution_annotations" {
integer id
integer executionId FK
varchar_6_ vote
text note
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.test_case_execution" {
varchar_36_ id
varchar_36_ testRunId FK
integer executionId FK
varchar status
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json inputs
json outputs
integer runIndex
}
"public.chat_hub_messages" {
uuid id
uuid sessionId FK
uuid previousMessageId FK
uuid revisionOfMessageId FK
uuid retryOfMessageId FK
varchar_16_ type
varchar_128_ name
text content
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
integer executionId FK
timestamp_3__with_time_zone createdAt
varchar_36_ id
json inputs
json metrics
json outputs
timestamp_3__with_time_zone runAt
integer runIndex
varchar status
varchar_36_ testRunId FK
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_16_ status
json attachments
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -4,8 +4,8 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | nextval('execution_metadata_temp_id_seq'::regclass) | false | | | |
| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | |
| id | integer | nextval('execution_metadata_temp_id_seq'::regclass) | false | | | |
| key | varchar(255) | | false | | | |
| value | text | | false | | | |
@@ -13,19 +13,19 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_31d0b4c93fb85ced26f6005cda3 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE |
| PK_17a0b6284f8d626aae88e1c16e4 | PRIMARY KEY | PRIMARY KEY (id) |
| execution_metadata_temp_executionId_not_null | n | NOT NULL "executionId" |
| execution_metadata_temp_id_not_null | n | NOT NULL id |
| execution_metadata_temp_key_not_null | n | NOT NULL key |
| execution_metadata_temp_value_not_null | n | NOT NULL value |
| FK_31d0b4c93fb85ced26f6005cda3 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE |
| PK_17a0b6284f8d626aae88e1c16e4 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_17a0b6284f8d626aae88e1c16e4 | CREATE UNIQUE INDEX "PK_17a0b6284f8d626aae88e1c16e4" ON public.execution_metadata USING btree (id) |
| IDX_cec8eea3bf49551482ccb4933e | CREATE UNIQUE INDEX "IDX_cec8eea3bf49551482ccb4933e" ON public.execution_metadata USING btree ("executionId", key) |
| PK_17a0b6284f8d626aae88e1c16e4 | CREATE UNIQUE INDEX "PK_17a0b6284f8d626aae88e1c16e4" ON public.execution_metadata USING btree (id) |
## Relations
@@ -35,28 +35,28 @@ erDiagram
"public.execution_metadata" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
"public.execution_metadata" {
integer id
integer executionId FK
integer id
varchar_255_ key
text value
}
"public.execution_entity" {
integer id
timestamp_3__with_time_zone createdAt
varchar_255_ deduplicationKey
timestamp_3__with_time_zone deletedAt
boolean finished
integer id
bigint jsonSizeBytes
varchar mode
varchar retryOf
varchar retrySuccessId
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
timestamp_3__with_time_zone waitTill
varchar status
varchar_36_ workflowId FK
timestamp_3__with_time_zone deletedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
json tracingContext
varchar_255_ deduplicationKey
bigint jsonSizeBytes
timestamp_3__with_time_zone waitTill
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
```
+35 -35
View File
@@ -4,87 +4,87 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.workflow_entity](public.workflow_entity.md) [public.folder](public.folder.md) [public.folder_tag](public.folder_tag.md) | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.folder](public.folder.md) [public.folder_tag](public.folder_tag.md) [public.workflow_entity](public.workflow_entity.md) | | |
| name | varchar(128) | | false | | | |
| parentFolderId | varchar(36) | | true | | [public.folder](public.folder.md) | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_804ea52f6729e3940498bd54d78 | FOREIGN KEY | FOREIGN KEY ("parentFolderId") REFERENCES folder(id) ON DELETE CASCADE |
| FK_a8260b0b36939c6247f385b8221 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_6278a41a706740c94c02e288df8 | PRIMARY KEY | PRIMARY KEY (id) |
| folder_createdAt_not_null | n | NOT NULL "createdAt" |
| folder_id_not_null | n | NOT NULL id |
| folder_name_not_null | n | NOT NULL name |
| folder_projectId_not_null | n | NOT NULL "projectId" |
| folder_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_a8260b0b36939c6247f385b8221 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_804ea52f6729e3940498bd54d78 | FOREIGN KEY | FOREIGN KEY ("parentFolderId") REFERENCES folder(id) ON DELETE CASCADE |
| PK_6278a41a706740c94c02e288df8 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_6278a41a706740c94c02e288df8 | CREATE UNIQUE INDEX "PK_6278a41a706740c94c02e288df8" ON public.folder USING btree (id) |
| IDX_14f68deffaf858465715995508 | CREATE UNIQUE INDEX "IDX_14f68deffaf858465715995508" ON public.folder USING btree ("projectId", id) |
| PK_6278a41a706740c94c02e288df8 | CREATE UNIQUE INDEX "PK_6278a41a706740c94c02e288df8" ON public.folder USING btree (id) |
## Relations
```mermaid
erDiagram
"public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE"
"public.folder" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE"
"public.folder_tag" }o--|| "public.folder" : "FOREIGN KEY (#quot;folderId#quot;) REFERENCES folder(id) ON DELETE CASCADE"
"public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE"
"public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.folder" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_128_ name
varchar_36_ parentFolderId FK
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
json nodeGroups
varchar sourceWorkflowId
}
"public.folder_tag" {
varchar_36_ folderId FK
varchar_36_ tagId FK
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
```
@@ -11,11 +11,11 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_94a60854e06f2897b2e0d39edba | FOREIGN KEY | FOREIGN KEY ("folderId") REFERENCES folder(id) ON DELETE CASCADE |
| FK_dc88164176283de80af47621746 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE |
| PK_27e4e00852f6b06a925a4d83a3e | PRIMARY KEY | PRIMARY KEY ("folderId", "tagId") |
| folder_tag_folderId_not_null | n | NOT NULL "folderId" |
| folder_tag_tagId_not_null | n | NOT NULL "tagId" |
| FK_dc88164176283de80af47621746 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE |
| FK_94a60854e06f2897b2e0d39edba | FOREIGN KEY | FOREIGN KEY ("folderId") REFERENCES folder(id) ON DELETE CASCADE |
| PK_27e4e00852f6b06a925a4d83a3e | PRIMARY KEY | PRIMARY KEY ("folderId", "tagId") |
## Indexes
@@ -36,18 +36,18 @@ erDiagram
varchar_36_ tagId FK
}
"public.folder" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_128_ name
varchar_36_ parentFolderId FK
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.tag_entity" {
varchar_24_ name
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ id
varchar_24_ name
timestamp_3__with_time_zone updatedAt
}
```
@@ -6,29 +6,29 @@
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | | false | | | |
| metaId | integer | | false | | [public.insights_metadata](public.insights_metadata.md) | |
| periodStart | timestamp(0) with time zone | CURRENT_TIMESTAMP | true | | | |
| periodUnit | integer | | false | | | 0: hour, 1: day, 2: week |
| type | integer | | false | | | 0: time_saved_minutes, 1: runtime_milliseconds, 2: success, 3: failure |
| value | bigint | | false | | | |
| periodUnit | integer | | false | | | 0: hour, 1: day, 2: week |
| periodStart | timestamp(0) with time zone | CURRENT_TIMESTAMP | true | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_6414cfed98daabbfdd61a1cfbc0 | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE |
| PK_b606942249b90cc39b0265f0575 | PRIMARY KEY | PRIMARY KEY (id) |
| insights_by_period_id_not_null | n | NOT NULL id |
| insights_by_period_metaId_not_null | n | NOT NULL "metaId" |
| insights_by_period_periodUnit_not_null | n | NOT NULL "periodUnit" |
| insights_by_period_type_not_null | n | NOT NULL type |
| insights_by_period_value_not_null | n | NOT NULL value |
| FK_6414cfed98daabbfdd61a1cfbc0 | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE |
| PK_b606942249b90cc39b0265f0575 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_b606942249b90cc39b0265f0575 | CREATE UNIQUE INDEX "PK_b606942249b90cc39b0265f0575" ON public.insights_by_period USING btree (id) |
| IDX_60b6a84299eeb3f671dfec7693 | CREATE UNIQUE INDEX "IDX_60b6a84299eeb3f671dfec7693" ON public.insights_by_period USING btree ("periodStart", type, "periodUnit", "metaId") |
| PK_b606942249b90cc39b0265f0575 | CREATE UNIQUE INDEX "PK_b606942249b90cc39b0265f0575" ON public.insights_by_period USING btree (id) |
## Relations
@@ -40,17 +40,17 @@ erDiagram
"public.insights_by_period" {
integer id
integer metaId FK
timestamp_0__with_time_zone periodStart
integer periodUnit
integer type
bigint value
integer periodUnit
timestamp_0__with_time_zone periodStart
}
"public.insights_metadata" {
integer metaId
varchar_36_ workflowId FK
varchar_36_ projectId FK
varchar_128_ workflowName
varchar_255_ projectName
varchar_36_ workflowId FK
varchar_128_ workflowName
}
```
@@ -4,94 +4,94 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| metaId | integer | | false | [public.insights_raw](public.insights_raw.md) [public.insights_by_period](public.insights_by_period.md) | | |
| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | |
| metaId | integer | | false | [public.insights_by_period](public.insights_by_period.md) [public.insights_raw](public.insights_raw.md) | | |
| projectId | varchar(36) | | true | | [public.project](public.project.md) | |
| workflowName | varchar(128) | | false | | | |
| projectName | varchar(255) | | false | | | |
| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | |
| workflowName | varchar(128) | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| insights_metadata_metaId_not_null | n | NOT NULL "metaId" |
| insights_metadata_projectName_not_null | n | NOT NULL "projectName" |
| insights_metadata_workflowName_not_null | n | NOT NULL "workflowName" |
| FK_1d8ab99d5861c9388d2dc1cf733 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL |
| FK_2375a1eda085adb16b24615b69c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE SET NULL |
| PK_f448a94c35218b6208ce20cf5a1 | PRIMARY KEY | PRIMARY KEY ("metaId") |
| insights_metadata_metaId_not_null | n | NOT NULL "metaId" |
| insights_metadata_projectName_not_null | n | NOT NULL "projectName" |
| insights_metadata_workflowName_not_null | n | NOT NULL "workflowName" |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_f448a94c35218b6208ce20cf5a1 | CREATE UNIQUE INDEX "PK_f448a94c35218b6208ce20cf5a1" ON public.insights_metadata USING btree ("metaId") |
| IDX_1d8ab99d5861c9388d2dc1cf73 | CREATE UNIQUE INDEX "IDX_1d8ab99d5861c9388d2dc1cf73" ON public.insights_metadata USING btree ("workflowId") |
| PK_f448a94c35218b6208ce20cf5a1 | CREATE UNIQUE INDEX "PK_f448a94c35218b6208ce20cf5a1" ON public.insights_metadata USING btree ("metaId") |
## Relations
```mermaid
erDiagram
"public.insights_raw" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE"
"public.insights_by_period" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE"
"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL"
"public.insights_raw" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE"
"public.insights_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE SET NULL"
"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL"
"public.insights_metadata" {
integer metaId
varchar_36_ workflowId FK
varchar_36_ projectId FK
varchar_128_ workflowName
varchar_255_ projectName
}
"public.insights_raw" {
integer id
integer metaId FK
integer type
bigint value
timestamp_0__with_time_zone timestamp
varchar_36_ workflowId FK
varchar_128_ workflowName
}
"public.insights_by_period" {
integer id
integer metaId FK
timestamp_0__with_time_zone periodStart
integer periodUnit
integer type
bigint value
integer periodUnit
timestamp_0__with_time_zone periodStart
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
json nodeGroups
varchar sourceWorkflowId
"public.insights_raw" {
integer id
integer metaId FK
timestamp_0__with_time_zone timestamp
integer type
bigint value
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -6,28 +6,28 @@
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | | false | | | |
| metaId | integer | | false | | [public.insights_metadata](public.insights_metadata.md) | |
| timestamp | timestamp(0) with time zone | CURRENT_TIMESTAMP | false | | | |
| type | integer | | false | | | 0: time_saved_minutes, 1: runtime_milliseconds, 2: success, 3: failure |
| value | bigint | | false | | | |
| timestamp | timestamp(0) with time zone | CURRENT_TIMESTAMP | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_6e2e33741adef2a7c5d66befa4e | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE |
| PK_ec15125755151e3a7e00e00014f | PRIMARY KEY | PRIMARY KEY (id) |
| insights_raw_id_not_null | n | NOT NULL id |
| insights_raw_metaId_not_null | n | NOT NULL "metaId" |
| insights_raw_timestamp_not_null | n | NOT NULL "timestamp" |
| insights_raw_type_not_null | n | NOT NULL type |
| insights_raw_value_not_null | n | NOT NULL value |
| FK_6e2e33741adef2a7c5d66befa4e | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE |
| PK_ec15125755151e3a7e00e00014f | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_ec15125755151e3a7e00e00014f | CREATE UNIQUE INDEX "PK_ec15125755151e3a7e00e00014f" ON public.insights_raw USING btree (id) |
| IDX_insights_raw_timestamp_id | CREATE INDEX "IDX_insights_raw_timestamp_id" ON public.insights_raw USING btree ("timestamp", id) |
| PK_ec15125755151e3a7e00e00014f | CREATE UNIQUE INDEX "PK_ec15125755151e3a7e00e00014f" ON public.insights_raw USING btree (id) |
## Relations
@@ -39,16 +39,16 @@ erDiagram
"public.insights_raw" {
integer id
integer metaId FK
timestamp_0__with_time_zone timestamp
integer type
bigint value
timestamp_0__with_time_zone timestamp
}
"public.insights_metadata" {
integer metaId
varchar_36_ workflowId FK
varchar_36_ projectId FK
varchar_128_ workflowName
varchar_255_ projectName
varchar_36_ workflowId FK
varchar_128_ workflowName
}
```
@@ -4,21 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| name | varchar(200) | | false | | | |
| type | varchar(200) | | false | | | |
| latestVersion | integer | 1 | false | | | |
| name | varchar(200) | | false | | | |
| package | varchar(241) | | false | | [public.installed_packages](public.installed_packages.md) | |
| type | varchar(200) | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_73f857fc5dce682cef8a99c11dbddbc969618951 | FOREIGN KEY | FOREIGN KEY (package) REFERENCES installed_packages("packageName") ON UPDATE CASCADE ON DELETE CASCADE |
| PK_8ebd28194e4f792f96b5933423fc439df97d9689 | PRIMARY KEY | PRIMARY KEY (name) |
| installed_nodes_latestVersion_not_null | n | NOT NULL "latestVersion" |
| installed_nodes_name_not_null | n | NOT NULL name |
| installed_nodes_package_not_null | n | NOT NULL package |
| installed_nodes_type_not_null | n | NOT NULL type |
| FK_73f857fc5dce682cef8a99c11dbddbc969618951 | FOREIGN KEY | FOREIGN KEY (package) REFERENCES installed_packages("packageName") ON UPDATE CASCADE ON DELETE CASCADE |
| PK_8ebd28194e4f792f96b5933423fc439df97d9689 | PRIMARY KEY | PRIMARY KEY (name) |
## Indexes
@@ -34,17 +34,17 @@ erDiagram
"public.installed_nodes" }o--|| "public.installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages(#quot;packageName#quot;) ON UPDATE CASCADE ON DELETE CASCADE"
"public.installed_nodes" {
varchar_200_ name
varchar_200_ type
integer latestVersion
varchar_200_ name
varchar_241_ package FK
varchar_200_ type
}
"public.installed_packages" {
varchar_214_ packageName
varchar_50_ installedVersion
varchar_70_ authorName
varchar_70_ authorEmail
varchar_70_ authorName
timestamp_3__with_time_zone createdAt
varchar_50_ installedVersion
varchar_214_ packageName
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,22 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| packageName | varchar(214) | | false | [public.installed_nodes](public.installed_nodes.md) | | |
| installedVersion | varchar(50) | | false | | | |
| authorName | varchar(70) | | true | | | |
| authorEmail | varchar(70) | | true | | | |
| authorName | varchar(70) | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| installedVersion | varchar(50) | | false | | | |
| packageName | varchar(214) | | false | [public.installed_nodes](public.installed_nodes.md) | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_08cc9197c39b028c1e9beca225940576fd1a5804 | PRIMARY KEY | PRIMARY KEY ("packageName") |
| installed_packages_createdAt_not_null | n | NOT NULL "createdAt" |
| installed_packages_installedVersion_not_null | n | NOT NULL "installedVersion" |
| installed_packages_packageName_not_null | n | NOT NULL "packageName" |
| installed_packages_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_08cc9197c39b028c1e9beca225940576fd1a5804 | PRIMARY KEY | PRIMARY KEY ("packageName") |
## Indexes
@@ -35,18 +35,18 @@ erDiagram
"public.installed_nodes" }o--|| "public.installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages(#quot;packageName#quot;) ON UPDATE CASCADE ON DELETE CASCADE"
"public.installed_packages" {
varchar_214_ packageName
varchar_50_ installedVersion
varchar_70_ authorName
varchar_70_ authorEmail
varchar_70_ authorName
timestamp_3__with_time_zone createdAt
varchar_50_ installedVersion
varchar_214_ packageName
timestamp_3__with_time_zone updatedAt
}
"public.installed_nodes" {
varchar_200_ name
varchar_200_ type
integer latestVersion
varchar_200_ name
varchar_241_ package FK
varchar_200_ type
}
```
@@ -4,35 +4,35 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| key | varchar(255) | | false | [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | | Opaque checkpoint key from the agent runtime. |
| runId | varchar(255) | | true | | | Run ID parsed from the checkpoint key when available. |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the checkpoint. |
| resourceId | varchar(255) | | true | | | Resource ID recorded by the agent runtime. |
| state | json | | true | | | Serializable agent state snapshot stored as JSON. |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| expiredAt | timestamp(3) with time zone | | true | | | Soft-delete timestamp: null means live; non-null marks the row as a tombstone. |
| key | varchar(255) | | false | [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | | Opaque checkpoint key from the agent runtime. |
| resourceId | varchar(255) | | true | | | Resource ID recorded by the agent runtime. |
| runId | varchar(255) | | true | | | Run ID parsed from the checkpoint key when available. |
| state | json | | true | | | Serializable agent state snapshot stored as JSON. |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the checkpoint. |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_2b23f3f24a70bebb990203b011e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_5315a45f0846d1f9d128c18a2ed | PRIMARY KEY | PRIMARY KEY (key) |
| instance_ai_checkpoints_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_checkpoints_key_not_null | n | NOT NULL key |
| instance_ai_checkpoints_state_tombstone_check | CHECK | CHECK (((("expiredAt" IS NOT NULL) AND (state IS NULL)) OR ("expiredAt" IS NULL))) |
| instance_ai_checkpoints_threadId_not_null | n | NOT NULL "threadId" |
| instance_ai_checkpoints_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_2b23f3f24a70bebb990203b011e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_5315a45f0846d1f9d128c18a2ed | PRIMARY KEY | PRIMARY KEY (key) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_5315a45f0846d1f9d128c18a2ed | CREATE UNIQUE INDEX "PK_5315a45f0846d1f9d128c18a2ed" ON public.instance_ai_checkpoints USING btree (key) |
| IDX_768189b506cc26c4fe878b87cb | CREATE INDEX "IDX_768189b506cc26c4fe878b87cb" ON public.instance_ai_checkpoints USING btree ("runId") |
| IDX_2b23f3f24a70bebb990203b011 | CREATE INDEX "IDX_2b23f3f24a70bebb990203b011" ON public.instance_ai_checkpoints USING btree ("threadId") |
| IDX_768189b506cc26c4fe878b87cb | CREATE INDEX "IDX_768189b506cc26c4fe878b87cb" ON public.instance_ai_checkpoints USING btree ("runId") |
| IDX_be9d0eca0b19fb93d4eb74b327 | CREATE INDEX "IDX_be9d0eca0b19fb93d4eb74b327" ON public.instance_ai_checkpoints USING btree ("resourceId") |
| PK_5315a45f0846d1f9d128c18a2ed | CREATE UNIQUE INDEX "PK_5315a45f0846d1f9d128c18a2ed" ON public.instance_ai_checkpoints USING btree (key) |
## Relations
@@ -43,37 +43,37 @@ erDiagram
"public.instance_ai_checkpoints" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_checkpoints" {
varchar_255_ key
varchar_255_ runId
uuid threadId FK
varchar_255_ resourceId
json state
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
timestamp_3__with_time_zone expiredAt
varchar_255_ key
varchar_255_ resourceId
varchar_255_ runId
json state
uuid threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_pending_confirmations" {
varchar_36_ requestId
uuid threadId FK
uuid userId FK
varchar_16_ kind
varchar_36_ runId
varchar_64_ toolCallId
varchar_36_ messageGroupId
varchar_255_ checkpointKey FK
varchar_36_ checkpointTaskId
timestamp_3__with_time_zone expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone expiresAt
varchar_16_ kind
varchar_36_ messageGroupId
varchar_36_ requestId
varchar_36_ runId
uuid threadId FK
varchar_64_ toolCallId
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.instance_ai_threads" {
timestamp_3__with_time_zone createdAt
uuid id
json metadata
varchar_36_ projectId FK
varchar_255_ resourceId
text title
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,32 +4,32 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| taskKey | varchar | | false | | | |
| entry | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| entry | text | | false | | | |
| id | varchar(36) | | false | | | |
| taskKey | varchar | | false | | | |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_8bfcc6c51fd3d69b1eae8aebd49 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_21c2b214b44bc6c34a6d3551c90 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_ai_iteration_logs_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_iteration_logs_entry_not_null | n | NOT NULL entry |
| instance_ai_iteration_logs_id_not_null | n | NOT NULL id |
| instance_ai_iteration_logs_taskKey_not_null | n | NOT NULL "taskKey" |
| instance_ai_iteration_logs_threadId_not_null | n | NOT NULL "threadId" |
| instance_ai_iteration_logs_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_8bfcc6c51fd3d69b1eae8aebd49 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_21c2b214b44bc6c34a6d3551c90 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_21c2b214b44bc6c34a6d3551c90 | CREATE UNIQUE INDEX "PK_21c2b214b44bc6c34a6d3551c90" ON public.instance_ai_iteration_logs USING btree (id) |
| IDX_02751202c9a2ad75f2d8e14f5e | CREATE INDEX "IDX_02751202c9a2ad75f2d8e14f5e" ON public.instance_ai_iteration_logs USING btree ("threadId", "taskKey", "createdAt") |
| PK_21c2b214b44bc6c34a6d3551c90 | CREATE UNIQUE INDEX "PK_21c2b214b44bc6c34a6d3551c90" ON public.instance_ai_iteration_logs USING btree (id) |
## Relations
@@ -39,21 +39,21 @@ erDiagram
"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_iteration_logs" {
varchar_36_ id
uuid threadId FK
varchar taskKey
text entry
timestamp_3__with_time_zone createdAt
text entry
varchar_36_ id
varchar taskKey
uuid threadId FK
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,35 +4,35 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| id | uuid | | false | | | |
| serverSlug | varchar(255) | | false | | [public.mcp_registry_server](public.mcp_registry_server.md) | |
| toolFilter | json | | true | | | Optional MCP tool filter per registry connection: { mode: "allow" \| "exclude", tools: string[] } |
| userId | uuid | | false | | [public.user](public.user.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_1d25707354d2012da256eb2ec0a | FOREIGN KEY | FOREIGN KEY ("serverSlug") REFERENCES mcp_registry_server(slug) ON DELETE CASCADE |
| FK_1e826120e7e53ebc4681f026de8 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_8b42c08a531d76410980c639a5b | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_e34e4d15d78eabbe8217e33ef03 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_ai_mcp_registry_connections_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_mcp_registry_connections_credentialId_not_null | n | NOT NULL "credentialId" |
| instance_ai_mcp_registry_connections_id_not_null | n | NOT NULL id |
| instance_ai_mcp_registry_connections_serverSlug_not_null | n | NOT NULL "serverSlug" |
| instance_ai_mcp_registry_connections_updatedAt_not_null | n | NOT NULL "updatedAt" |
| instance_ai_mcp_registry_connections_userId_not_null | n | NOT NULL "userId" |
| FK_8b42c08a531d76410980c639a5b | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_1e826120e7e53ebc4681f026de8 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_1d25707354d2012da256eb2ec0a | FOREIGN KEY | FOREIGN KEY ("serverSlug") REFERENCES mcp_registry_server(slug) ON DELETE CASCADE |
| PK_e34e4d15d78eabbe8217e33ef03 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_e34e4d15d78eabbe8217e33ef03 | CREATE UNIQUE INDEX "PK_e34e4d15d78eabbe8217e33ef03" ON public.instance_ai_mcp_registry_connections USING btree (id) |
| IDX_16db3adb7b19df1ee55ff06b27 | CREATE UNIQUE INDEX "IDX_16db3adb7b19df1ee55ff06b27" ON public.instance_ai_mcp_registry_connections USING btree ("userId", "serverSlug", "credentialId") |
| PK_e34e4d15d78eabbe8217e33ef03 | CREATE UNIQUE INDEX "PK_e34e4d15d78eabbe8217e33ef03" ON public.instance_ai_mcp_registry_connections USING btree (id) |
## Relations
@@ -44,52 +44,52 @@ erDiagram
"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.instance_ai_mcp_registry_connections" {
uuid id
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
varchar_255_ serverSlug FK
json toolFilter
uuid userId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
"public.mcp_registry_server" {
timestamp_3__with_time_zone createdAt
json data
timestamp_3__without_time_zone registryUpdatedAt
varchar_255_ slug
varchar_50_ status
varchar_50_ version
timestamp_3__without_time_zone registryUpdatedAt
json data
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_50_ version
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,35 +4,35 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| content | text | | false | | | |
| role | varchar(16) | | false | | | |
| type | varchar(32) | | true | | | |
| resourceId | varchar(255) | | true | | | |
| 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](public.instance_ai_threads.md) | |
| type | varchar(32) | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_1eeb64cb9d66a927988de759e6e | 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" |
| FK_1eeb64cb9d66a927988de759e6e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_156c6f287225e9befe0181bb02b | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_156c6f287225e9befe0181bb02b | CREATE UNIQUE INDEX "PK_156c6f287225e9befe0181bb02b" ON public.instance_ai_messages USING btree (id) |
| 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) |
## Relations
@@ -42,23 +42,23 @@ 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" {
varchar_36_ id
uuid threadId FK
text content
varchar_16_ role
varchar_32_ type
varchar_255_ resourceId
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,23 +4,23 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream checkpointed by this cursor |
| lastObservedMessageId | varchar(36) | | false | | | |
| lastObservedAt | timestamp(3) with time zone | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| lastObservedAt | timestamp(3) with time zone | | false | | | |
| lastObservedMessageId | varchar(36) | | false | | | |
| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream checkpointed by this cursor |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_5b6319b2e9a37c1064a72428f9a | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_5b6319b2e9a37c1064a72428f9a | PRIMARY KEY | PRIMARY KEY ("observationScopeId") |
| instance_ai_observation_cursors_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_observation_cursors_lastObservedAt_not_null | n | NOT NULL "lastObservedAt" |
| instance_ai_observation_cursors_lastObservedMessageId_not_null | n | NOT NULL "lastObservedMessageId" |
| instance_ai_observation_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
| instance_ai_observation_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_5b6319b2e9a37c1064a72428f9a | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_5b6319b2e9a37c1064a72428f9a | PRIMARY KEY | PRIMARY KEY ("observationScopeId") |
## Indexes
@@ -36,20 +36,20 @@ erDiagram
"public.instance_ai_observation_cursors" |o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_observation_cursors" {
uuid observationScopeId FK
varchar_36_ lastObservedMessageId
timestamp_3__with_time_zone lastObservedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastObservedAt
varchar_36_ lastObservedMessageId
uuid observationScopeId FK
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,11 +4,11 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| heldUntil | timestamp(3) with time zone | | false | | | |
| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID |
| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream locked for observation tasks |
| taskKind | varchar(20) | | false | | | |
| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID |
| heldUntil | timestamp(3) with time zone | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -16,14 +16,14 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| 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" |
| FK_103e2e5f454860b28ea05a82c74 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_fc491dd378b9448655c3c683f85 | PRIMARY KEY | PRIMARY KEY ("observationScopeId", "taskKind") |
## Indexes
@@ -39,21 +39,21 @@ 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
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone createdAt
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,43 +4,45 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| lookupKey | varchar(255) | | false | | | |
| scope | varchar(16) | | false | | | |
| threadId | uuid | | true | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| resourceId | varchar(255) | | false | | | |
| activeObservations | text | ''::text | false | | | |
| originType | varchar(32) | | false | | | |
| config | text | | false | | | |
| generationCount | integer | 0 | false | | | |
| lastObservedAt | timestamp(3) with time zone | | true | | | |
| pendingMessageTokens | integer | 0 | false | | | |
| totalTokensObserved | integer | 0 | false | | | |
| observationTokenCount | integer | 0 | false | | | |
| isObserving | boolean | false | false | | | |
| isReflecting | boolean | false | false | | | |
| observedMessageIds | json | | true | | | |
| observedTimezone | varchar | | true | | | |
| bufferedObservations | text | | true | | | |
| bufferedObservationTokens | integer | | true | | | |
| bufferedMessageIds | json | | true | | | |
| bufferedReflection | text | | true | | | |
| bufferedReflectionTokens | integer | | true | | | |
| bufferedReflectionInputTokens | integer | | true | | | |
| reflectedObservationLineCount | integer | | true | | | |
| bufferedObservationChunks | json | | true | | | |
| bufferedObservationTokens | integer | | true | | | |
| bufferedObservations | text | | true | | | |
| bufferedReflection | text | | true | | | |
| bufferedReflectionInputTokens | integer | | true | | | |
| bufferedReflectionTokens | integer | | true | | | |
| config | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| generationCount | integer | 0 | false | | | |
| id | varchar(36) | | false | | | |
| isBufferingObservation | boolean | false | false | | | |
| isBufferingReflection | boolean | false | false | | | |
| lastBufferedAtTokens | integer | 0 | false | | | |
| isObserving | boolean | false | false | | | |
| isReflecting | boolean | false | false | | | |
| lastBufferedAtTime | timestamp(3) with time zone | | true | | | |
| lastBufferedAtTokens | integer | 0 | false | | | |
| lastObservedAt | timestamp(3) with time zone | | true | | | |
| lookupKey | varchar(255) | | false | | | |
| metadata | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| observationTokenCount | integer | 0 | false | | | |
| observedMessageIds | json | | true | | | |
| observedTimezone | varchar | | true | | | |
| originType | varchar(32) | | false | | | |
| pendingMessageTokens | integer | 0 | false | | | |
| reflectedObservationLineCount | integer | | true | | | |
| resourceId | varchar(255) | | false | | | |
| scope | varchar(16) | | false | | | |
| threadId | uuid | | true | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| totalTokensObserved | integer | 0 | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_34018c303885cd37093458e6409 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE SET NULL |
| PK_7192dd00cddba039bf1d3e6a098 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_ai_observational_memor_isBufferingObservation_not_null | n | NOT NULL "isBufferingObservation" |
| instance_ai_observational_memory_activeObservations_not_null | n | NOT NULL "activeObservations" |
| instance_ai_observational_memory_config_not_null | n | NOT NULL config |
@@ -59,16 +61,14 @@
| instance_ai_observational_memory_scope_not_null | n | NOT NULL scope |
| instance_ai_observational_memory_totalTokensObserved_not_null | n | NOT NULL "totalTokensObserved" |
| instance_ai_observational_memory_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_34018c303885cd37093458e6409 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE SET NULL |
| PK_7192dd00cddba039bf1d3e6a098 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_7192dd00cddba039bf1d3e6a098 | CREATE UNIQUE INDEX "PK_7192dd00cddba039bf1d3e6a098" ON public.instance_ai_observational_memory USING btree (id) |
| IDX_92f13cb6bc694227e069447f7b | CREATE INDEX "IDX_92f13cb6bc694227e069447f7b" ON public.instance_ai_observational_memory USING btree ("lookupKey") |
| IDX_a680ac96aae02dc887bbaac512 | CREATE UNIQUE INDEX "IDX_a680ac96aae02dc887bbaac512" ON public.instance_ai_observational_memory USING btree (scope, "threadId", "resourceId") |
| PK_7192dd00cddba039bf1d3e6a098 | CREATE UNIQUE INDEX "PK_7192dd00cddba039bf1d3e6a098" ON public.instance_ai_observational_memory USING btree (id) |
## Relations
@@ -78,47 +78,47 @@ erDiagram
"public.instance_ai_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL"
"public.instance_ai_observational_memory" {
varchar_36_ id
varchar_255_ lookupKey
varchar_16_ scope
uuid threadId FK
varchar_255_ resourceId
text activeObservations
varchar_32_ originType
text config
integer generationCount
timestamp_3__with_time_zone lastObservedAt
integer pendingMessageTokens
integer totalTokensObserved
integer observationTokenCount
boolean isObserving
boolean isReflecting
json observedMessageIds
varchar observedTimezone
text bufferedObservations
integer bufferedObservationTokens
json bufferedMessageIds
text bufferedReflection
integer bufferedReflectionTokens
integer bufferedReflectionInputTokens
integer reflectedObservationLineCount
json bufferedObservationChunks
integer bufferedObservationTokens
text bufferedObservations
text bufferedReflection
integer bufferedReflectionInputTokens
integer bufferedReflectionTokens
text config
timestamp_3__with_time_zone createdAt
integer generationCount
varchar_36_ id
boolean isBufferingObservation
boolean isBufferingReflection
integer lastBufferedAtTokens
boolean isObserving
boolean isReflecting
timestamp_3__with_time_zone lastBufferedAtTime
integer lastBufferedAtTokens
timestamp_3__with_time_zone lastObservedAt
varchar_255_ lookupKey
json metadata
timestamp_3__with_time_zone createdAt
integer observationTokenCount
json observedMessageIds
varchar observedTimezone
varchar_32_ originType
integer pendingMessageTokens
integer reflectedObservationLineCount
varchar_255_ resourceId
varchar_16_ scope
uuid threadId FK
integer totalTokensObserved
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,15 +4,15 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.instance_ai_observations](public.instance_ai_observations.md) | | Application-generated n8n string ID, not a database UUID |
| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream for this observation log |
| marker | varchar(16) | | false | | | |
| text | text | | false | | | |
| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream for this observation log |
| parentId | varchar(36) | | true | | [public.instance_ai_observations](public.instance_ai_observations.md) | |
| tokenCount | integer | 0 | false | | | |
| status | varchar(16) | | false | | | |
| supersededBy | varchar(36) | | true | | [public.instance_ai_observations](public.instance_ai_observations.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| text | text | | false | | | |
| tokenCount | integer | 0 | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
@@ -21,6 +21,10 @@
| ---- | ---- | ---------- |
| CHK_instance_ai_observations_marker | CHECK | CHECK (((marker)::text = ANY ((ARRAY['critical'::character varying, 'important'::character varying, 'info'::character varying, 'completion'::character varying])::text[]))) |
| CHK_instance_ai_observations_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) |
| FK_a80e0ee839a2f10ba4b86e19998 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES instance_ai_observations(id) |
| FK_d54fc84a6c8ac91b5e0db0378a4 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| FK_daef2195a4a846eb70eed15e039 | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES instance_ai_observations(id) |
| PK_4d9b514cdf0f0b577650caf2ac2 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_ai_observations_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_observations_id_not_null | n | NOT NULL id |
| instance_ai_observations_marker_not_null | n | NOT NULL marker |
@@ -29,19 +33,15 @@
| instance_ai_observations_text_not_null | n | NOT NULL text |
| instance_ai_observations_tokenCount_not_null | n | NOT NULL "tokenCount" |
| instance_ai_observations_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_d54fc84a6c8ac91b5e0db0378a4 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| FK_a80e0ee839a2f10ba4b86e19998 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES instance_ai_observations(id) |
| FK_daef2195a4a846eb70eed15e039 | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES instance_ai_observations(id) |
| PK_4d9b514cdf0f0b577650caf2ac2 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_4d9b514cdf0f0b577650caf2ac2 | CREATE UNIQUE INDEX "PK_4d9b514cdf0f0b577650caf2ac2" ON public.instance_ai_observations USING btree (id) |
| IDX_0d5db648188d338df7fb2a8064 | CREATE INDEX "IDX_0d5db648188d338df7fb2a8064" ON public.instance_ai_observations USING btree ("observationScopeId", status, "createdAt", id) |
| IDX_daef2195a4a846eb70eed15e03 | CREATE INDEX "IDX_daef2195a4a846eb70eed15e03" ON public.instance_ai_observations USING btree ("parentId") |
| IDX_a80e0ee839a2f10ba4b86e1999 | CREATE INDEX "IDX_a80e0ee839a2f10ba4b86e1999" ON public.instance_ai_observations USING btree ("supersededBy") |
| IDX_daef2195a4a846eb70eed15e03 | CREATE INDEX "IDX_daef2195a4a846eb70eed15e03" ON public.instance_ai_observations USING btree ("parentId") |
| PK_4d9b514cdf0f0b577650caf2ac2 | CREATE UNIQUE INDEX "PK_4d9b514cdf0f0b577650caf2ac2" ON public.instance_ai_observations USING btree (id) |
## Relations
@@ -53,25 +53,25 @@ erDiagram
"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_observations" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
uuid observationScopeId FK
varchar_16_ marker
text text
uuid observationScopeId FK
varchar_36_ parentId FK
integer tokenCount
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone createdAt
text text
integer tokenCount
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,24 +4,28 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| requestId | varchar(36) | | false | | | HITL confirmation request identifier. |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the confirmation. |
| userId | uuid | | false | | [public.user](public.user.md) | User who is expected to confirm or cancel. |
| kind | varchar(16) | | false | | | 'suspended' (resumable from checkpoint) or 'inline' (orchestrator-held Promise). |
| runId | varchar(36) | | false | | | External run ID; reused on resume for SSE correlation. |
| toolCallId | varchar(64) | | true | | | Suspended tool call awaiting confirmation. |
| messageGroupId | varchar(36) | | true | | | SSE event correlation group. |
| checkpointKey | varchar(255) | | true | | [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) | FK to instance_ai_checkpoints.key; also the SDK runId used to resume. |
| checkpointTaskId | varchar(36) | | true | | | Set when the suspended run was a planned-task checkpoint follow-up. |
| expiresAt | timestamp(3) with time zone | | true | | | TTL for the leader-only sweep; null disables auto-expiry. |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| expiresAt | timestamp(3) with time zone | | true | | | TTL for the leader-only sweep; null disables auto-expiry. |
| kind | varchar(16) | | false | | | 'suspended' (resumable from checkpoint) or 'inline' (orchestrator-held Promise). |
| messageGroupId | varchar(36) | | true | | | SSE event correlation group. |
| requestId | varchar(36) | | false | | | HITL confirmation request identifier. |
| runId | varchar(36) | | false | | | External run ID; reused on resume for SSE correlation. |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the confirmation. |
| toolCallId | varchar(64) | | true | | | Suspended tool call awaiting confirmation. |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | User who is expected to confirm or cancel. |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_instance_ai_pending_confirmations_kind | CHECK | CHECK (((kind)::text = ANY ((ARRAY['suspended'::character varying, 'inline'::character varying])::text[]))) |
| FK_0babdf6e3b897a86fe4678355eb | FOREIGN KEY | FOREIGN KEY ("checkpointKey") REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE |
| FK_ba67ee8dc311830a2eea89b6e96 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| FK_df5fd25c8bbfd2b042602600d8e | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_25c38179c8d45095b168adfff80 | PRIMARY KEY | PRIMARY KEY ("requestId") |
| instance_ai_pending_confirmations_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_pending_confirmations_kind_not_null | n | NOT NULL kind |
| instance_ai_pending_confirmations_requestId_not_null | n | NOT NULL "requestId" |
@@ -29,79 +33,75 @@
| instance_ai_pending_confirmations_threadId_not_null | n | NOT NULL "threadId" |
| instance_ai_pending_confirmations_updatedAt_not_null | n | NOT NULL "updatedAt" |
| instance_ai_pending_confirmations_userId_not_null | n | NOT NULL "userId" |
| FK_df5fd25c8bbfd2b042602600d8e | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_ba67ee8dc311830a2eea89b6e96 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| FK_0babdf6e3b897a86fe4678355eb | FOREIGN KEY | FOREIGN KEY ("checkpointKey") REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE |
| PK_25c38179c8d45095b168adfff80 | PRIMARY KEY | PRIMARY KEY ("requestId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_25c38179c8d45095b168adfff80 | CREATE UNIQUE INDEX "PK_25c38179c8d45095b168adfff80" ON public.instance_ai_pending_confirmations USING btree ("requestId") |
| IDX_ba67ee8dc311830a2eea89b6e9 | CREATE INDEX "IDX_ba67ee8dc311830a2eea89b6e9" ON public.instance_ai_pending_confirmations USING btree ("threadId") |
| IDX_df5fd25c8bbfd2b042602600d8 | CREATE INDEX "IDX_df5fd25c8bbfd2b042602600d8" ON public.instance_ai_pending_confirmations USING btree ("userId") |
| IDX_0babdf6e3b897a86fe4678355e | CREATE INDEX "IDX_0babdf6e3b897a86fe4678355e" ON public.instance_ai_pending_confirmations USING btree ("checkpointKey") |
| IDX_ba67ee8dc311830a2eea89b6e9 | CREATE INDEX "IDX_ba67ee8dc311830a2eea89b6e9" ON public.instance_ai_pending_confirmations USING btree ("threadId") |
| IDX_d7a4aba7440449865e2b924377 | CREATE INDEX "IDX_d7a4aba7440449865e2b924377" ON public.instance_ai_pending_confirmations USING btree ("expiresAt") |
| IDX_df5fd25c8bbfd2b042602600d8 | CREATE INDEX "IDX_df5fd25c8bbfd2b042602600d8" ON public.instance_ai_pending_confirmations USING btree ("userId") |
| PK_25c38179c8d45095b168adfff80 | CREATE UNIQUE INDEX "PK_25c38179c8d45095b168adfff80" ON public.instance_ai_pending_confirmations USING btree ("requestId") |
## Relations
```mermaid
erDiagram
"public.instance_ai_pending_confirmations" }o--o| "public.instance_ai_checkpoints" : "FOREIGN KEY (#quot;checkpointKey#quot;) REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE"
"public.instance_ai_pending_confirmations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.instance_ai_pending_confirmations" }o--o| "public.instance_ai_checkpoints" : "FOREIGN KEY (#quot;checkpointKey#quot;) REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE"
"public.instance_ai_pending_confirmations" {
varchar_36_ requestId
uuid threadId FK
uuid userId FK
varchar_16_ kind
varchar_36_ runId
varchar_64_ toolCallId
varchar_36_ messageGroupId
varchar_255_ checkpointKey FK
varchar_36_ checkpointTaskId
timestamp_3__with_time_zone expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone expiresAt
varchar_16_ kind
varchar_36_ messageGroupId
varchar_36_ requestId
varchar_36_ runId
uuid threadId FK
varchar_64_ toolCallId
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.instance_ai_checkpoints" {
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone expiredAt
varchar_255_ key
varchar_255_ resourceId
varchar_255_ runId
json state
uuid threadId FK
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.instance_ai_checkpoints" {
varchar_255_ key
varchar_255_ runId
uuid threadId FK
varchar_255_ resourceId
json state
timestamp_3__with_time_zone createdAt
json settings
timestamp_3__with_time_zone updatedAt
timestamp_3__with_time_zone expiredAt
}
```
@@ -4,20 +4,20 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(255) | | false | | | |
| workingMemory | text | | true | | | |
| metadata | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(255) | | false | | | |
| metadata | json | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workingMemory | text | | true | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_45b5b0b6f715dae4292b86603d8 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_ai_resources_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_resources_id_not_null | n | NOT NULL id |
| instance_ai_resources_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_45b5b0b6f715dae4292b86603d8 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -32,11 +32,11 @@ erDiagram
"public.instance_ai_resources" {
varchar_255_ id
text workingMemory
json metadata
timestamp_3__with_time_zone createdAt
varchar_255_ id
json metadata
timestamp_3__with_time_zone updatedAt
text workingMemory
}
```
@@ -4,37 +4,37 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| runId | varchar(36) | | false | | | |
| messageGroupId | varchar(36) | | true | | | |
| runIds | json | | true | | | |
| tree | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| langsmithRunId | varchar(36) | | true | | | LangSmith run ID (UUID v4, e.g. "f47ac10b-58cc-4372-a567-0e02b2c3d479"). |
| langsmithTraceId | varchar(36) | | true | | | LangSmith trace ID (UUID v4, e.g. "f47ac10b-58cc-4372-a567-0e02b2c3d479"). |
| traceId | varchar(64) | | true | | | OpenTelemetry trace ID for the root Instance AI run. |
| messageGroupId | varchar(36) | | true | | | |
| runId | varchar(36) | | false | | | |
| runIds | json | | true | | | |
| spanId | varchar(64) | | true | | | OpenTelemetry span ID for the root Instance AI run. |
| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | |
| traceId | varchar(64) | | true | | | OpenTelemetry trace ID for the root Instance AI run. |
| tree | text | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_2f63fa21d09d7918f347ddbdf70 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_0a5fc9690a84950ebf1416fb146 | PRIMARY KEY | PRIMARY KEY ("threadId", "runId") |
| instance_ai_run_snapshots_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_run_snapshots_runId_not_null | n | NOT NULL "runId" |
| instance_ai_run_snapshots_threadId_not_null | n | NOT NULL "threadId" |
| instance_ai_run_snapshots_tree_not_null | n | NOT NULL tree |
| instance_ai_run_snapshots_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_2f63fa21d09d7918f347ddbdf70 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE |
| PK_0a5fc9690a84950ebf1416fb146 | PRIMARY KEY | PRIMARY KEY ("threadId", "runId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_0a5fc9690a84950ebf1416fb146 | CREATE UNIQUE INDEX "PK_0a5fc9690a84950ebf1416fb146" ON public.instance_ai_run_snapshots USING btree ("threadId", "runId") |
| IDX_d926c16c2ad9728cb9a81790c0 | CREATE INDEX "IDX_d926c16c2ad9728cb9a81790c0" ON public.instance_ai_run_snapshots USING btree ("threadId", "messageGroupId") |
| IDX_d3a2bc880e7a8626802e5474ad | CREATE INDEX "IDX_d3a2bc880e7a8626802e5474ad" ON public.instance_ai_run_snapshots USING btree ("threadId", "createdAt") |
| IDX_d926c16c2ad9728cb9a81790c0 | CREATE INDEX "IDX_d926c16c2ad9728cb9a81790c0" ON public.instance_ai_run_snapshots USING btree ("threadId", "messageGroupId") |
| PK_0a5fc9690a84950ebf1416fb146 | CREATE UNIQUE INDEX "PK_0a5fc9690a84950ebf1416fb146" ON public.instance_ai_run_snapshots USING btree ("threadId", "runId") |
## Relations
@@ -44,26 +44,26 @@ erDiagram
"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_run_snapshots" {
uuid threadId FK
varchar_36_ runId
varchar_36_ messageGroupId
json runIds
text tree
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ langsmithRunId
varchar_36_ langsmithTraceId
varchar_64_ traceId
varchar_36_ messageGroupId
varchar_36_ runId
json runIds
varchar_64_ spanId
uuid threadId FK
varchar_64_ traceId
text tree
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
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
```
@@ -4,193 +4,193 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | | false | [public.instance_ai_messages](public.instance_ai_messages.md) [public.instance_ai_observational_memory](public.instance_ai_observational_memory.md) [public.instance_ai_run_snapshots](public.instance_ai_run_snapshots.md) [public.instance_ai_iteration_logs](public.instance_ai_iteration_logs.md) [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) [public.instance_ai_observations](public.instance_ai_observations.md) [public.instance_ai_observation_cursors](public.instance_ai_observation_cursors.md) [public.instance_ai_observation_locks](public.instance_ai_observation_locks.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | uuid | | false | [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) [public.instance_ai_iteration_logs](public.instance_ai_iteration_logs.md) [public.instance_ai_messages](public.instance_ai_messages.md) [public.instance_ai_observation_cursors](public.instance_ai_observation_cursors.md) [public.instance_ai_observation_locks](public.instance_ai_observation_locks.md) [public.instance_ai_observational_memory](public.instance_ai_observational_memory.md) [public.instance_ai_observations](public.instance_ai_observations.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.instance_ai_run_snapshots](public.instance_ai_run_snapshots.md) | | |
| metadata | json | | true | | | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | Project this thread is scoped to |
| resourceId | varchar(255) | | false | | | |
| title | text | ''::text | false | | | |
| metadata | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | Project this thread is scoped to |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_instance_ai_threads_projectId | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_35575100e45cdedeb89ae0643e9 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_ai_threads_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_threads_id_not_null | n | NOT NULL id |
| instance_ai_threads_projectId_not_null | n | NOT NULL "projectId" |
| instance_ai_threads_resourceId_not_null | n | NOT NULL "resourceId" |
| instance_ai_threads_title_not_null | n | NOT NULL title |
| instance_ai_threads_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_instance_ai_threads_projectId | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_35575100e45cdedeb89ae0643e9 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_35575100e45cdedeb89ae0643e9 | CREATE UNIQUE INDEX "PK_35575100e45cdedeb89ae0643e9" ON public.instance_ai_threads USING btree (id) |
| IDX_f36dea4d38fe92e0e8f44d5a56 | CREATE INDEX "IDX_f36dea4d38fe92e0e8f44d5a56" ON public.instance_ai_threads USING btree ("resourceId") |
| IDX_instance_ai_threads_projectId | CREATE INDEX "IDX_instance_ai_threads_projectId" ON public.instance_ai_threads USING btree ("projectId") |
| PK_35575100e45cdedeb89ae0643e9 | CREATE UNIQUE INDEX "PK_35575100e45cdedeb89ae0643e9" ON public.instance_ai_threads USING btree (id) |
## Relations
```mermaid
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_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL"
"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.ai_builder_temporary_workflow" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_checkpoints" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"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_observation_cursors" |o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"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_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL"
"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_pending_confirmations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.instance_ai_threads" {
timestamp_3__with_time_zone createdAt
uuid id
json metadata
varchar_36_ projectId FK
varchar_255_ resourceId
text title
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
}
"public.instance_ai_messages" {
varchar_36_ id
uuid threadId FK
text content
varchar_16_ role
varchar_32_ type
varchar_255_ resourceId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_observational_memory" {
varchar_36_ id
varchar_255_ lookupKey
varchar_16_ scope
uuid threadId FK
varchar_255_ resourceId
text activeObservations
varchar_32_ originType
text config
integer generationCount
timestamp_3__with_time_zone lastObservedAt
integer pendingMessageTokens
integer totalTokensObserved
integer observationTokenCount
boolean isObserving
boolean isReflecting
json observedMessageIds
varchar observedTimezone
text bufferedObservations
integer bufferedObservationTokens
json bufferedMessageIds
text bufferedReflection
integer bufferedReflectionTokens
integer bufferedReflectionInputTokens
integer reflectedObservationLineCount
json bufferedObservationChunks
boolean isBufferingObservation
boolean isBufferingReflection
integer lastBufferedAtTokens
timestamp_3__with_time_zone lastBufferedAtTime
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_run_snapshots" {
uuid threadId FK
varchar_36_ runId
varchar_36_ messageGroupId
json runIds
text tree
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ langsmithRunId
varchar_36_ langsmithTraceId
varchar_64_ traceId
varchar_64_ spanId
}
"public.instance_ai_iteration_logs" {
varchar_36_ id
uuid threadId FK
varchar taskKey
text entry
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.ai_builder_temporary_workflow" {
varchar_36_ workflowId FK
uuid threadId FK
timestamp_3__with_time_zone createdAt
uuid threadId FK
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.instance_ai_checkpoints" {
varchar_255_ key
varchar_255_ runId
uuid threadId FK
varchar_255_ resourceId
json state
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
timestamp_3__with_time_zone expiredAt
varchar_255_ key
varchar_255_ resourceId
varchar_255_ runId
json state
uuid threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_observations" {
varchar_36_ id
uuid observationScopeId FK
varchar_16_ marker
text text
varchar_36_ parentId FK
integer tokenCount
varchar_16_ status
varchar_36_ supersededBy FK
"public.instance_ai_iteration_logs" {
timestamp_3__with_time_zone createdAt
text entry
varchar_36_ id
varchar taskKey
uuid threadId FK
timestamp_3__with_time_zone updatedAt
}
"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_observation_cursors" {
uuid observationScopeId FK
varchar_36_ lastObservedMessageId
timestamp_3__with_time_zone lastObservedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone lastObservedAt
varchar_36_ lastObservedMessageId
uuid observationScopeId FK
timestamp_3__with_time_zone updatedAt
}
"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
varchar_64_ holderId
timestamp_3__with_time_zone heldUntil
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_observational_memory" {
text activeObservations
json bufferedMessageIds
json bufferedObservationChunks
integer bufferedObservationTokens
text bufferedObservations
text bufferedReflection
integer bufferedReflectionInputTokens
integer bufferedReflectionTokens
text config
timestamp_3__with_time_zone createdAt
integer generationCount
varchar_36_ id
boolean isBufferingObservation
boolean isBufferingReflection
boolean isObserving
boolean isReflecting
timestamp_3__with_time_zone lastBufferedAtTime
integer lastBufferedAtTokens
timestamp_3__with_time_zone lastObservedAt
varchar_255_ lookupKey
json metadata
integer observationTokenCount
json observedMessageIds
varchar observedTimezone
varchar_32_ originType
integer pendingMessageTokens
integer reflectedObservationLineCount
varchar_255_ resourceId
varchar_16_ scope
uuid threadId FK
integer totalTokensObserved
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_observations" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_16_ marker
uuid observationScopeId FK
varchar_36_ parentId FK
varchar_16_ status
varchar_36_ supersededBy FK
text text
integer tokenCount
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_pending_confirmations" {
varchar_36_ requestId
uuid threadId FK
uuid userId FK
varchar_16_ kind
varchar_36_ runId
varchar_64_ toolCallId
varchar_36_ messageGroupId
varchar_255_ checkpointKey FK
varchar_36_ checkpointTaskId
timestamp_3__with_time_zone expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone expiresAt
varchar_16_ kind
varchar_36_ messageGroupId
varchar_36_ requestId
varchar_36_ runId
uuid threadId FK
varchar_64_ toolCallId
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.instance_ai_run_snapshots" {
timestamp_3__with_time_zone createdAt
varchar_36_ langsmithRunId
varchar_36_ langsmithTraceId
varchar_36_ messageGroupId
varchar_36_ runId
json runIds
varchar_64_ spanId
uuid threadId FK
varchar_64_ traceId
text tree
timestamp_3__with_time_zone updatedAt
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
```
@@ -4,31 +4,31 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| runId | varchar(36) | | false | | | |
| workflowName | varchar(255) | | false | | | |
| resourceId | varchar(255) | | true | | | |
| status | varchar | | true | | | |
| snapshot | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| resourceId | varchar(255) | | true | | | |
| runId | varchar(36) | | false | | | |
| snapshot | text | | false | | | |
| status | varchar | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowName | varchar(255) | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_93f2696eb321dfe1d7defe7073f | PRIMARY KEY | PRIMARY KEY ("runId", "workflowName") |
| instance_ai_workflow_snapshots_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_ai_workflow_snapshots_runId_not_null | n | NOT NULL "runId" |
| instance_ai_workflow_snapshots_snapshot_not_null | n | NOT NULL snapshot |
| instance_ai_workflow_snapshots_updatedAt_not_null | n | NOT NULL "updatedAt" |
| instance_ai_workflow_snapshots_workflowName_not_null | n | NOT NULL "workflowName" |
| PK_93f2696eb321dfe1d7defe7073f | PRIMARY KEY | PRIMARY KEY ("runId", "workflowName") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_93f2696eb321dfe1d7defe7073f | CREATE UNIQUE INDEX "PK_93f2696eb321dfe1d7defe7073f" ON public.instance_ai_workflow_snapshots USING btree ("runId", "workflowName") |
| IDX_a371ee6b8e0ebb5635f8baa46d | CREATE INDEX "IDX_a371ee6b8e0ebb5635f8baa46d" ON public.instance_ai_workflow_snapshots USING btree ("workflowName", status) |
| PK_93f2696eb321dfe1d7defe7073f | CREATE UNIQUE INDEX "PK_93f2696eb321dfe1d7defe7073f" ON public.instance_ai_workflow_snapshots USING btree ("runId", "workflowName") |
## Relations
@@ -37,13 +37,13 @@ erDiagram
"public.instance_ai_workflow_snapshots" {
varchar_36_ runId
varchar_255_ workflowName
varchar_255_ resourceId
varchar status
text snapshot
timestamp_3__with_time_zone createdAt
varchar_255_ resourceId
varchar_36_ runId
text snapshot
varchar status
timestamp_3__with_time_zone updatedAt
varchar_255_ workflowName
}
```
@@ -4,22 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | integer | nextval('instance_version_history_id_seq'::regclass) | false | | | |
| major | integer | | false | | | |
| minor | integer | | false | | | |
| patch | integer | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_874f58cb616935bf49d9dbd67e9 | PRIMARY KEY | PRIMARY KEY (id) |
| instance_version_history_createdAt_not_null | n | NOT NULL "createdAt" |
| instance_version_history_id_not_null | n | NOT NULL id |
| instance_version_history_major_not_null | n | NOT NULL major |
| instance_version_history_minor_not_null | n | NOT NULL minor |
| instance_version_history_patch_not_null | n | NOT NULL patch |
| PK_874f58cb616935bf49d9dbd67e9 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -34,11 +34,11 @@ erDiagram
"public.instance_version_history" {
timestamp_3__with_time_zone createdAt
integer id
integer major
integer minor
integer patch
timestamp_3__with_time_zone createdAt
}
```
@@ -4,16 +4,16 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| token | varchar(512) | | false | | | |
| expiresAt | timestamp(3) with time zone | | false | | | |
| token | varchar(512) | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_5779069b7235b256d91f7af1a15 | PRIMARY KEY | PRIMARY KEY (token) |
| invalid_auth_token_expiresAt_not_null | n | NOT NULL "expiresAt" |
| invalid_auth_token_token_not_null | n | NOT NULL token |
| PK_5779069b7235b256d91f7af1a15 | PRIMARY KEY | PRIMARY KEY (token) |
## Indexes
@@ -28,8 +28,8 @@ erDiagram
"public.invalid_auth_token" {
varchar_512_ token
timestamp_3__with_time_zone expiresAt
varchar_512_ token
}
```
@@ -4,19 +4,20 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| data | json | '{}'::json | false | | | JSON object containing server metadata (icons, remotes, tools, etc.) |
| registryUpdatedAt | timestamp(3) without time zone | | false | | | |
| slug | varchar(255) | | false | [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | | |
| status | varchar(50) | | false | | | Server status in the MCP registry. Deprecated servers are not surfaced to users. |
| version | varchar(50) | | false | | | |
| registryUpdatedAt | timestamp(3) without time zone | | false | | | |
| data | json | '{}'::json | false | | | JSON object containing server metadata (icons, remotes, tools, etc.) |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| version | varchar(50) | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_tmp_mcp_registry_server_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'deprecated'::character varying])::text[]))) |
| PK_12fd89a1fb8489513b0a91f5d31 | PRIMARY KEY | PRIMARY KEY (slug) |
| tmp_mcp_registry_server_createdAt_not_null | n | NOT NULL "createdAt" |
| tmp_mcp_registry_server_data_not_null | n | NOT NULL data |
| tmp_mcp_registry_server_registryUpdatedAt_not_null | n | NOT NULL "registryUpdatedAt" |
@@ -24,7 +25,6 @@
| tmp_mcp_registry_server_status_not_null | n | NOT NULL status |
| tmp_mcp_registry_server_updatedAt_not_null | n | NOT NULL "updatedAt" |
| tmp_mcp_registry_server_version_not_null | n | NOT NULL version |
| PK_12fd89a1fb8489513b0a91f5d31 | PRIMARY KEY | PRIMARY KEY (slug) |
## Indexes
@@ -40,22 +40,22 @@ erDiagram
"public.instance_ai_mcp_registry_connections" }o--|| "public.mcp_registry_server" : "FOREIGN KEY (#quot;serverSlug#quot;) REFERENCES mcp_registry_server(slug) ON DELETE CASCADE"
"public.mcp_registry_server" {
timestamp_3__with_time_zone createdAt
json data
timestamp_3__without_time_zone registryUpdatedAt
varchar_255_ slug
varchar_50_ status
varchar_50_ version
timestamp_3__without_time_zone registryUpdatedAt
json data
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_50_ version
}
"public.instance_ai_mcp_registry_connections" {
uuid id
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
varchar_255_ serverSlug FK
json toolFilter
uuid userId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
```
@@ -4,20 +4,20 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| token | varchar | | false | | | |
| clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | |
| token | varchar | | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| oauth_access_tokens_clientId_not_null | n | NOT NULL "clientId" |
| oauth_access_tokens_token_not_null | n | NOT NULL token |
| oauth_access_tokens_userId_not_null | n | NOT NULL "userId" |
| FK_7234a36d8e49a1fa85095328845 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_78b26968132b7e5e45b75876481 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| PK_dcd71f96a5d5f4bf79e67d322bf | PRIMARY KEY | PRIMARY KEY (token) |
| oauth_access_tokens_clientId_not_null | n | NOT NULL "clientId" |
| oauth_access_tokens_token_not_null | n | NOT NULL token |
| oauth_access_tokens_userId_not_null | n | NOT NULL "userId" |
## Indexes
@@ -34,37 +34,37 @@ erDiagram
"public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_access_tokens" {
varchar token
varchar clientId FK
varchar token
uuid userId FK
}
"public.oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
timestamp_3__with_time_zone createdAt
json grantTypes
varchar id
varchar_255_ name
json redirectUris
json grantTypes
varchar_255_ clientSecret
bigint clientSecretExpiresAt
varchar_255_ tokenEndpointAuthMethod
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,24 +4,27 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| code | varchar(255) | | false | | | |
| clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| redirectUri | varchar | | false | | | |
| code | varchar(255) | | false | | | |
| codeChallenge | varchar | | false | | | |
| codeChallengeMethod | varchar(255) | | false | | | |
| expiresAt | bigint | | false | | | Unix timestamp in milliseconds |
| state | varchar | | true | | | |
| used | boolean | false | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| expiresAt | bigint | | false | | | Unix timestamp in milliseconds |
| redirectUri | varchar | | false | | | |
| resource | varchar | | true | | | RFC 8707 resource indicator URI (e.g. https://n8n.example.com/mcp-server/http). NULL = legacy flow predating resource indicator support; defaults to the instance canonical MCP resource URL. |
| scope | json | '["tool:listWorkflows","tool:getWorkflowDetails"]'::json | false | | | OAuth scopes granted for this authorization code |
| state | varchar | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| used | boolean | false | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_64d965bd072ea24fb6da55468cd | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| FK_aa8d3560484944c19bdf79ffa16 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_fb91ab932cfbd694061501cc20f | PRIMARY KEY | PRIMARY KEY (code) |
| oauth_authorization_codes_clientId_not_null | n | NOT NULL "clientId" |
| oauth_authorization_codes_codeChallengeMethod_not_null | n | NOT NULL "codeChallengeMethod" |
| oauth_authorization_codes_codeChallenge_not_null | n | NOT NULL "codeChallenge" |
@@ -33,9 +36,6 @@
| oauth_authorization_codes_updatedAt_not_null | n | NOT NULL "updatedAt" |
| oauth_authorization_codes_used_not_null | n | NOT NULL used |
| oauth_authorization_codes_userId_not_null | n | NOT NULL "userId" |
| FK_aa8d3560484944c19bdf79ffa16 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_64d965bd072ea24fb6da55468cd | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| PK_fb91ab932cfbd694061501cc20f | PRIMARY KEY | PRIMARY KEY (code) |
## Indexes
@@ -52,47 +52,47 @@ erDiagram
"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_authorization_codes" {
varchar_255_ code
varchar clientId FK
uuid userId FK
varchar redirectUri
varchar_255_ code
varchar codeChallenge
varchar_255_ codeChallengeMethod
bigint expiresAt
varchar state
boolean used
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
bigint expiresAt
varchar redirectUri
varchar resource
json scope
varchar state
timestamp_3__with_time_zone updatedAt
boolean used
uuid userId FK
}
"public.oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
timestamp_3__with_time_zone createdAt
json grantTypes
varchar id
varchar_255_ name
json redirectUris
json grantTypes
varchar_255_ clientSecret
bigint clientSecretExpiresAt
varchar_255_ tokenEndpointAuthMethod
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,20 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar | | false | [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) | | |
| name | varchar(255) | | false | | | |
| redirectUris | json | | false | | | |
| grantTypes | json | | false | | | |
| clientSecret | varchar(255) | | true | | | |
| clientSecretExpiresAt | bigint | | true | | | |
| tokenEndpointAuthMethod | varchar(255) | 'none'::character varying | false | | | Possible values: none, client_secret_basic or client_secret_post |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| grantTypes | json | | false | | | |
| id | varchar | | false | [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) | | |
| name | varchar(255) | | false | | | |
| redirectUris | json | | false | | | |
| tokenEndpointAuthMethod | varchar(255) | 'none'::character varying | false | | | Possible values: none, client_secret_basic or client_secret_post |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_c4759172d3431bae6f04e678e0d | PRIMARY KEY | PRIMARY KEY (id) |
| oauth_clients_createdAt_not_null | n | NOT NULL "createdAt" |
| oauth_clients_grantTypes_not_null | n | NOT NULL "grantTypes" |
| oauth_clients_id_not_null | n | NOT NULL id |
@@ -25,7 +26,6 @@
| oauth_clients_redirectUris_not_null | n | NOT NULL "redirectUris" |
| oauth_clients_tokenEndpointAuthMethod_not_null | n | NOT NULL "tokenEndpointAuthMethod" |
| oauth_clients_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_c4759172d3431bae6f04e678e0d | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -38,56 +38,56 @@
```mermaid
erDiagram
"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_access_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_refresh_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_user_consents" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
timestamp_3__with_time_zone createdAt
json grantTypes
varchar id
varchar_255_ name
json redirectUris
json grantTypes
varchar_255_ clientSecret
bigint clientSecretExpiresAt
varchar_255_ tokenEndpointAuthMethod
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.oauth_authorization_codes" {
varchar_255_ code
varchar clientId FK
uuid userId FK
varchar redirectUri
varchar codeChallenge
varchar_255_ codeChallengeMethod
bigint expiresAt
varchar state
boolean used
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar resource
json scope
}
"public.oauth_access_tokens" {
varchar token
varchar clientId FK
varchar token
uuid userId FK
}
"public.oauth_authorization_codes" {
varchar clientId FK
varchar_255_ code
varchar codeChallenge
varchar_255_ codeChallengeMethod
timestamp_3__with_time_zone createdAt
bigint expiresAt
varchar redirectUri
varchar resource
json scope
varchar state
timestamp_3__with_time_zone updatedAt
boolean used
uuid userId FK
}
"public.oauth_refresh_tokens" {
varchar_255_ token
varchar clientId FK
uuid userId FK
bigint expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
bigint expiresAt
json scope
varchar_255_ token
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.oauth_user_consents" {
integer id
uuid userId FK
varchar clientId FK
bigint grantedAt
integer id
uuid userId FK
}
```
@@ -4,18 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| token | varchar(255) | | false | | | |
| clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| expiresAt | bigint | | false | | | Unix timestamp in milliseconds |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| expiresAt | bigint | | false | | | Unix timestamp in milliseconds |
| scope | json | '["tool:listWorkflows","tool:getWorkflowDetails"]'::json | false | | | OAuth scopes granted for this refresh token |
| token | varchar(255) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_a699f3ed9fd0c1b19bc2608ac53 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_b388696ce4d8be7ffbe8d3e4b69 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| PK_74abaed0b30711b6532598b0392 | PRIMARY KEY | PRIMARY KEY (token) |
| oauth_refresh_tokens_clientId_not_null | n | NOT NULL "clientId" |
| oauth_refresh_tokens_createdAt_not_null | n | NOT NULL "createdAt" |
| oauth_refresh_tokens_expiresAt_not_null | n | NOT NULL "expiresAt" |
@@ -23,9 +26,6 @@
| oauth_refresh_tokens_token_not_null | n | NOT NULL token |
| oauth_refresh_tokens_updatedAt_not_null | n | NOT NULL "updatedAt" |
| oauth_refresh_tokens_userId_not_null | n | NOT NULL "userId" |
| FK_a699f3ed9fd0c1b19bc2608ac53 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_b388696ce4d8be7ffbe8d3e4b69 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| PK_74abaed0b30711b6532598b0392 | PRIMARY KEY | PRIMARY KEY (token) |
## Indexes
@@ -42,41 +42,41 @@ erDiagram
"public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_refresh_tokens" {
varchar_255_ token
varchar clientId FK
uuid userId FK
bigint expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
bigint expiresAt
json scope
varchar_255_ token
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
timestamp_3__with_time_zone createdAt
json grantTypes
varchar id
varchar_255_ name
json redirectUris
json grantTypes
varchar_255_ clientSecret
bigint clientSecretExpiresAt
varchar_255_ tokenEndpointAuthMethod
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,23 +4,23 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | |
| grantedAt | bigint | | false | | | Unix timestamp in milliseconds |
| id | integer | | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| oauth_user_consents_clientId_not_null | n | NOT NULL "clientId" |
| oauth_user_consents_grantedAt_not_null | n | NOT NULL "grantedAt" |
| oauth_user_consents_id_not_null | n | NOT NULL id |
| oauth_user_consents_userId_not_null | n | NOT NULL "userId" |
| FK_21e6c3c2d78a097478fae6aaefa | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_a651acea2f6c97f8c4514935486 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE |
| PK_85b9ada746802c8993103470f05 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_083721d99ce8db4033e2958ebb4 | UNIQUE | UNIQUE ("userId", "clientId") |
| oauth_user_consents_clientId_not_null | n | NOT NULL "clientId" |
| oauth_user_consents_grantedAt_not_null | n | NOT NULL "grantedAt" |
| oauth_user_consents_id_not_null | n | NOT NULL id |
| oauth_user_consents_userId_not_null | n | NOT NULL "userId" |
## Indexes
@@ -34,41 +34,41 @@
```mermaid
erDiagram
"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_user_consents" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE"
"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_user_consents" {
integer id
uuid userId FK
varchar clientId FK
bigint grantedAt
}
"public.user" {
uuid id
varchar_255_ email
varchar_32_ firstName
varchar_32_ lastName
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
integer id
uuid userId FK
}
"public.oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
timestamp_3__with_time_zone createdAt
json grantTypes
varchar id
varchar_255_ name
json redirectUris
json grantTypes
varchar_255_ clientSecret
bigint clientSecretExpiresAt
varchar_255_ tokenEndpointAuthMethod
timestamp_3__with_time_zone updatedAt
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
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
}
```
@@ -4,23 +4,23 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| context | varchar(255) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| value | text | | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_06a69a7032c97a763c2c7599464 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_ca04b9d8dc72de268fe07a65773 | PRIMARY KEY | PRIMARY KEY ("workflowId", context) |
| processed_data_context_not_null | n | NOT NULL context |
| processed_data_createdAt_not_null | n | NOT NULL "createdAt" |
| processed_data_updatedAt_not_null | n | NOT NULL "updatedAt" |
| processed_data_value_not_null | n | NOT NULL value |
| processed_data_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_06a69a7032c97a763c2c7599464 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_ca04b9d8dc72de268fe07a65773 | PRIMARY KEY | PRIMARY KEY ("workflowId", context) |
## Indexes
@@ -36,33 +36,33 @@ erDiagram
"public.processed_data" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.processed_data" {
varchar_36_ workflowId FK
varchar_255_ context
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text value
varchar_36_ workflowId FK
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
+113 -113
View File
@@ -4,20 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.variables](public.variables.md) [public.project_relation](public.project_relation.md) [public.shared_credentials](public.shared_credentials.md) [public.shared_workflow](public.shared_workflow.md) [public.folder](public.folder.md) [public.insights_metadata](public.insights_metadata.md) [public.data_table](public.data_table.md) [public.project_secrets_provider_access](public.project_secrets_provider_access.md) [public.role_mapping_rule_project](public.role_mapping_rule_project.md) [public.instance_ai_threads](public.instance_ai_threads.md) [public.agents](public.agents.md) [public.agent_execution_threads](public.agent_execution_threads.md) | | |
| name | varchar(255) | | false | | | |
| type | varchar(36) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| icon | json | | true | | | |
| description | varchar(512) | | true | | | |
| creatorId | uuid | | true | | [public.user](public.user.md) | ID of the user who created the project |
| customTelemetryTags | json | '[]'::json | false | | | |
| description | varchar(512) | | true | | | |
| icon | json | | true | | | |
| id | varchar(36) | | false | [public.agent_execution_threads](public.agent_execution_threads.md) [public.agents](public.agents.md) [public.data_table](public.data_table.md) [public.folder](public.folder.md) [public.insights_metadata](public.insights_metadata.md) [public.instance_ai_threads](public.instance_ai_threads.md) [public.project_relation](public.project_relation.md) [public.project_secrets_provider_access](public.project_secrets_provider_access.md) [public.role_mapping_rule_project](public.role_mapping_rule_project.md) [public.shared_credentials](public.shared_credentials.md) [public.shared_workflow](public.shared_workflow.md) [public.variables](public.variables.md) | | |
| name | varchar(255) | | false | | | |
| type | varchar(36) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_4d68b1358bb5b766d3e78f32f57 | PRIMARY KEY | PRIMARY KEY (id) |
| project_createdAt_not_null | n | NOT NULL "createdAt" |
| project_customTelemetryTags_not_null | n | NOT NULL "customTelemetryTags" |
| project_id_not_null | n | NOT NULL id |
@@ -25,7 +26,6 @@
| project_type_not_null | n | NOT NULL type |
| project_updatedAt_not_null | n | NOT NULL "updatedAt" |
| projects_creatorId_foreign | FOREIGN KEY | FOREIGN KEY ("creatorId") REFERENCES "user"(id) ON DELETE SET NULL |
| PK_4d68b1358bb5b766d3e78f32f57 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -38,150 +38,150 @@
```mermaid
erDiagram
"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.insights_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE SET NULL"
"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project_secrets_provider_access" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
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
}
"public.agent_execution_threads" {
varchar_36_ agentId FK
varchar_255_ agentName
timestamp_3__with_time_zone createdAt
varchar_8_ emoji
varchar_128_ id
varchar_36_ parentAgentId
varchar_128_ parentThreadId
varchar_255_ projectId FK
integer sessionNumber
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_255_ title
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
integer totalPromptTokens
timestamp_3__with_time_zone updatedAt
}
"public.agents" {
varchar_36_ activeVersionId FK
timestamp_3__with_time_zone createdAt
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.variables" {
varchar_50_ key
varchar_50_ type
text value
varchar_36_ id
varchar_36_ projectId FK
}
"public.project_relation" {
varchar_36_ projectId FK
uuid userId FK
varchar role FK
timestamp_3__with_time_zone createdAt
json integrations
varchar_128_ name
varchar_255_ projectId FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.shared_credentials" {
varchar_36_ credentialsId FK
varchar_36_ projectId FK
text role
"public.data_table" {
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.shared_workflow" {
varchar_36_ workflowId FK
varchar_36_ id
varchar_128_ name
varchar_36_ projectId FK
text role
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.folder" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_128_ name
varchar_36_ parentFolderId FK
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.insights_metadata" {
integer metaId
varchar_36_ workflowId FK
varchar_36_ projectId FK
varchar_128_ workflowName
varchar_255_ projectName
}
"public.data_table" {
varchar_36_ id
varchar_128_ name
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.project_secrets_provider_access" {
integer secretsProviderConnectionId FK
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_128_ role
}
"public.role_mapping_rule_project" {
varchar_16_ roleMappingRuleId FK
varchar_36_ projectId FK
varchar_36_ workflowId FK
varchar_128_ workflowName
}
"public.instance_ai_threads" {
timestamp_3__with_time_zone createdAt
uuid id
json metadata
varchar_36_ projectId FK
varchar_255_ resourceId
text title
json metadata
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.project_relation" {
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
varchar role FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.agents" {
"public.project_secrets_provider_access" {
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
varchar_128_ role
integer secretsProviderConnectionId FK
timestamp_3__with_time_zone updatedAt
}
"public.role_mapping_rule_project" {
varchar_36_ projectId FK
varchar_16_ roleMappingRuleId FK
}
"public.shared_credentials" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialsId FK
varchar_36_ projectId FK
text role
timestamp_3__with_time_zone updatedAt
}
"public.shared_workflow" {
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
text role
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.variables" {
varchar_36_ id
varchar_128_ name
varchar_512_ description
varchar_255_ projectId FK
json integrations
json schema
json tools
json skills
varchar_36_ versionId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ activeVersionId FK
}
"public.agent_execution_threads" {
varchar_128_ id
varchar_36_ agentId FK
varchar_255_ agentName
varchar_255_ projectId FK
integer sessionNumber
integer totalPromptTokens
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
varchar_255_ title
varchar_8_ emoji
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_32_ taskId
varchar_36_ taskVersionId FK
varchar_128_ parentThreadId
varchar_36_ parentAgentId
}
"public.user" {
uuid id
varchar_255_ email
varchar_32_ firstName
varchar_32_ lastName
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
varchar_50_ key
varchar_36_ projectId FK
varchar_50_ type
text value
}
```
@@ -4,33 +4,33 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| role | varchar | | false | | [public.role](public.role.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| role | varchar | | false | | [public.role](public.role.md) | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_5f0643f6717905a05164090dde7 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_61448d56d61802b5dfde5cdb002 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_c6b99592dc96b0d836d7a21db91 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) |
| PK_1caaa312a5d7184a003be0f0cb6 | PRIMARY KEY | PRIMARY KEY ("projectId", "userId") |
| project_relation_createdAt_not_null | n | NOT NULL "createdAt" |
| project_relation_projectId_not_null | n | NOT NULL "projectId" |
| project_relation_role_not_null | n | NOT NULL role |
| project_relation_updatedAt_not_null | n | NOT NULL "updatedAt" |
| project_relation_userId_not_null | n | NOT NULL "userId" |
| FK_5f0643f6717905a05164090dde7 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| FK_61448d56d61802b5dfde5cdb002 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_1caaa312a5d7184a003be0f0cb6 | PRIMARY KEY | PRIMARY KEY ("projectId", "userId") |
| FK_c6b99592dc96b0d836d7a21db91 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_1caaa312a5d7184a003be0f0cb6 | CREATE UNIQUE INDEX "PK_1caaa312a5d7184a003be0f0cb6" ON public.project_relation USING btree ("projectId", "userId") |
| IDX_61448d56d61802b5dfde5cdb00 | CREATE INDEX "IDX_61448d56d61802b5dfde5cdb00" ON public.project_relation USING btree ("projectId") |
| IDX_5f0643f6717905a05164090dde | CREATE INDEX "IDX_5f0643f6717905a05164090dde" ON public.project_relation USING btree ("userId") |
| IDX_61448d56d61802b5dfde5cdb00 | CREATE INDEX "IDX_61448d56d61802b5dfde5cdb00" ON public.project_relation USING btree ("projectId") |
| PK_1caaa312a5d7184a003be0f0cb6 | CREATE UNIQUE INDEX "PK_1caaa312a5d7184a003be0f0cb6" ON public.project_relation USING btree ("projectId", "userId") |
| project_relation_role_idx | CREATE INDEX project_relation_role_idx ON public.project_relation USING btree (role) |
| project_relation_role_project_idx | CREATE INDEX project_relation_role_project_idx ON public.project_relation USING btree ("projectId", role) |
@@ -40,51 +40,51 @@
erDiagram
"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.project_relation" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug)"
"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.project_relation" {
varchar_36_ projectId FK
uuid userId FK
varchar role FK
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
varchar role FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.user" {
uuid id
varchar_255_ email
varchar_32_ firstName
varchar_32_ lastName
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.role" {
varchar_128_ slug
text displayName
text description
text roleType
boolean systemRole
timestamp_3__with_time_zone createdAt
text description
text displayName
text roleType
varchar_128_ slug
boolean systemRole
timestamp_3__with_time_zone updatedAt
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
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
}
```
@@ -4,25 +4,25 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| secretsProviderConnectionId | integer | | false | | [public.secrets_provider_connection](public.secrets_provider_connection.md) | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| role | varchar(128) | 'secretsProviderConnection:user'::character varying | false | | | |
| secretsProviderConnectionId | integer | | false | | [public.secrets_provider_connection](public.secrets_provider_connection.md) | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| CHK_project_secrets_provider_access_role | CHECK | CHECK (((role)::text = ANY ((ARRAY['secretsProviderConnection:owner'::character varying, 'secretsProviderConnection:user'::character varying])::text[]))) |
| FK_18e5c27d2524b1638b292904e48 | FOREIGN KEY | FOREIGN KEY ("secretsProviderConnectionId") REFERENCES secrets_provider_connection(id) ON DELETE CASCADE |
| FK_bd264b81209355b543878deedb1 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_0402b7fcec5415246656f102f83 | PRIMARY KEY | PRIMARY KEY ("secretsProviderConnectionId", "projectId") |
| project_secrets_provider_ac_secretsProviderConnectionI_not_null | n | NOT NULL "secretsProviderConnectionId" |
| project_secrets_provider_access_createdAt_not_null | n | NOT NULL "createdAt" |
| project_secrets_provider_access_projectId_not_null | n | NOT NULL "projectId" |
| project_secrets_provider_access_role_not_null | n | NOT NULL role |
| project_secrets_provider_access_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_bd264b81209355b543878deedb1 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_18e5c27d2524b1638b292904e48 | FOREIGN KEY | FOREIGN KEY ("secretsProviderConnectionId") REFERENCES secrets_provider_connection(id) ON DELETE CASCADE |
| PK_0402b7fcec5415246656f102f83 | PRIMARY KEY | PRIMARY KEY ("secretsProviderConnectionId", "projectId") |
## Indexes
@@ -35,35 +35,35 @@
```mermaid
erDiagram
"public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE"
"public.project_secrets_provider_access" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE"
"public.project_secrets_provider_access" {
integer secretsProviderConnectionId FK
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_128_ role
}
"public.secrets_provider_connection" {
integer id
varchar_128_ providerKey
varchar_36_ type
text encryptedSettings
boolean isEnabled
timestamp_3__with_time_zone createdAt
integer secretsProviderConnectionId FK
timestamp_3__with_time_zone updatedAt
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.secrets_provider_connection" {
timestamp_3__with_time_zone createdAt
text encryptedSettings
integer id
boolean isEnabled
varchar_128_ providerKey
varchar_36_ type
timestamp_3__with_time_zone updatedAt
}
```
+38 -38
View File
@@ -4,85 +4,85 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| slug | varchar(128) | | false | [public.user](public.user.md) [public.project_relation](public.project_relation.md) [public.role_scope](public.role_scope.md) [public.role_mapping_rule](public.role_mapping_rule.md) | | Unique identifier of the role for example: "global:owner" |
| displayName | text | | true | | | Name used to display in the UI |
| description | text | | true | | | Text describing the scope in more detail of users |
| roleType | text | | true | | | Type of the role, e.g., global, project, or workflow |
| systemRole | boolean | false | false | | | Indicates if the role is managed by the system and cannot be edited |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| description | text | | true | | | Text describing the scope in more detail of users |
| displayName | text | | true | | | Name used to display in the UI |
| roleType | text | | true | | | Type of the role, e.g., global, project, or workflow |
| slug | varchar(128) | | false | [public.project_relation](public.project_relation.md) [public.role_mapping_rule](public.role_mapping_rule.md) [public.role_scope](public.role_scope.md) [public.user](public.user.md) | | Unique identifier of the role for example: "global:owner" |
| systemRole | boolean | false | false | | | Indicates if the role is managed by the system and cannot be edited |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_35c9b140caaf6da09cfabb0d675 | PRIMARY KEY | PRIMARY KEY (slug) |
| role_createdAt_not_null | n | NOT NULL "createdAt" |
| role_slug_not_null | n | NOT NULL slug |
| role_systemRole_not_null | n | NOT NULL "systemRole" |
| role_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_35c9b140caaf6da09cfabb0d675 | PRIMARY KEY | PRIMARY KEY (slug) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_35c9b140caaf6da09cfabb0d675 | CREATE UNIQUE INDEX "PK_35c9b140caaf6da09cfabb0d675" ON public.role USING btree (slug) |
| IDX_UniqueRoleDisplayName | CREATE UNIQUE INDEX "IDX_UniqueRoleDisplayName" ON public.role USING btree ("displayName") |
| PK_35c9b140caaf6da09cfabb0d675 | CREATE UNIQUE INDEX "PK_35c9b140caaf6da09cfabb0d675" ON public.role USING btree (slug) |
## Relations
```mermaid
erDiagram
"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)"
"public.project_relation" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug)"
"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
"public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)"
"public.role" {
varchar_128_ slug
text displayName
timestamp_3__with_time_zone createdAt
text description
text displayName
text roleType
varchar_128_ slug
boolean systemRole
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.user" {
uuid id
varchar_255_ email
varchar_32_ firstName
varchar_32_ lastName
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.project_relation" {
varchar_36_ projectId FK
uuid userId FK
varchar role FK
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
varchar role FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.role_mapping_rule" {
timestamp_3__with_time_zone createdAt
text expression
varchar_16_ id
integer order
varchar_128_ role FK
varchar_64_ type
timestamp_3__with_time_zone updatedAt
}
"public.role_scope" {
varchar_128_ roleSlug FK
varchar_128_ scopeSlug FK
}
"public.role_mapping_rule" {
varchar_16_ id
text expression
varchar_128_ role FK
varchar_64_ type
integer order
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
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
}
```
@@ -4,18 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(16) | | false | [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| expression | text | | false | | | |
| id | varchar(16) | | false | [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | | |
| order | integer | | false | | | |
| role | varchar(128) | | false | | [public.role](public.role.md) | |
| type | varchar(64) | | false | | | Expected values: 'instance' (maps to a global role) or 'project' (maps to a project role; projects linked via role_mapping_rule_project). |
| order | integer | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_bb66e404c35996b0d6946177501 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE |
| PK_d772c8ec1a89b52d31c882bc560 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_b33ac896ad3099fc8de36fdc1c4 | UNIQUE | UNIQUE (type, "order") |
| role_mapping_rule_createdAt_not_null | n | NOT NULL "createdAt" |
| role_mapping_rule_expression_not_null | n | NOT NULL expression |
| role_mapping_rule_id_not_null | n | NOT NULL id |
@@ -23,17 +26,14 @@
| role_mapping_rule_role_not_null | n | NOT NULL role |
| role_mapping_rule_type_not_null | n | NOT NULL type |
| role_mapping_rule_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_bb66e404c35996b0d6946177501 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE |
| PK_d772c8ec1a89b52d31c882bc560 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_b33ac896ad3099fc8de36fdc1c4 | UNIQUE | UNIQUE (type, "order") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| IDX_bb66e404c35996b0d694617750 | CREATE INDEX "IDX_bb66e404c35996b0d694617750" ON public.role_mapping_rule USING btree (role) |
| PK_d772c8ec1a89b52d31c882bc560 | CREATE UNIQUE INDEX "PK_d772c8ec1a89b52d31c882bc560" ON public.role_mapping_rule USING btree (id) |
| UQ_b33ac896ad3099fc8de36fdc1c4 | CREATE UNIQUE INDEX "UQ_b33ac896ad3099fc8de36fdc1c4" ON public.role_mapping_rule USING btree (type, "order") |
| IDX_bb66e404c35996b0d694617750 | CREATE INDEX "IDX_bb66e404c35996b0d694617750" ON public.role_mapping_rule USING btree (role) |
## Relations
@@ -44,25 +44,25 @@ erDiagram
"public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
"public.role_mapping_rule" {
varchar_16_ id
timestamp_3__with_time_zone createdAt
text expression
varchar_16_ id
integer order
varchar_128_ role FK
varchar_64_ type
integer order
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.role_mapping_rule_project" {
varchar_16_ roleMappingRuleId FK
varchar_36_ projectId FK
varchar_16_ roleMappingRuleId FK
}
"public.role" {
varchar_128_ slug
text displayName
text description
text roleType
boolean systemRole
timestamp_3__with_time_zone createdAt
text description
text displayName
text roleType
varchar_128_ slug
boolean systemRole
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,57 +4,57 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| roleMappingRuleId | varchar(16) | | false | | [public.role_mapping_rule](public.role_mapping_rule.md) | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| roleMappingRuleId | varchar(16) | | false | | [public.role_mapping_rule](public.role_mapping_rule.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| role_mapping_rule_project_projectId_not_null | n | NOT NULL "projectId" |
| role_mapping_rule_project_roleMappingRuleId_not_null | n | NOT NULL "roleMappingRuleId" |
| FK_35a78869286c65d9330d02b88f5 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_dd7ce4dfa09e95b36a626bd9de3 | FOREIGN KEY | FOREIGN KEY ("roleMappingRuleId") REFERENCES role_mapping_rule(id) ON DELETE CASCADE |
| PK_198c5b5aea509d139274efcaf9a | PRIMARY KEY | PRIMARY KEY ("roleMappingRuleId", "projectId") |
| role_mapping_rule_project_projectId_not_null | n | NOT NULL "projectId" |
| role_mapping_rule_project_roleMappingRuleId_not_null | n | NOT NULL "roleMappingRuleId" |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_198c5b5aea509d139274efcaf9a | CREATE UNIQUE INDEX "PK_198c5b5aea509d139274efcaf9a" ON public.role_mapping_rule_project USING btree ("roleMappingRuleId", "projectId") |
| IDX_35a78869286c65d9330d02b88f | CREATE INDEX "IDX_35a78869286c65d9330d02b88f" ON public.role_mapping_rule_project USING btree ("projectId") |
| PK_198c5b5aea509d139274efcaf9a | CREATE UNIQUE INDEX "PK_198c5b5aea509d139274efcaf9a" ON public.role_mapping_rule_project USING btree ("roleMappingRuleId", "projectId") |
## Relations
```mermaid
erDiagram
"public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE"
"public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE"
"public.role_mapping_rule_project" {
varchar_16_ roleMappingRuleId FK
varchar_36_ projectId FK
}
"public.role_mapping_rule" {
varchar_16_ id
text expression
varchar_128_ role FK
varchar_64_ type
integer order
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_16_ roleMappingRuleId FK
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.role_mapping_rule" {
timestamp_3__with_time_zone createdAt
text expression
varchar_16_ id
integer order
varchar_128_ role FK
varchar_64_ type
timestamp_3__with_time_zone updatedAt
}
```
@@ -11,18 +11,18 @@
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_role | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE |
| FK_scope | FOREIGN KEY | FOREIGN KEY ("scopeSlug") REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE |
| PK_role_scope | PRIMARY KEY | PRIMARY KEY ("roleSlug", "scopeSlug") |
| role_scope_roleSlug_not_null | n | NOT NULL "roleSlug" |
| role_scope_scopeSlug_not_null | n | NOT NULL "scopeSlug" |
| FK_scope | FOREIGN KEY | FOREIGN KEY ("scopeSlug") REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE |
| FK_role | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE |
| PK_role_scope | PRIMARY KEY | PRIMARY KEY ("roleSlug", "scopeSlug") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_role_scope | CREATE UNIQUE INDEX "PK_role_scope" ON public.role_scope USING btree ("roleSlug", "scopeSlug") |
| IDX_role_scope_scopeSlug | CREATE INDEX "IDX_role_scope_scopeSlug" ON public.role_scope USING btree ("scopeSlug") |
| PK_role_scope | CREATE UNIQUE INDEX "PK_role_scope" ON public.role_scope USING btree ("roleSlug", "scopeSlug") |
## Relations
@@ -37,18 +37,18 @@ erDiagram
varchar_128_ scopeSlug FK
}
"public.role" {
varchar_128_ slug
text displayName
text description
text roleType
boolean systemRole
timestamp_3__with_time_zone createdAt
text description
text displayName
text roleType
varchar_128_ slug
boolean systemRole
timestamp_3__with_time_zone updatedAt
}
"public.scope" {
varchar_128_ slug
text displayName
text description
text displayName
varchar_128_ slug
}
```
@@ -4,16 +4,16 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| slug | varchar(128) | | false | [public.role_scope](public.role_scope.md) | | Unique identifier of the scope for example: "project:create" |
| displayName | text | | true | | | Name used to display in the UI |
| description | text | | true | | | Text describing the scope in more detail of users |
| displayName | text | | true | | | Name used to display in the UI |
| slug | varchar(128) | | false | [public.role_scope](public.role_scope.md) | | Unique identifier of the scope for example: "project:create" |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| scope_slug_not_null | n | NOT NULL slug |
| PK_bfc45df0481abd7f355d6187da1 | PRIMARY KEY | PRIMARY KEY (slug) |
| scope_slug_not_null | n | NOT NULL slug |
## Indexes
@@ -29,9 +29,9 @@ erDiagram
"public.role_scope" }o--|| "public.scope" : "FOREIGN KEY (#quot;scopeSlug#quot;) REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE"
"public.scope" {
varchar_128_ slug
text displayName
text description
text displayName
varchar_128_ slug
}
"public.role_scope" {
varchar_128_ roleSlug FK
@@ -4,18 +4,19 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| encryptedSettings | text | | false | | | |
| id | integer | | false | [public.project_secrets_provider_access](public.project_secrets_provider_access.md) | | |
| isEnabled | boolean | false | false | | | |
| providerKey | varchar(128) | | false | | | |
| type | varchar(36) | | false | | | Type of secrets provider. Possible values: awsSecretsManager, gcpSecretsManager, vault, azureKeyVault, infisical |
| encryptedSettings | text | | false | | | |
| isEnabled | boolean | false | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_4350ae85e76f9ba7df1370acb5d | PRIMARY KEY | PRIMARY KEY (id) |
| secrets_provider_connection_createdAt_not_null | n | NOT NULL "createdAt" |
| secrets_provider_connection_encryptedSettings_not_null | n | NOT NULL "encryptedSettings" |
| secrets_provider_connection_id_not_null | n | NOT NULL id |
@@ -23,14 +24,13 @@
| secrets_provider_connection_providerKey_not_null | n | NOT NULL "providerKey" |
| secrets_provider_connection_type_not_null | n | NOT NULL type |
| secrets_provider_connection_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_4350ae85e76f9ba7df1370acb5d | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_4350ae85e76f9ba7df1370acb5d | CREATE UNIQUE INDEX "PK_4350ae85e76f9ba7df1370acb5d" ON public.secrets_provider_connection USING btree (id) |
| IDX_secrets_provider_connection_providerKey | CREATE UNIQUE INDEX "IDX_secrets_provider_connection_providerKey" ON public.secrets_provider_connection USING btree ("providerKey") |
| PK_4350ae85e76f9ba7df1370acb5d | CREATE UNIQUE INDEX "PK_4350ae85e76f9ba7df1370acb5d" ON public.secrets_provider_connection USING btree (id) |
## Relations
@@ -40,20 +40,20 @@ erDiagram
"public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE"
"public.secrets_provider_connection" {
timestamp_3__with_time_zone createdAt
text encryptedSettings
integer id
boolean isEnabled
varchar_128_ providerKey
varchar_36_ type
text encryptedSettings
boolean isEnabled
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.project_secrets_provider_access" {
integer secretsProviderConnectionId FK
varchar_36_ projectId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ projectId FK
varchar_128_ role
integer secretsProviderConnectionId FK
timestamp_3__with_time_zone updatedAt
}
```
@@ -5,17 +5,17 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| key | varchar(255) | | false | | | |
| value | text | | false | | | |
| loadOnStartup | boolean | false | false | | | |
| value | text | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_dc0fe14e6d9943f268e7b119f69ab8bd | PRIMARY KEY | PRIMARY KEY (key) |
| settings_key_not_null | n | NOT NULL key |
| settings_loadOnStartup_not_null | n | NOT NULL "loadOnStartup" |
| settings_value_not_null | n | NOT NULL value |
| PK_dc0fe14e6d9943f268e7b119f69ab8bd | PRIMARY KEY | PRIMARY KEY (key) |
## Indexes
@@ -31,8 +31,8 @@ erDiagram
"public.settings" {
varchar_255_ key
text value
boolean loadOnStartup
text value
}
```
@@ -4,24 +4,24 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| credentialsId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| role | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_416f66fc846c7c442970c094ccf | FOREIGN KEY | FOREIGN KEY ("credentialsId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_812c2852270da1247756e77f5a4 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_8ef3a59796a228913f251779cff | PRIMARY KEY | PRIMARY KEY ("credentialsId", "projectId") |
| shared_credentials_2_createdAt_not_null | n | NOT NULL "createdAt" |
| shared_credentials_2_credentialsId_not_null | n | NOT NULL "credentialsId" |
| shared_credentials_2_projectId_not_null | n | NOT NULL "projectId" |
| shared_credentials_2_role_not_null | n | NOT NULL role |
| shared_credentials_2_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_416f66fc846c7c442970c094ccf | FOREIGN KEY | FOREIGN KEY ("credentialsId") REFERENCES credentials_entity(id) ON DELETE CASCADE |
| FK_812c2852270da1247756e77f5a4 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_8ef3a59796a228913f251779cff | PRIMARY KEY | PRIMARY KEY ("credentialsId", "projectId") |
## Indexes
@@ -38,35 +38,35 @@ erDiagram
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.shared_credentials" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialsId FK
varchar_36_ projectId FK
text role
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.credentials_entity" {
varchar_128_ name
text data
varchar_128_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
text data
varchar_36_ id
boolean isManaged
boolean isGlobal
boolean isManaged
boolean isResolvable
varchar_128_ name
boolean resolvableAllowFallback
varchar_16_ resolverId FK
varchar_128_ type
timestamp_3__with_time_zone updatedAt
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
```
@@ -4,79 +4,79 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| projectId | varchar(36) | | false | | [public.project](public.project.md) | |
| role | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_a45ea5f27bcfdc21af9b4188560 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| FK_daa206a04983d47d0a9c34649ce | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_5ba87620386b847201c9531c58f | PRIMARY KEY | PRIMARY KEY ("workflowId", "projectId") |
| shared_workflow_2_createdAt_not_null | n | NOT NULL "createdAt" |
| shared_workflow_2_projectId_not_null | n | NOT NULL "projectId" |
| shared_workflow_2_role_not_null | n | NOT NULL role |
| shared_workflow_2_updatedAt_not_null | n | NOT NULL "updatedAt" |
| shared_workflow_2_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_daa206a04983d47d0a9c34649ce | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| FK_a45ea5f27bcfdc21af9b4188560 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE |
| PK_5ba87620386b847201c9531c58f | PRIMARY KEY | PRIMARY KEY ("workflowId", "projectId") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_5ba87620386b847201c9531c58f | CREATE UNIQUE INDEX "PK_5ba87620386b847201c9531c58f" ON public.shared_workflow USING btree ("workflowId", "projectId") |
| IDX_shared_workflow_projectId | CREATE INDEX "IDX_shared_workflow_projectId" ON public.shared_workflow USING btree ("projectId") |
| PK_5ba87620386b847201c9531c58f | CREATE UNIQUE INDEX "PK_5ba87620386b847201c9531c58f" ON public.shared_workflow USING btree ("workflowId", "projectId") |
## Relations
```mermaid
erDiagram
"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.shared_workflow" {
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
text role
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
json nodeGroups
varchar sourceWorkflowId
varchar_36_ workflowId FK
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -4,10 +4,10 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| name | varchar(24) | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.folder_tag](public.folder_tag.md) [public.workflows_tags](public.workflows_tags.md) | | |
| name | varchar(24) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.workflows_tags](public.workflows_tags.md) [public.folder_tag](public.folder_tag.md) | | |
## Constraints
@@ -16,8 +16,8 @@
| tag_entity_createdAt_not_null | n | NOT NULL "createdAt" |
| tag_entity_id_not_null1 | n | NOT NULL id |
| tag_entity_name_not_null | n | NOT NULL name |
| tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" |
| tag_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" |
## Indexes
@@ -32,23 +32,23 @@
```mermaid
erDiagram
"public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE"
"public.folder_tag" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE"
"public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE"
"public.tag_entity" {
varchar_24_ name
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ id
}
"public.workflows_tags" {
varchar_36_ workflowId FK
varchar_36_ tagId FK
varchar_24_ name
timestamp_3__with_time_zone updatedAt
}
"public.folder_tag" {
varchar_36_ folderId FK
varchar_36_ tagId FK
}
"public.workflows_tags" {
varchar_36_ tagId FK
varchar_36_ workflowId FK
}
```
---
@@ -4,100 +4,100 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| testRunId | varchar(36) | | false | | [public.test_run](public.test_run.md) | |
| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | |
| status | varchar | | false | | | |
| runAt | timestamp(3) with time zone | | true | | | |
| completedAt | timestamp(3) with time zone | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| errorCode | varchar | | true | | | |
| errorDetails | json | | true | | | |
| metrics | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | |
| id | varchar(36) | | false | | | |
| inputs | json | | true | | | |
| metrics | json | | true | | | |
| outputs | json | | true | | | |
| runAt | timestamp(3) with time zone | | true | | | |
| runIndex | integer | | true | | | |
| status | varchar | | false | | | |
| testRunId | varchar(36) | | false | | [public.test_run](public.test_run.md) | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_8e4b4774db42f1e6dda3452b2af | FOREIGN KEY | FOREIGN KEY ("testRunId") REFERENCES test_run(id) ON DELETE CASCADE |
| FK_e48965fac35d0f5b9e7f51d8c44 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL |
| PK_90c121f77a78a6580e94b794bce | PRIMARY KEY | PRIMARY KEY (id) |
| test_case_execution_createdAt_not_null | n | NOT NULL "createdAt" |
| test_case_execution_id_not_null | n | NOT NULL id |
| test_case_execution_status_not_null | n | NOT NULL status |
| test_case_execution_testRunId_not_null | n | NOT NULL "testRunId" |
| test_case_execution_updatedAt_not_null | n | NOT NULL "updatedAt" |
| FK_e48965fac35d0f5b9e7f51d8c44 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL |
| FK_8e4b4774db42f1e6dda3452b2af | FOREIGN KEY | FOREIGN KEY ("testRunId") REFERENCES test_run(id) ON DELETE CASCADE |
| PK_90c121f77a78a6580e94b794bce | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_90c121f77a78a6580e94b794bce | CREATE UNIQUE INDEX "PK_90c121f77a78a6580e94b794bce" ON public.test_case_execution USING btree (id) |
| IDX_8e4b4774db42f1e6dda3452b2a | CREATE INDEX "IDX_8e4b4774db42f1e6dda3452b2a" ON public.test_case_execution USING btree ("testRunId") |
| PK_90c121f77a78a6580e94b794bce | CREATE UNIQUE INDEX "PK_90c121f77a78a6580e94b794bce" ON public.test_case_execution USING btree (id) |
## Relations
```mermaid
erDiagram
"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE"
"public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL"
"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE"
"public.test_case_execution" {
varchar_36_ id
varchar_36_ testRunId FK
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
integer executionId FK
varchar status
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
varchar errorCode
json errorDetails
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json inputs
json outputs
integer runIndex
}
"public.test_run" {
varchar_36_ id
varchar_36_ workflowId FK
varchar status
varchar errorCode
json errorDetails
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
json inputs
json metrics
timestamp_3__with_time_zone createdAt
json outputs
timestamp_3__with_time_zone runAt
integer runIndex
varchar status
varchar_36_ testRunId FK
timestamp_3__with_time_zone updatedAt
varchar_255_ runningInstanceId
boolean cancelRequested
varchar_36_ workflowVersionId
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ collectionId FK
}
"public.execution_entity" {
integer id
timestamp_3__with_time_zone createdAt
varchar_255_ deduplicationKey
timestamp_3__with_time_zone deletedAt
boolean finished
integer id
bigint jsonSizeBytes
varchar mode
varchar retryOf
varchar retrySuccessId
timestamp_3__with_time_zone startedAt
timestamp_3__with_time_zone stoppedAt
timestamp_3__with_time_zone waitTill
varchar status
varchar_36_ workflowId FK
timestamp_3__with_time_zone deletedAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
json tracingContext
varchar_255_ deduplicationKey
bigint jsonSizeBytes
timestamp_3__with_time_zone waitTill
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
"public.test_run" {
boolean cancelRequested
varchar_36_ collectionId FK
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ id
json metrics
timestamp_3__with_time_zone runAt
varchar_255_ runningInstanceId
varchar status
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
varchar_36_ workflowVersionId
}
```
@@ -4,137 +4,137 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.test_case_execution](public.test_case_execution.md) | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| status | varchar | | false | | | |
| cancelRequested | boolean | false | false | | | |
| collectionId | varchar(36) | | true | | [public.evaluation_collection](public.evaluation_collection.md) | |
| completedAt | timestamp(3) with time zone | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| errorCode | varchar | | true | | | |
| errorDetails | json | | true | | | |
| runAt | timestamp(3) with time zone | | true | | | |
| completedAt | timestamp(3) with time zone | | true | | | |
| metrics | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| runningInstanceId | varchar(255) | | true | | | |
| cancelRequested | boolean | false | false | | | |
| workflowVersionId | varchar(36) | | true | | | |
| evaluationConfigId | varchar(36) | | true | | [public.evaluation_config](public.evaluation_config.md) | |
| evaluationConfigSnapshot | jsonb | | true | | | |
| collectionId | varchar(36) | | true | | [public.evaluation_collection](public.evaluation_collection.md) | |
| id | varchar(36) | | false | [public.test_case_execution](public.test_case_execution.md) | | |
| metrics | json | | true | | | |
| runAt | timestamp(3) with time zone | | true | | | |
| runningInstanceId | varchar(255) | | true | | | |
| status | varchar | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | |
| workflowVersionId | varchar(36) | | true | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_d6870d3b6e4c185d33926f423c8 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| FK_test_run_collection_id | FOREIGN KEY | FOREIGN KEY ("collectionId") REFERENCES evaluation_collection(id) ON DELETE SET NULL |
| FK_test_run_evaluation_config_id | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE SET NULL |
| PK_011c050f566e9db509a0fadb9b9 | PRIMARY KEY | PRIMARY KEY (id) |
| test_run_cancelRequested_not_null | n | NOT NULL "cancelRequested" |
| test_run_createdAt_not_null | n | NOT NULL "createdAt" |
| test_run_id_not_null | n | NOT NULL id |
| test_run_status_not_null | n | NOT NULL status |
| test_run_updatedAt_not_null | n | NOT NULL "updatedAt" |
| test_run_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_d6870d3b6e4c185d33926f423c8 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE |
| PK_011c050f566e9db509a0fadb9b9 | PRIMARY KEY | PRIMARY KEY (id) |
| FK_test_run_evaluation_config_id | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE SET NULL |
| FK_test_run_collection_id | FOREIGN KEY | FOREIGN KEY ("collectionId") REFERENCES evaluation_collection(id) ON DELETE SET NULL |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_011c050f566e9db509a0fadb9b9 | CREATE UNIQUE INDEX "PK_011c050f566e9db509a0fadb9b9" ON public.test_run USING btree (id) |
| IDX_d6870d3b6e4c185d33926f423c | CREATE INDEX "IDX_d6870d3b6e4c185d33926f423c" ON public.test_run USING btree ("workflowId") |
| IDX_test_run_evaluationConfigId | CREATE INDEX "IDX_test_run_evaluationConfigId" ON public.test_run USING btree ("evaluationConfigId") |
| IDX_test_run_collectionId | CREATE INDEX "IDX_test_run_collectionId" ON public.test_run USING btree ("collectionId") |
| IDX_test_run_evaluationConfigId | CREATE INDEX "IDX_test_run_evaluationConfigId" ON public.test_run USING btree ("evaluationConfigId") |
| PK_011c050f566e9db509a0fadb9b9 | CREATE UNIQUE INDEX "PK_011c050f566e9db509a0fadb9b9" ON public.test_run USING btree (id) |
## Relations
```mermaid
erDiagram
"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL"
"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL"
"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE"
"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE"
"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL"
"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL"
"public.test_run" {
varchar_36_ id
varchar_36_ workflowId FK
varchar status
boolean cancelRequested
varchar_36_ collectionId FK
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_255_ runningInstanceId
boolean cancelRequested
varchar_36_ workflowVersionId
varchar_36_ evaluationConfigId FK
jsonb evaluationConfigSnapshot
varchar_36_ collectionId FK
}
"public.test_case_execution" {
varchar_36_ id
varchar_36_ testRunId FK
integer executionId FK
varchar status
json metrics
timestamp_3__with_time_zone runAt
timestamp_3__with_time_zone completedAt
varchar errorCode
json errorDetails
json metrics
timestamp_3__with_time_zone createdAt
varchar_255_ runningInstanceId
varchar status
timestamp_3__with_time_zone updatedAt
json inputs
json outputs
integer runIndex
}
"public.workflow_entity" {
varchar_128_ name
boolean active
json nodes
json connections
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
json staticData
json pinData
character_36_ versionId
integer triggerCount
varchar_36_ id
json meta
varchar_36_ parentFolderId FK
boolean isArchived
integer versionCounter
text description
varchar_36_ activeVersionId FK
json nodeGroups
varchar sourceWorkflowId
}
"public.evaluation_config" {
varchar_36_ id
varchar_36_ workflowId FK
varchar_128_ name
varchar_16_ status
varchar_64_ invalidReason
varchar_32_ datasetSource
json datasetRef
varchar_255_ startNodeName
varchar_255_ endNodeName
json metrics
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowVersionId
}
"public.evaluation_collection" {
varchar_36_ id
varchar_128_ name
text description
varchar_36_ workflowId FK
varchar_36_ evaluationConfigId FK
uuid createdById FK
json insightsCache
timestamp_3__with_time_zone createdAt
uuid createdById FK
text description
varchar_36_ evaluationConfigId FK
varchar_36_ id
json insightsCache
varchar_128_ name
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.evaluation_config" {
timestamp_3__with_time_zone createdAt
json datasetRef
varchar_32_ datasetSource
varchar_255_ endNodeName
varchar_36_ id
varchar_64_ invalidReason
json metrics
varchar_128_ name
varchar_255_ startNodeName
varchar_16_ status
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.test_case_execution" {
timestamp_3__with_time_zone completedAt
timestamp_3__with_time_zone createdAt
varchar errorCode
json errorDetails
integer executionId FK
varchar_36_ id
json inputs
json metrics
json outputs
timestamp_3__with_time_zone runAt
integer runIndex
varchar status
varchar_36_ testRunId FK
timestamp_3__with_time_zone updatedAt
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
```
@@ -4,18 +4,18 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| jti | varchar(255) | | false | | | |
| expiresAt | timestamp(3) with time zone | | false | | | |
| createdAt | timestamp(3) with time zone | | false | | | |
| expiresAt | timestamp(3) with time zone | | false | | | |
| jti | varchar(255) | | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_d8e8a6f737d530fdd2dd716e89c | PRIMARY KEY | PRIMARY KEY (jti) |
| token_exchange_jti_createdAt_not_null | n | NOT NULL "createdAt" |
| token_exchange_jti_expiresAt_not_null | n | NOT NULL "expiresAt" |
| token_exchange_jti_jti_not_null | n | NOT NULL jti |
| PK_d8e8a6f737d530fdd2dd716e89c | PRIMARY KEY | PRIMARY KEY (jti) |
## Indexes
@@ -30,9 +30,9 @@ erDiagram
"public.token_exchange_jti" {
varchar_255_ jti
timestamp_3__with_time_zone expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone expiresAt
varchar_255_ jti
}
```
@@ -4,21 +4,21 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| sourceId | varchar(36) | | false | | [public.trusted_key_source](public.trusted_key_source.md) | |
| kid | varchar(255) | | false | | | |
| data | text | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| data | text | | false | | | |
| kid | varchar(255) | | false | | | |
| sourceId | varchar(36) | | false | | [public.trusted_key_source](public.trusted_key_source.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_8c2938d746943dd8f608d23c891 | FOREIGN KEY | FOREIGN KEY ("sourceId") REFERENCES trusted_key_source(id) ON DELETE CASCADE |
| PK_dc7d93798f3dbb6959f974c97e1 | PRIMARY KEY | PRIMARY KEY ("sourceId", kid) |
| trusted_key_createdAt_not_null | n | NOT NULL "createdAt" |
| trusted_key_data_not_null | n | NOT NULL data |
| trusted_key_kid_not_null | n | NOT NULL kid |
| trusted_key_sourceId_not_null | n | NOT NULL "sourceId" |
| FK_8c2938d746943dd8f608d23c891 | FOREIGN KEY | FOREIGN KEY ("sourceId") REFERENCES trusted_key_source(id) ON DELETE CASCADE |
| PK_dc7d93798f3dbb6959f974c97e1 | PRIMARY KEY | PRIMARY KEY ("sourceId", kid) |
## Indexes
@@ -34,19 +34,19 @@ erDiagram
"public.trusted_key" }o--|| "public.trusted_key_source" : "FOREIGN KEY (#quot;sourceId#quot;) REFERENCES trusted_key_source(id) ON DELETE CASCADE"
"public.trusted_key" {
varchar_36_ sourceId FK
varchar_255_ kid
text data
timestamp_3__with_time_zone createdAt
text data
varchar_255_ kid
varchar_36_ sourceId FK
}
"public.trusted_key_source" {
varchar_36_ id
varchar_32_ type
text config
varchar_32_ status
timestamp_3__with_time_zone createdAt
varchar_36_ id
text lastError
timestamp_3__with_time_zone lastRefreshedAt
timestamp_3__with_time_zone createdAt
varchar_32_ status
varchar_32_ type
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,26 +4,26 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | [public.trusted_key](public.trusted_key.md) | | |
| type | varchar(32) | | false | | | |
| config | text | | false | | | |
| status | varchar(32) | 'pending'::character varying | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | [public.trusted_key](public.trusted_key.md) | | |
| lastError | text | | true | | | |
| lastRefreshedAt | timestamp(3) with time zone | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| status | varchar(32) | 'pending'::character varying | false | | | |
| type | varchar(32) | | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| PK_99e8908ce2c2cdccce487db7fc6 | PRIMARY KEY | PRIMARY KEY (id) |
| trusted_key_source_config_not_null | n | NOT NULL config |
| trusted_key_source_createdAt_not_null | n | NOT NULL "createdAt" |
| trusted_key_source_id_not_null | n | NOT NULL id |
| trusted_key_source_status_not_null | n | NOT NULL status |
| trusted_key_source_type_not_null | n | NOT NULL type |
| trusted_key_source_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_99e8908ce2c2cdccce487db7fc6 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
@@ -39,20 +39,20 @@ erDiagram
"public.trusted_key" }o--|| "public.trusted_key_source" : "FOREIGN KEY (#quot;sourceId#quot;) REFERENCES trusted_key_source(id) ON DELETE CASCADE"
"public.trusted_key_source" {
varchar_36_ id
varchar_32_ type
text config
varchar_32_ status
timestamp_3__with_time_zone createdAt
varchar_36_ id
text lastError
timestamp_3__with_time_zone lastRefreshedAt
timestamp_3__with_time_zone createdAt
varchar_32_ status
varchar_32_ type
timestamp_3__with_time_zone updatedAt
}
"public.trusted_key" {
varchar_36_ sourceId FK
varchar_255_ kid
text data
timestamp_3__with_time_zone createdAt
text data
varchar_255_ kid
varchar_36_ sourceId FK
}
```
+213 -213
View File
@@ -4,35 +4,35 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | uuid | gen_random_uuid() | false | [public.auth_identity](public.auth_identity.md) [public.project](public.project.md) [public.project_relation](public.project_relation.md) [public.user_api_keys](public.user_api_keys.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.chat_hub_tools](public.chat_hub_tools.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.user_favorites](public.user_favorites.md) [public.evaluation_collection](public.evaluation_collection.md) [public.agent_history](public.agent_history.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| disabled | boolean | false | false | | | |
| email | varchar(255) | | true | | | |
| firstName | varchar(32) | | true | | | |
| id | uuid | gen_random_uuid() | false | [public.agent_history](public.agent_history.md) [public.auth_identity](public.auth_identity.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_tools](public.chat_hub_tools.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.evaluation_collection](public.evaluation_collection.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) [public.project](public.project.md) [public.project_relation](public.project_relation.md) [public.user_api_keys](public.user_api_keys.md) [public.user_favorites](public.user_favorites.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.workflow_publish_history](public.workflow_publish_history.md) | | |
| lastActiveAt | date | | true | | | |
| lastName | varchar(32) | | true | | | |
| mfaEnabled | boolean | false | false | | | |
| mfaRecoveryCodes | text | | true | | | |
| mfaSecret | text | | true | | | |
| password | varchar(255) | | true | | | |
| personalizationAnswers | json | | true | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| settings | json | | true | | | |
| disabled | boolean | false | false | | | |
| mfaEnabled | boolean | false | false | | | |
| mfaSecret | text | | true | | | |
| mfaRecoveryCodes | text | | true | | | |
| lastActiveAt | date | | true | | | |
| roleSlug | varchar(128) | 'global:member'::character varying | false | | [public.role](public.role.md) | |
| settings | json | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_eaea92ee7bfb9c1b6cd01505d56 | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) |
| PK_ea8f538c94b6e352418254ed6474a81f | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_e12875dfb3b1d92d7d7c5377e2 | UNIQUE | UNIQUE (email) |
| user_createdAt_not_null | n | NOT NULL "createdAt" |
| user_disabled_not_null | n | NOT NULL disabled |
| user_id_not_null | n | NOT NULL id |
| user_mfaEnabled_not_null | n | NOT NULL "mfaEnabled" |
| user_roleSlug_not_null | n | NOT NULL "roleSlug" |
| user_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_ea8f538c94b6e352418254ed6474a81f | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_e12875dfb3b1d92d7d7c5377e2 | UNIQUE | UNIQUE (email) |
| FK_eaea92ee7bfb9c1b6cd01505d56 | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) |
## Indexes
@@ -47,241 +47,241 @@
```mermaid
erDiagram
"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.auth_identity" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id)"
"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.user_favorites" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)"
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
}
"public.auth_identity" {
uuid userId FK
varchar_255_ providerId
varchar_32_ providerType
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.project" {
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
varchar_512_ description
uuid creatorId FK
json customTelemetryTags
}
"public.project_relation" {
varchar_36_ projectId FK
uuid userId FK
varchar role FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.user_api_keys" {
varchar_36_ id
uuid userId FK
varchar_100_ label
varchar apiKey
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json scopes
varchar audience
timestamp_3__with_time_zone lastUsedAt
}
"public.chat_hub_sessions" {
uuid id
varchar_256_ title
uuid ownerId FK
timestamp_3__with_time_zone lastMessageAt
varchar_36_ credentialId FK
varchar_16_ provider
varchar_256_ model
varchar_36_ workflowId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
uuid agentId FK
varchar_128_ agentName
varchar_16_ type
}
"public.chat_hub_agents" {
uuid id
varchar_256_ name
varchar_512_ description
text systemPrompt
uuid ownerId FK
varchar_36_ credentialId FK
varchar_16_ provider
varchar_64_ model
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json icon
json files
json suggestedPrompts
}
"public.oauth_authorization_codes" {
varchar_255_ code
varchar clientId FK
uuid userId FK
varchar redirectUri
varchar codeChallenge
varchar_255_ codeChallengeMethod
bigint expiresAt
varchar state
boolean used
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar resource
json scope
}
"public.oauth_access_tokens" {
varchar token
varchar clientId FK
uuid userId FK
}
"public.oauth_refresh_tokens" {
varchar_255_ token
varchar clientId FK
uuid userId FK
bigint expiresAt
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json scope
}
"public.oauth_user_consents" {
integer id
uuid userId FK
varchar clientId FK
bigint grantedAt
}
"public.workflow_publish_history" {
integer id
varchar_36_ workflowId FK
varchar_36_ versionId FK
varchar_36_ event
uuid userId FK
timestamp_3__with_time_zone createdAt
}
"public.dynamic_credential_user_entry" {
varchar_16_ credentialId FK
uuid userId FK
varchar_16_ resolverId FK
text data
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.chat_hub_tools" {
uuid id
varchar_255_ name
varchar_255_ type
double_precision typeVersion
uuid ownerId FK
json definition
boolean enabled
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
}
"public.workflow_builder_session" {
uuid id
varchar_36_ workflowId FK
uuid userId FK
json messages
text previousSummary
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
varchar_255_ activeVersionCardId
varchar_255_ resumeAfterRestoreMessageId
}
"public.user_favorites" {
integer id
uuid userId FK
varchar_255_ resourceId
varchar_64_ resourceType
}
"public.evaluation_collection" {
varchar_36_ id
varchar_128_ name
text description
varchar_36_ workflowId FK
varchar_36_ evaluationConfigId FK
uuid createdById FK
json insightsCache
timestamp_3__with_time_zone createdAt
json settings
timestamp_3__with_time_zone updatedAt
}
"public.agent_history" {
varchar_36_ versionId
varchar_36_ agentId FK
json schema
json tools
json skills
uuid publishedById FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
uuid publishedById FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.auth_identity" {
timestamp_3__with_time_zone createdAt
varchar_255_ providerId
varchar_32_ providerType
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.chat_hub_agents" {
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
varchar_512_ description
json files
json icon
uuid id
varchar_64_ model
varchar_256_ name
uuid ownerId FK
varchar_16_ provider
json suggestedPrompts
text systemPrompt
timestamp_3__with_time_zone updatedAt
}
"public.instance_ai_pending_confirmations" {
varchar_36_ requestId
uuid threadId FK
uuid userId FK
varchar_16_ kind
varchar_36_ runId
varchar_64_ toolCallId
varchar_36_ messageGroupId
varchar_255_ checkpointKey FK
varchar_36_ checkpointTaskId
timestamp_3__with_time_zone expiresAt
"public.chat_hub_sessions" {
uuid agentId FK
varchar_128_ agentName
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
timestamp_3__with_time_zone lastMessageAt
varchar_256_ model
uuid ownerId FK
varchar_16_ provider
varchar_256_ title
varchar_16_ type
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.chat_hub_tools" {
timestamp_3__with_time_zone createdAt
json definition
boolean enabled
uuid id
varchar_255_ name
uuid ownerId FK
varchar_255_ type
double_precision typeVersion
timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_user_entry" {
timestamp_3__with_time_zone createdAt
varchar_16_ credentialId FK
text data
varchar_16_ resolverId FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.evaluation_collection" {
timestamp_3__with_time_zone createdAt
uuid createdById FK
text description
varchar_36_ evaluationConfigId FK
varchar_36_ id
json insightsCache
varchar_128_ name
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId FK
}
"public.instance_ai_mcp_registry_connections" {
uuid id
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
uuid id
varchar_255_ serverSlug FK
json toolFilter
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.instance_ai_pending_confirmations" {
varchar_255_ checkpointKey FK
varchar_36_ checkpointTaskId
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone expiresAt
varchar_16_ kind
varchar_36_ messageGroupId
varchar_36_ requestId
varchar_36_ runId
uuid threadId FK
varchar_64_ toolCallId
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.oauth_access_tokens" {
varchar clientId FK
varchar token
uuid userId FK
}
"public.oauth_authorization_codes" {
varchar clientId FK
varchar_255_ code
varchar codeChallenge
varchar_255_ codeChallengeMethod
timestamp_3__with_time_zone createdAt
bigint expiresAt
varchar redirectUri
varchar resource
json scope
varchar state
timestamp_3__with_time_zone updatedAt
boolean used
uuid userId FK
}
"public.oauth_refresh_tokens" {
varchar clientId FK
timestamp_3__with_time_zone createdAt
bigint expiresAt
json scope
varchar_255_ token
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.oauth_user_consents" {
varchar clientId FK
bigint grantedAt
integer id
uuid userId FK
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone updatedAt
}
"public.role" {
varchar_128_ slug
text displayName
text description
text roleType
boolean systemRole
"public.project_relation" {
timestamp_3__with_time_zone createdAt
varchar_36_ projectId FK
varchar role FK
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.user_api_keys" {
varchar apiKey
varchar audience
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_100_ label
timestamp_3__with_time_zone lastUsedAt
json scopes
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.user_favorites" {
integer id
varchar_255_ resourceId
varchar_64_ resourceType
uuid userId FK
}
"public.workflow_builder_session" {
varchar_255_ activeVersionCardId
timestamp_3__with_time_zone createdAt
uuid id
json messages
text previousSummary
varchar_255_ resumeAfterRestoreMessageId
timestamp_3__with_time_zone updatedAt
uuid userId FK
varchar_36_ workflowId FK
}
"public.workflow_publish_history" {
timestamp_3__with_time_zone createdAt
varchar_36_ event
integer id
uuid userId FK
varchar_36_ versionId FK
varchar_36_ workflowId FK
}
"public.role" {
timestamp_3__with_time_zone createdAt
text description
text displayName
text roleType
varchar_128_ slug
boolean systemRole
timestamp_3__with_time_zone updatedAt
}
```
@@ -4,20 +4,22 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) | | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| label | varchar(100) | | false | | | |
| apiKey | varchar | | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| scopes | json | | true | | | |
| audience | varchar | 'public-api'::character varying | false | | | |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| id | varchar(36) | | false | | | |
| label | varchar(100) | | false | | | |
| lastUsedAt | timestamp(3) with time zone | | true | | | |
| scopes | json | | true | | | |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_e131705cbbc8fb589889b02d457 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_978fa5caa3468f463dac9d92e69 | PRIMARY KEY | PRIMARY KEY (id) |
| user_api_keys_apiKey_not_null | n | NOT NULL "apiKey" |
| user_api_keys_audience_not_null | n | NOT NULL audience |
| user_api_keys_createdAt_not_null | n | NOT NULL "createdAt" |
@@ -25,16 +27,14 @@
| user_api_keys_label_not_null | n | NOT NULL label |
| user_api_keys_updatedAt_not_null | n | NOT NULL "updatedAt" |
| user_api_keys_userId_not_null | n | NOT NULL "userId" |
| FK_e131705cbbc8fb589889b02d457 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_978fa5caa3468f463dac9d92e69 | PRIMARY KEY | PRIMARY KEY (id) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| PK_978fa5caa3468f463dac9d92e69 | CREATE UNIQUE INDEX "PK_978fa5caa3468f463dac9d92e69" ON public.user_api_keys USING btree (id) |
| IDX_63d7bbae72c767cf162d459fcc | CREATE UNIQUE INDEX "IDX_63d7bbae72c767cf162d459fcc" ON public.user_api_keys USING btree ("userId", label) |
| IDX_1ef35bac35d20bdae979d917a3 | CREATE UNIQUE INDEX "IDX_1ef35bac35d20bdae979d917a3" ON public.user_api_keys USING btree ("apiKey") |
| IDX_63d7bbae72c767cf162d459fcc | CREATE UNIQUE INDEX "IDX_63d7bbae72c767cf162d459fcc" ON public.user_api_keys USING btree ("userId", label) |
| PK_978fa5caa3468f463dac9d92e69 | CREATE UNIQUE INDEX "PK_978fa5caa3468f463dac9d92e69" ON public.user_api_keys USING btree (id) |
## Relations
@@ -44,32 +44,32 @@ erDiagram
"public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE"
"public.user_api_keys" {
varchar_36_ id
uuid userId FK
varchar_100_ label
varchar apiKey
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json scopes
varchar audience
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_100_ label
timestamp_3__with_time_zone lastUsedAt
json scopes
timestamp_3__with_time_zone updatedAt
uuid userId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```
@@ -5,30 +5,30 @@
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | integer | | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
| resourceId | varchar(255) | | false | | | |
| resourceType | varchar(64) | | false | | | |
| userId | uuid | | false | | [public.user](public.user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_1dd5c393ad0517be3c31a7af836 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_6c472a19a7423cfbbf6b7c75939 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_cf6ae658ead9ffc124723413c65 | UNIQUE | UNIQUE ("userId", "resourceId", "resourceType") |
| user_favorites_id_not_null | n | NOT NULL id |
| user_favorites_resourceId_not_null | n | NOT NULL "resourceId" |
| user_favorites_resourceType_not_null | n | NOT NULL "resourceType" |
| user_favorites_userId_not_null | n | NOT NULL "userId" |
| FK_1dd5c393ad0517be3c31a7af836 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE |
| PK_6c472a19a7423cfbbf6b7c75939 | PRIMARY KEY | PRIMARY KEY (id) |
| UQ_cf6ae658ead9ffc124723413c65 | UNIQUE | UNIQUE ("userId", "resourceId", "resourceType") |
## Indexes
| Name | Definition |
| ---- | ---------- |
| IDX_1d11050a381548c42c32cc25c4 | CREATE INDEX "IDX_1d11050a381548c42c32cc25c4" ON public.user_favorites USING btree ("resourceType", "resourceId") |
| IDX_1dd5c393ad0517be3c31a7af83 | CREATE INDEX "IDX_1dd5c393ad0517be3c31a7af83" ON public.user_favorites USING btree ("userId") |
| PK_6c472a19a7423cfbbf6b7c75939 | CREATE UNIQUE INDEX "PK_6c472a19a7423cfbbf6b7c75939" ON public.user_favorites USING btree (id) |
| UQ_cf6ae658ead9ffc124723413c65 | CREATE UNIQUE INDEX "UQ_cf6ae658ead9ffc124723413c65" ON public.user_favorites USING btree ("userId", "resourceId", "resourceType") |
| IDX_1dd5c393ad0517be3c31a7af83 | CREATE INDEX "IDX_1dd5c393ad0517be3c31a7af83" ON public.user_favorites USING btree ("userId") |
| IDX_1d11050a381548c42c32cc25c4 | CREATE INDEX "IDX_1d11050a381548c42c32cc25c4" ON public.user_favorites USING btree ("resourceType", "resourceId") |
## Relations
@@ -39,26 +39,26 @@ erDiagram
"public.user_favorites" {
integer id
uuid userId FK
varchar_255_ resourceId
varchar_64_ resourceType
uuid userId FK
}
"public.user" {
uuid id
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone updatedAt
json settings
boolean disabled
boolean mfaEnabled
text mfaSecret
text mfaRecoveryCodes
date lastActiveAt
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
```

Some files were not shown because too many files have changed in this diff Show More