mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
feat(core): Add auto-generated database schema documentation (no-changelog) (#32069)
This commit is contained in:
parent
061f3f0320
commit
f5ced2faf9
|
|
@ -19,7 +19,7 @@ description: Authors n8n database migrations. Use when creating or modifying fil
|
|||
- [Cross-database Compatibility](#cross-database-compatibility)
|
||||
- [Tests](#tests)
|
||||
- [General Design Guidance](#general-design-guidance)
|
||||
- [After authoring](#after-authoring)
|
||||
- [Schema documentation](#schema-documentation)
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -123,6 +123,7 @@ Run through this before requesting review. Each item is a real, recurring review
|
|||
- [ ] **One logical change per migration**; split unrelated table changes into separate files. — [Don't combine independent schema changes](#dont-combine-independent-schema-changes)
|
||||
- [ ] **`up()` / `down()` reads as a list of intentions.** If either body grows past a screen or mixes schema operations with a multi-statement raw-SQL data move, extract the data move into a `private async` method on the same class (e.g. `private async backfillFromX(ctx)`). The top-level should orchestrate, not implement.
|
||||
- [ ] **Precedent is the bar to fix, not perpetuate.** When the checklist conflicts with what an older migration does (e.g. redundant `.primary.notNull`, hand-quoted identifiers, missing `.comment()`), the checklist wins for new code — don't copy the violation forward. Note the old occurrences in the PR if you spotted them.
|
||||
- [ ] **Regenerated the schema docs** with `pnpm db:schema:docs` and committed the `docs/generated/` changes. The `schema-docs-check` CI job fails on stale docs. — [Schema documentation](#schema-documentation)
|
||||
|
||||
Treat the checklist as a floor, not a ceiling.
|
||||
If any item fails, fix it before opening review.
|
||||
|
|
@ -779,4 +780,18 @@ A "polymorphic" column pair is one column that points at different tables depend
|
|||
- **Separate join tables per relation type** (`credential_external_secret_dependency`, `credential_node_dependency`, …). Each has a real FK. Queries that need "all dependencies" become a UNION.
|
||||
- **One nullable FK per possible target** with a CHECK constraint that exactly one is set. Each column is a real FK.
|
||||
- **Supertype table**: hoist parents into a single `dependency_target` with its own type column, then have one FK to that table.
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
## Schema documentation
|
||||
|
||||
The database schema is documented under `docs/generated/` — `docs/generated/sqlite-schema/` and `docs/generated/postgres-schema/`, one Markdown page per table plus a Mermaid ER diagram. These are **auto-generated from the migrations** with [tbls](https://github.com/k1LoW/tbls) (it runs every migration against a throwaway database and introspects the result), so any schema-changing migration makes them stale.
|
||||
|
||||
Regenerate and commit them alongside your migration:
|
||||
|
||||
```sh
|
||||
pnpm db:schema:docs # rewrites docs/generated/ — requires Docker (and `brew install tbls` locally)
|
||||
pnpm db:schema:check # verify only; what the schema-docs-check CI job runs
|
||||
```
|
||||
|
||||
The `schema-docs-check` CI job fails the PR when the committed docs don't match the migrations. Don't hand-edit anything under `docs/generated/` — it's overwritten on every regeneration.
|
||||
|
|
|
|||
24
.github/workflows/ci-pull-requests.yml
vendored
24
.github/workflows/ci-pull-requests.yml
vendored
|
|
@ -133,6 +133,9 @@ jobs:
|
|||
packages/cli/**/__tests__/**
|
||||
packages/testing/containers/services/postgres.ts
|
||||
.github/workflows/test-db-reusable.yml
|
||||
docs/generated/**
|
||||
.tbls.sqlite.yml
|
||||
.tbls.postgres.yml
|
||||
|
||||
- name: Setup and Build
|
||||
if: fromJSON(steps.ci-filter.outputs.results).ci || fromJSON(steps.ci-filter.outputs.results).e2e
|
||||
|
|
@ -304,6 +307,26 @@ jobs:
|
|||
with:
|
||||
ref: ${{ needs.install-and-build.outputs.commit_sha }}
|
||||
|
||||
schema-docs-check:
|
||||
name: DB Schema Docs Check
|
||||
if: needs.install-and-build.outputs.db == 'true'
|
||||
runs-on: ${{ vars.RUNNER_PROVIDER == 'github' && 'ubuntu-latest' || 'blacksmith-4vcpu-ubuntu-2204' }}
|
||||
needs: install-and-build
|
||||
steps:
|
||||
- uses: useblacksmith/checkout@41cdeedae8edb2e684ba22896a5fd2a3cb85db6b # v1
|
||||
with:
|
||||
ref: ${{ needs.install-and-build.outputs.commit_sha }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
build-command: pnpm turbo run build --filter=@n8n/db
|
||||
|
||||
# Regenerates the schema docs (sqlite + postgres-in-a-container) and fails
|
||||
# if they differ from what's committed. tbls runs as a Docker image in CI.
|
||||
- name: Verify schema docs are up to date
|
||||
run: pnpm --filter=@n8n/db schema:check
|
||||
|
||||
performance:
|
||||
name: Performance
|
||||
needs: install-and-build
|
||||
|
|
@ -378,6 +401,7 @@ jobs:
|
|||
e2e,
|
||||
dev-server-smoke,
|
||||
db-tests,
|
||||
schema-docs-check,
|
||||
performance,
|
||||
security-checks,
|
||||
workflow-scripts,
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
node_modules
|
||||
.DS_Store
|
||||
.tmp
|
||||
.tmp-schema-docs
|
||||
tmp
|
||||
dist
|
||||
coverage
|
||||
|
|
|
|||
16
.tbls.postgres.yml
Normal file
16
.tbls.postgres.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Auto-generated DB schema docs config (PostgreSQL). See docs/db.md.
|
||||
# Generated by `pnpm db:schema:docs`; do not point this at a real database.
|
||||
name: n8n database schema (PostgreSQL)
|
||||
desc: Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by hand.
|
||||
dsn: ${TBLS_DSN}
|
||||
docPath: docs/generated/postgres-schema
|
||||
|
||||
er:
|
||||
format: mermaid
|
||||
|
||||
format:
|
||||
sortTablesByName: true
|
||||
|
||||
# The migrations bookkeeping table is operational noise, not part of the schema.
|
||||
exclude:
|
||||
- migrations
|
||||
16
.tbls.sqlite.yml
Normal file
16
.tbls.sqlite.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Auto-generated DB schema docs config (SQLite). See docs/db.md.
|
||||
# Generated by `pnpm db:schema:docs`; do not point this at a real database.
|
||||
name: n8n database schema (SQLite)
|
||||
desc: Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand.
|
||||
dsn: ${TBLS_DSN}
|
||||
docPath: docs/generated/sqlite-schema
|
||||
|
||||
er:
|
||||
format: mermaid
|
||||
|
||||
format:
|
||||
sortTablesByName: true
|
||||
|
||||
# The migrations bookkeeping table is operational noise, not part of the schema.
|
||||
exclude:
|
||||
- migrations
|
||||
37
docs/db.md
Normal file
37
docs/db.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Database
|
||||
|
||||
n8n persists its state in a relational database, accessed through TypeORM. The
|
||||
schema supports both SQLite (the default) and PostgreSQL, and is defined by the
|
||||
**migrations** in `@n8n/db` rather than the entities (entities run with
|
||||
`synchronize: false`).
|
||||
|
||||
## Schema reference
|
||||
|
||||
Auto-generated documentation of the schema, one set per supported database:
|
||||
|
||||
- [SQLite](./generated/sqlite-schema/README.md)
|
||||
- [PostgreSQL](./generated/postgres-schema/README.md)
|
||||
|
||||
Each set lists every table with its columns, types, defaults, indexes, and
|
||||
foreign keys, plus a Mermaid ER diagram of the relationships. The two differ
|
||||
where the column types do (e.g. `datetime` vs `timestamptz`, `text`/`simple-json`
|
||||
vs `json`/`jsonb`, `boolean` representation).
|
||||
|
||||
### How it's generated
|
||||
|
||||
The generator spins up an empty database, runs the full `@n8n/db` migration set
|
||||
against it, and points [tbls](https://github.com/k1LoW/tbls) at the result.
|
||||
SQLite uses a throwaway file; PostgreSQL uses a throwaway testcontainer, so
|
||||
**Docker is required**.
|
||||
|
||||
```bash
|
||||
# Regenerate both (requires Docker; tbls locally via `brew install tbls`)
|
||||
pnpm db:schema:docs
|
||||
|
||||
# Verify the committed docs match the current migrations
|
||||
pnpm db:schema:check
|
||||
```
|
||||
|
||||
The schema reference is **auto-generated — do not edit by hand.** CI fails when
|
||||
a migration changes the schema but the docs weren't regenerated; when that
|
||||
happens, run `pnpm db:schema:docs` and commit the result.
|
||||
1309
docs/generated/postgres-schema/README.md
Normal file
1309
docs/generated/postgres-schema/README.md
Normal file
File diff suppressed because it is too large
Load Diff
65
docs/generated/postgres-schema/public.agent_checkpoints.md
Normal file
65
docs/generated/postgres-schema/public.agent_checkpoints.md
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# public.agent_checkpoints
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
104
docs/generated/postgres-schema/public.agent_execution.md
Normal file
104
docs/generated/postgres-schema/public.agent_execution.md
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
# public.agent_execution
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| error | text | | true | | | |
|
||||
| hitlStatus | varchar(16) | | true | | | |
|
||||
| source | varchar(32) | | 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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[]))) |
|
||||
| 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 |
|
||||
| agent_execution_id_not_null | n | NOT NULL id |
|
||||
| agent_execution_status_not_null | n | NOT NULL status |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```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" {
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
145
docs/generated/postgres-schema/public.agent_execution_threads.md
Normal file
145
docs/generated/postgres-schema/public.agent_execution_threads.md
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
# public.agent_execution_threads
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| projectId | varchar(255) | | false | | [public.project](public.project.md) | |
|
||||
| sessionNumber | integer | 0 | false | | | |
|
||||
| totalPromptTokens | integer | 0 | false | | | |
|
||||
| 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 | | | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| agent_execution_threads_id_not_null | n | NOT NULL id |
|
||||
| agent_execution_threads_projectId_not_null | n | NOT NULL "projectId" |
|
||||
| agent_execution_threads_sessionNumber_not_null | n | NOT NULL "sessionNumber" |
|
||||
| agent_execution_threads_totalCompletionTokens_not_null | n | NOT NULL "totalCompletionTokens" |
|
||||
| agent_execution_threads_totalCost_not_null | n | NOT NULL "totalCost" |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| IDX_0468a9dc35597314e641d4722a | CREATE INDEX "IDX_0468a9dc35597314e641d4722a" ON public.agent_execution_threads USING btree ("agentId") |
|
||||
| IDX_0e2f8bf92a7a9c88b89670f701 | CREATE INDEX "IDX_0e2f8bf92a7a9c88b89670f701" ON public.agent_execution_threads USING btree ("projectId") |
|
||||
| IDX_agent_execution_threads_taskVersionId | CREATE INDEX "IDX_agent_execution_threads_taskVersionId" ON public.agent_execution_threads USING btree ("taskVersionId") |
|
||||
| PK_22373dbf6ba6929d8ac50093309 | CREATE UNIQUE INDEX "PK_22373dbf6ba6929d8ac50093309" ON public.agent_execution_threads USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```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_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
|
||||
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.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
|
||||
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
|
||||
}
|
||||
"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.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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
73
docs/generated/postgres-schema/public.agent_files.md
Normal file
73
docs/generated/postgres-schema/public.agent_files.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# public.agent_files
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| agent_files_fileName_not_null | n | NOT NULL "fileName" |
|
||||
| agent_files_fileSizeBytes_not_null | n | NOT NULL "fileSizeBytes" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
123
docs/generated/postgres-schema/public.agent_history.md
Normal file
123
docs/generated/postgres-schema/public.agent_history.md
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
# public.agent_history
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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_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
|
||||
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
|
||||
}
|
||||
"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.agent_task_snapshot" {
|
||||
varchar_36_ versionId FK
|
||||
varchar_32_ taskId
|
||||
boolean enabled
|
||||
varchar_128_ name
|
||||
text objective
|
||||
varchar_128_ cronExpression
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# public.agent_task_definition
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| agent_task_definition_id_not_null | n | NOT NULL id |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
66
docs/generated/postgres-schema/public.agent_task_run_lock.md
Normal file
66
docs/generated/postgres-schema/public.agent_task_run_lock.md
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
# public.agent_task_run_lock
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_f593adaf7230e964d3c25deda64 | CREATE UNIQUE INDEX "PK_f593adaf7230e964d3c25deda64" ON public.agent_task_run_lock USING btree ("agentId", "taskId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||
|
||||
"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 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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
69
docs/generated/postgres-schema/public.agent_task_snapshot.md
Normal file
69
docs/generated/postgres-schema/public.agent_task_snapshot.md
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# public.agent_task_snapshot
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| agent_task_snapshot_name_not_null | n | NOT NULL name |
|
||||
| agent_task_snapshot_objective_not_null | n | NOT NULL objective |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_2142a8bcda2360c3c5e34f82640 | CREATE UNIQUE INDEX "PK_2142a8bcda2360c3c5e34f82640" ON public.agent_task_snapshot USING btree ("versionId", "taskId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
boolean enabled
|
||||
varchar_128_ name
|
||||
text objective
|
||||
varchar_128_ cronExpression
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
231
docs/generated/postgres-schema/public.agents.md
Normal file
231
docs/generated/postgres-schema/public.agents.md
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
# public.agents
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | | |
|
||||
| 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) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| agents_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| agents_id_not_null | n | NOT NULL id |
|
||||
| agents_integrations_not_null | n | NOT NULL integrations |
|
||||
| agents_name_not_null | n | NOT NULL name |
|
||||
| agents_projectId_not_null | n | NOT NULL "projectId" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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_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.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
|
||||
}
|
||||
"public.agent_checkpoints" {
|
||||
varchar_255_ runId
|
||||
varchar_255_ agentId FK
|
||||
text state
|
||||
boolean expired
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"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.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
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.agent_task_definition" {
|
||||
varchar_32_ id
|
||||
varchar_36_ agentId FK
|
||||
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 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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
110
docs/generated/postgres-schema/public.agents_memory_entries.md
Normal file
110
docs/generated/postgres-schema/public.agents_memory_entries.md
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# public.agents_memory_entries
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| 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
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| CHK_agents_memory_entries_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) |
|
||||
| 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 |
|
||||
| agents_memory_entries_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| agents_memory_entries_id_not_null | n | NOT NULL id |
|
||||
| agents_memory_entries_lastSeenAt_not_null | n | NOT NULL "lastSeenAt" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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
|
||||
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
|
||||
}
|
||||
"public.agents_resources" {
|
||||
varchar_255_ id
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
# public.agents_memory_entry_cursors
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(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_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.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
|
||||
}
|
||||
"public.agents_threads" {
|
||||
varchar_128_ id
|
||||
varchar_255_ resourceId
|
||||
varchar_255_ title
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
# public.agents_memory_entry_locks
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||
"public.agents_memory_entry_locks" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
|
||||
|
||||
"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" {
|
||||
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.agents_resources" {
|
||||
varchar_255_ id
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
# public.agents_memory_entry_sources
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| agents_memory_entry_sources_evidenceText_not_null | n | NOT NULL "evidenceText" |
|
||||
| agents_memory_entry_sources_id_not_null | n | NOT NULL id |
|
||||
| agents_memory_entry_sources_memoryEntryId_not_null | n | NOT NULL "memoryEntryId" |
|
||||
| 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_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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||
"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_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(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_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
|
||||
}
|
||||
"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_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_threads" {
|
||||
varchar_128_ id
|
||||
varchar_255_ resourceId
|
||||
varchar_255_ title
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
67
docs/generated/postgres-schema/public.agents_messages.md
Normal file
67
docs/generated/postgres-schema/public.agents_messages.md
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
# public.agents_messages
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| agents_messages_resourceId_not_null | n | NOT NULL "resourceId" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.agents_threads" {
|
||||
varchar_128_ id
|
||||
varchar_255_ resourceId
|
||||
varchar_255_ title
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
# public.agents_observation_cursors
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(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_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" {
|
||||
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.agents_threads" {
|
||||
varchar_128_ id
|
||||
varchar_255_ resourceId
|
||||
varchar_255_ title
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# public.agents_observation_locks
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this lock |
|
||||
| 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
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| CHK_agents_observation_locks_taskKind | CHECK | CHECK ((("taskKind")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[]))) |
|
||||
| agents_observation_locks_agentId_not_null | n | NOT NULL "agentId" |
|
||||
| agents_observation_locks_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| agents_observation_locks_heldUntil_not_null | n | NOT NULL "heldUntil" |
|
||||
| agents_observation_locks_holderId_not_null | n | NOT NULL "holderId" |
|
||||
| agents_observation_locks_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
|
||||
| agents_observation_locks_taskKind_not_null | n | NOT NULL "taskKind" |
|
||||
| agents_observation_locks_updatedAt_not_null | n | NOT NULL "updatedAt" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
|
||||
"public.agents_observation_locks" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
|
||||
|
||||
"public.agents_observation_locks" {
|
||||
varchar_36_ agentId FK
|
||||
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
|
||||
}
|
||||
"public.agents_threads" {
|
||||
varchar_128_ id
|
||||
varchar_255_ resourceId
|
||||
varchar_255_ title
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
111
docs/generated/postgres-schema/public.agents_observations.md
Normal file
111
docs/generated/postgres-schema/public.agents_observations.md
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
# public.agents_observations
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
| marker | varchar(16) | | false | | | |
|
||||
| text | text | | false | | | |
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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[]))) |
|
||||
| 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 |
|
||||
| agents_observations_marker_not_null | n | NOT NULL marker |
|
||||
| agents_observations_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
|
||||
| agents_observations_status_not_null | n | NOT NULL status |
|
||||
| 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_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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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
|
||||
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_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
|
||||
}
|
||||
"public.agents_threads" {
|
||||
varchar_128_ id
|
||||
varchar_255_ resourceId
|
||||
varchar_255_ title
|
||||
text metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
68
docs/generated/postgres-schema/public.agents_resources.md
Normal file
68
docs/generated/postgres-schema/public.agents_resources.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# public.agents_resources
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_fa6b20b2d31a9991529dbf8ef7d | CREATE UNIQUE INDEX "PK_fa6b20b2d31a9991529dbf8ef7d" ON public.agents_resources USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
|
||||
"public.agents_memory_entry_locks" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE"
|
||||
|
||||
"public.agents_resources" {
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
114
docs/generated/postgres-schema/public.agents_threads.md
Normal file
114
docs/generated/postgres-schema/public.agents_threads.md
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
# public.agents_threads
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| IDX_54fa1b94f34a409beafae567a4 | CREATE INDEX "IDX_54fa1b94f34a409beafae567a4" ON public.agents_threads USING btree ("resourceId") |
|
||||
| PK_4a3feb0a13ffe315c009cce64e5 | CREATE UNIQUE INDEX "PK_4a3feb0a13ffe315c009cce64e5" ON public.agents_threads USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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_threads" {
|
||||
varchar_128_ id
|
||||
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 updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
# public.ai_builder_temporary_workflow
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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" {
|
||||
varchar_36_ workflowId FK
|
||||
uuid threadId 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.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
# public.annotation_tag_entity
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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" {
|
||||
varchar_16_ id
|
||||
varchar_24_ name
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.execution_annotation_tags" {
|
||||
integer annotationId FK
|
||||
varchar_24_ tagId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
65
docs/generated/postgres-schema/public.auth_identity.md
Normal file
65
docs/generated/postgres-schema/public.auth_identity.md
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# public.auth_identity
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| userId | uuid | | true | | [public.user](public.user.md) | |
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| auth_identity_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| auth_identity_pkey | CREATE UNIQUE INDEX auth_identity_pkey ON public.auth_identity USING btree ("providerId", "providerType") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.auth_identity" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id)"
|
||||
|
||||
"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.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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# public.auth_provider_sync_history
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 | | | |
|
||||
| updated | integer | | false | | | |
|
||||
| disabled | integer | | false | | | |
|
||||
| error | text | | true | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| auth_provider_sync_history_created_not_null | n | NOT NULL created |
|
||||
| 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_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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| auth_provider_sync_history_pkey | CREATE UNIQUE INDEX auth_provider_sync_history_pkey ON public.auth_provider_sync_history USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.auth_provider_sync_history" {
|
||||
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
|
||||
integer updated
|
||||
integer disabled
|
||||
text error
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
59
docs/generated/postgres-schema/public.binary_data.md
Normal file
59
docs/generated/postgres-schema/public.binary_data.md
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# public.binary_data
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
| data | bytea | | false | | | Raw, not base64 encoded |
|
||||
| mimeType | varchar(255) | | true | | | |
|
||||
| fileName | varchar(255) | | true | | | |
|
||||
| fileSize | integer | | false | | | In bytes |
|
||||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| 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[]))) |
|
||||
| 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" |
|
||||
| binary_data_fileSize_not_null | n | NOT NULL "fileSize" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.binary_data" {
|
||||
uuid fileId
|
||||
varchar_50_ sourceType
|
||||
varchar_255_ sourceId
|
||||
bytea data
|
||||
varchar_255_ mimeType
|
||||
varchar_255_ fileName
|
||||
integer fileSize
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
# public.chat_hub_agent_tools
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| agentId | uuid | | false | | [public.chat_hub_agents](public.chat_hub_agents.md) | |
|
||||
| toolId | uuid | | false | | [public.chat_hub_tools](public.chat_hub_tools.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| 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") |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_cc8806fdea48297a7d497035d72 | CREATE UNIQUE INDEX "PK_cc8806fdea48297a7d497035d72" ON public.chat_hub_agent_tools USING btree ("agentId", "toolId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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_agent_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
|
||||
|
||||
"public.chat_hub_agent_tools" {
|
||||
uuid agentId FK
|
||||
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
|
||||
json files
|
||||
json suggestedPrompts
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
143
docs/generated/postgres-schema/public.chat_hub_agents.md
Normal file
143
docs/generated/postgres-schema/public.chat_hub_agents.md
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
# public.chat_hub_agents
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| files | json | '[]'::json | false | | | |
|
||||
| suggestedPrompts | json | '[]'::json | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| chat_hub_agents_model_not_null | n | NOT NULL model |
|
||||
| chat_hub_agents_name_not_null | n | NOT NULL name |
|
||||
| chat_hub_agents_ownerId_not_null | n | NOT NULL "ownerId" |
|
||||
| chat_hub_agents_provider_not_null | n | NOT NULL provider |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_f39a3b36bbdf0e2979ddb21cf78 | CREATE UNIQUE INDEX "PK_f39a3b36bbdf0e2979ddb21cf78" ON public.chat_hub_agents 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_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_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.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_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_agent_tools" {
|
||||
uuid agentId FK
|
||||
uuid toolId 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
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
boolean resolvableAllowFallback
|
||||
varchar_16_ resolverId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
158
docs/generated/postgres-schema/public.chat_hub_messages.md
Normal file
158
docs/generated/postgres-schema/public.chat_hub_messages.md
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
# public.chat_hub_messages
|
||||
|
||||
## Columns
|
||||
|
||||
| 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. |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| chat_hub_messages_name_not_null | n | NOT NULL name |
|
||||
| chat_hub_messages_sessionId_not_null | n | NOT NULL "sessionId" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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" {
|
||||
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
|
||||
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
|
||||
boolean finished
|
||||
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
|
||||
varchar_2_ storedAt
|
||||
json tracingContext
|
||||
varchar_255_ deduplicationKey
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
# public.chat_hub_session_tools
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| sessionId | uuid | | false | | [public.chat_hub_sessions](public.chat_hub_sessions.md) | |
|
||||
| toolId | uuid | | false | | [public.chat_hub_tools](public.chat_hub_tools.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_87aea76ff4c274c4a5ac838ebe3 | CREATE UNIQUE INDEX "PK_87aea76ff4c274c4a5ac838ebe3" ON public.chat_hub_session_tools USING btree ("sessionId", "toolId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
|
||||
|
||||
"public.chat_hub_session_tools" {
|
||||
uuid sessionId FK
|
||||
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
|
||||
varchar_16_ type
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
167
docs/generated/postgres-schema/public.chat_hub_sessions.md
Normal file
167
docs/generated/postgres-schema/public.chat_hub_sessions.md
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
# public.chat_hub_sessions
|
||||
|
||||
## Columns
|
||||
|
||||
| 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") |
|
||||
| type | varchar(16) | 'production'::character varying | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| CHK_chat_hub_sessions_type | CHECK | CHECK (((type)::text = ANY ((ARRAY['production'::character varying, 'manual'::character varying])::text[]))) |
|
||||
| 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" |
|
||||
| chat_hub_sessions_ownerId_not_null | n | NOT NULL "ownerId" |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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
|
||||
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
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
uuid agentId FK
|
||||
varchar_16_ status
|
||||
json attachments
|
||||
}
|
||||
"public.chat_hub_session_tools" {
|
||||
uuid sessionId FK
|
||||
uuid toolId 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
|
||||
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
|
||||
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
|
||||
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.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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
89
docs/generated/postgres-schema/public.chat_hub_tools.md
Normal file
89
docs/generated/postgres-schema/public.chat_hub_tools.md
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
# public.chat_hub_tools
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | |
|
||||
| definition | json | | false | | | |
|
||||
| enabled | boolean | true | 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| chat_hub_tools_id_not_null | n | NOT NULL id |
|
||||
| chat_hub_tools_name_not_null | n | NOT NULL name |
|
||||
| chat_hub_tools_ownerId_not_null | n | NOT NULL "ownerId" |
|
||||
| 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) |
|
||||
|
||||
## 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_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
|
||||
json definition
|
||||
boolean enabled
|
||||
timestamp_3__with_time_zone createdAt
|
||||
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.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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
# public.credential_dependency
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
}
|
||||
"public.credentials_entity" {
|
||||
varchar_128_ name
|
||||
text data
|
||||
varchar_128_ type
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
boolean resolvableAllowFallback
|
||||
varchar_16_ resolverId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
152
docs/generated/postgres-schema/public.credentials_entity.md
Normal file
152
docs/generated/postgres-schema/public.credentials_entity.md
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
# public.credentials_entity
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| isGlobal | boolean | false | false | | | |
|
||||
| isResolvable | boolean | false | false | | | |
|
||||
| resolvableAllowFallback | boolean | false | false | | | |
|
||||
| resolverId | varchar(16) | | true | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| credentials_entity_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| credentials_entity_data_not_null | n | NOT NULL data |
|
||||
| credentials_entity_id_not_null1 | n | NOT NULL id |
|
||||
| credentials_entity_isGlobal_not_null | n | NOT NULL "isGlobal" |
|
||||
| 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_resolvableAllowFallback_not_null | n | NOT NULL "resolvableAllowFallback" |
|
||||
| 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 |
|
||||
| ---- | ---------- |
|
||||
| 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.credential_dependency" }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.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
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
boolean resolvableAllowFallback
|
||||
varchar_16_ resolverId FK
|
||||
}
|
||||
"public.shared_credentials" {
|
||||
varchar_36_ credentialsId FK
|
||||
varchar_36_ projectId FK
|
||||
text role
|
||||
timestamp_3__with_time_zone createdAt
|
||||
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
|
||||
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.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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.credential_dependency" {
|
||||
integer id
|
||||
varchar_36_ credentialId FK
|
||||
varchar_64_ dependencyType
|
||||
varchar_255_ dependencyId
|
||||
timestamp_3__with_time_zone createdAt
|
||||
}
|
||||
"public.instance_ai_mcp_registry_connections" {
|
||||
uuid id
|
||||
varchar_36_ credentialId FK
|
||||
varchar_255_ serverSlug FK
|
||||
json toolFilter
|
||||
uuid userId FK
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.dynamic_credential_resolver" {
|
||||
varchar_16_ id
|
||||
varchar_128_ name
|
||||
varchar_128_ type
|
||||
text config
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
72
docs/generated/postgres-schema/public.data_table.md
Normal file
72
docs/generated/postgres-schema/public.data_table.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# public.data_table
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_e226d0001b9e6097cbfe70617cb | CREATE UNIQUE INDEX "PK_e226d0001b9e6097cbfe70617cb" ON public.data_table USING btree (id) |
|
||||
| UQ_b23096ef747281ac944d28e8b0d | CREATE UNIQUE INDEX "UQ_b23096ef747281ac944d28e8b0d" ON public.data_table USING btree ("projectId", name) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.data_table_column" }o--|| "public.data_table" : "FOREIGN KEY (#quot;dataTableId#quot;) REFERENCES data_table(id) ON DELETE CASCADE"
|
||||
"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||
|
||||
"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.data_table_column" {
|
||||
varchar_36_ id
|
||||
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" {
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
64
docs/generated/postgres-schema/public.data_table_column.md
Normal file
64
docs/generated/postgres-schema/public.data_table_column.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# public.data_table_column
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | varchar(36) | | false | | | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| data_table_column_index_not_null | n | NOT NULL index |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_673cb121ee4a8a5e27850c72c51 | CREATE UNIQUE INDEX "PK_673cb121ee4a8a5e27850c72c51" ON public.data_table_column USING btree (id) |
|
||||
| UQ_8082ec4890f892f0bc77473a123 | CREATE UNIQUE INDEX "UQ_8082ec4890f892f0bc77473a123" ON public.data_table_column USING btree ("dataTableId", name) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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" {
|
||||
varchar_36_ id
|
||||
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" {
|
||||
varchar_36_ id
|
||||
varchar_128_ name
|
||||
varchar_36_ projectId FK
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
58
docs/generated/postgres-schema/public.deployment_key.md
Normal file
58
docs/generated/postgres-schema/public.deployment_key.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# public.deployment_key
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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)) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.deployment_key" {
|
||||
varchar_36_ id
|
||||
varchar_64_ type
|
||||
text value
|
||||
varchar_20_ algorithm
|
||||
varchar_20_ status
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
# public.dynamic_credential_entry
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(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_entry" {
|
||||
varchar_16_ credential_id FK
|
||||
varchar_2048_ subject_id
|
||||
varchar_16_ resolver_id FK
|
||||
text data
|
||||
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
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
boolean resolvableAllowFallback
|
||||
varchar_16_ resolverId FK
|
||||
}
|
||||
"public.dynamic_credential_resolver" {
|
||||
varchar_16_ id
|
||||
varchar_128_ name
|
||||
varchar_128_ type
|
||||
text config
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
# public.dynamic_credential_resolver
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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_resolver" {
|
||||
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
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
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
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
# public.dynamic_credential_user_entry
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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" {
|
||||
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.credentials_entity" {
|
||||
varchar_128_ name
|
||||
text data
|
||||
varchar_128_ type
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
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
|
||||
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" {
|
||||
varchar_16_ id
|
||||
varchar_128_ name
|
||||
varchar_128_ type
|
||||
text config
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
136
docs/generated/postgres-schema/public.evaluation_collection.md
Normal file
136
docs/generated/postgres-schema/public.evaluation_collection.md
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
# public.evaluation_collection
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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.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
|
||||
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_ 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
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
125
docs/generated/postgres-schema/public.evaluation_config.md
Normal file
125
docs/generated/postgres-schema/public.evaluation_config.md
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# public.evaluation_config
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| evaluation_config_endNodeName_not_null | n | NOT NULL "endNodeName" |
|
||||
| evaluation_config_id_not_null | n | NOT NULL id |
|
||||
| evaluation_config_metrics_not_null | n | NOT NULL metrics |
|
||||
| evaluation_config_name_not_null | n | NOT NULL name |
|
||||
| evaluation_config_startNodeName_not_null | n | NOT NULL "startNodeName" |
|
||||
| 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 |
|
||||
| ---- | ---------- |
|
||||
| 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.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
|
||||
json datasetRef
|
||||
varchar_255_ startNodeName
|
||||
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
|
||||
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.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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
44
docs/generated/postgres-schema/public.event_destinations.md
Normal file
44
docs/generated/postgres-schema/public.event_destinations.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# public.event_destinations
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | uuid | | false | | | |
|
||||
| destination | jsonb | | 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| event_destinations_pkey | CREATE UNIQUE INDEX event_destinations_pkey ON public.event_destinations USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.event_destinations" {
|
||||
uuid id
|
||||
jsonb destination
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# public.execution_annotation_tags
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| annotationId | integer | | false | | [public.execution_annotations](public.execution_annotations.md) | |
|
||||
| tagId | varchar(24) | | false | | [public.annotation_tag_entity](public.annotation_tag_entity.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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_annotation_tags" }o--|| "public.annotation_tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES annotation_tag_entity(id) ON DELETE CASCADE"
|
||||
|
||||
"public.execution_annotation_tags" {
|
||||
integer annotationId FK
|
||||
varchar_24_ tagId FK
|
||||
}
|
||||
"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.annotation_tag_entity" {
|
||||
varchar_16_ id
|
||||
varchar_24_ name
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
# public.execution_annotations
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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_annotations" {
|
||||
integer id
|
||||
integer executionId FK
|
||||
varchar_6_ vote
|
||||
text note
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.execution_annotation_tags" {
|
||||
integer annotationId FK
|
||||
varchar_24_ tagId FK
|
||||
}
|
||||
"public.execution_entity" {
|
||||
integer id
|
||||
boolean finished
|
||||
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
|
||||
varchar_2_ storedAt
|
||||
json tracingContext
|
||||
varchar_255_ deduplicationKey
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
62
docs/generated/postgres-schema/public.execution_data.md
Normal file
62
docs/generated/postgres-schema/public.execution_data.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# public.execution_data
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | |
|
||||
| workflowData | json | | false | | | |
|
||||
| data | text | | false | | | |
|
||||
| workflowVersionId | varchar(36) | | true | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| execution_data_pkey | CREATE UNIQUE INDEX execution_data_pkey ON public.execution_data USING btree ("executionId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE"
|
||||
|
||||
"public.execution_data" {
|
||||
integer executionId FK
|
||||
json workflowData
|
||||
text data
|
||||
varchar_36_ workflowVersionId
|
||||
}
|
||||
"public.execution_entity" {
|
||||
integer id
|
||||
boolean finished
|
||||
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
|
||||
varchar_2_ storedAt
|
||||
json tracingContext
|
||||
varchar_255_ deduplicationKey
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
159
docs/generated/postgres-schema/public.execution_entity.md
Normal file
159
docs/generated/postgres-schema/public.execution_entity.md
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
# public.execution_entity
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | | |
|
||||
| finished | boolean | | false | | | |
|
||||
| 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 | | | |
|
||||
| storedAt | varchar(2) | 'db'::character varying | false | | | |
|
||||
| tracingContext | json | | true | | | |
|
||||
| deduplicationKey | varchar(255) | | true | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| execution_entity_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| execution_entity_finished_not_null | n | NOT NULL finished |
|
||||
| execution_entity_id_not_null | n | NOT NULL id |
|
||||
| execution_entity_mode_not_null | n | NOT NULL mode |
|
||||
| execution_entity_status_not_null | n | NOT NULL status |
|
||||
| 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 |
|
||||
|
||||
## 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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
|
||||
boolean finished
|
||||
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
|
||||
varchar_2_ storedAt
|
||||
json tracingContext
|
||||
varchar_255_ deduplicationKey
|
||||
}
|
||||
"public.execution_data" {
|
||||
integer executionId FK
|
||||
json workflowData
|
||||
text data
|
||||
varchar_36_ workflowVersionId
|
||||
}
|
||||
"public.execution_metadata" {
|
||||
integer id
|
||||
integer executionId FK
|
||||
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
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
uuid agentId FK
|
||||
varchar_16_ status
|
||||
json attachments
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
64
docs/generated/postgres-schema/public.execution_metadata.md
Normal file
64
docs/generated/postgres-schema/public.execution_metadata.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# public.execution_metadata
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | |
|
||||
| key | varchar(255) | | false | | | |
|
||||
| value | text | | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
varchar_255_ key
|
||||
text value
|
||||
}
|
||||
"public.execution_entity" {
|
||||
integer id
|
||||
boolean finished
|
||||
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
|
||||
varchar_2_ storedAt
|
||||
json tracingContext
|
||||
varchar_255_ deduplicationKey
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
93
docs/generated/postgres-schema/public.folder.md
Normal file
93
docs/generated/postgres-schema/public.folder.md
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# public.folder
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## 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.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||
|
||||
"public.folder" {
|
||||
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.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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
56
docs/generated/postgres-schema/public.folder_tag.md
Normal file
56
docs/generated/postgres-schema/public.folder_tag.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# public.folder_tag
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| folderId | varchar(36) | | false | | [public.folder](public.folder.md) | |
|
||||
| tagId | varchar(36) | | false | | [public.tag_entity](public.tag_entity.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_27e4e00852f6b06a925a4d83a3e | CREATE UNIQUE INDEX "PK_27e4e00852f6b06a925a4d83a3e" ON public.folder_tag USING btree ("folderId", "tagId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.folder_tag" }o--|| "public.folder" : "FOREIGN KEY (#quot;folderId#quot;) REFERENCES folder(id) ON DELETE CASCADE"
|
||||
"public.folder_tag" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE"
|
||||
|
||||
"public.folder_tag" {
|
||||
varchar_36_ folderId FK
|
||||
varchar_36_ tagId FK
|
||||
}
|
||||
"public.folder" {
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
59
docs/generated/postgres-schema/public.insights_by_period.md
Normal file
59
docs/generated/postgres-schema/public.insights_by_period.md
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# public.insights_by_period
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | integer | | false | | | |
|
||||
| metaId | integer | | false | | [public.insights_metadata](public.insights_metadata.md) | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.insights_by_period" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE"
|
||||
|
||||
"public.insights_by_period" {
|
||||
integer id
|
||||
integer metaId FK
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
100
docs/generated/postgres-schema/public.insights_metadata.md
Normal file
100
docs/generated/postgres-schema/public.insights_metadata.md
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
# public.insights_metadata
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | |
|
||||
| projectId | varchar(36) | | true | | [public.project](public.project.md) | |
|
||||
| workflowName | varchar(128) | | false | | | |
|
||||
| projectName | varchar(255) | | 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") |
|
||||
|
||||
## 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") |
|
||||
|
||||
## 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_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(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
|
||||
}
|
||||
"public.insights_by_period" {
|
||||
integer id
|
||||
integer metaId FK
|
||||
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.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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
57
docs/generated/postgres-schema/public.insights_raw.md
Normal file
57
docs/generated/postgres-schema/public.insights_raw.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# public.insights_raw
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | integer | | false | | | |
|
||||
| metaId | integer | | false | | [public.insights_metadata](public.insights_metadata.md) | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## 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_raw" {
|
||||
integer id
|
||||
integer metaId FK
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
54
docs/generated/postgres-schema/public.installed_nodes.md
Normal file
54
docs/generated/postgres-schema/public.installed_nodes.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# public.installed_nodes
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| name | varchar(200) | | false | | | |
|
||||
| type | varchar(200) | | false | | | |
|
||||
| latestVersion | integer | 1 | false | | | |
|
||||
| package | varchar(241) | | false | | [public.installed_packages](public.installed_packages.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_8ebd28194e4f792f96b5933423fc439df97d9689 | CREATE UNIQUE INDEX "PK_8ebd28194e4f792f96b5933423fc439df97d9689" ON public.installed_nodes USING btree (name) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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_241_ package FK
|
||||
}
|
||||
"public.installed_packages" {
|
||||
varchar_214_ packageName
|
||||
varchar_50_ installedVersion
|
||||
varchar_70_ authorName
|
||||
varchar_70_ authorEmail
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
55
docs/generated/postgres-schema/public.installed_packages.md
Normal file
55
docs/generated/postgres-schema/public.installed_packages.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# public.installed_packages
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_08cc9197c39b028c1e9beca225940576fd1a5804 | CREATE UNIQUE INDEX "PK_08cc9197c39b028c1e9beca225940576fd1a5804" ON public.installed_packages USING btree ("packageName") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.installed_nodes" {
|
||||
varchar_200_ name
|
||||
varchar_200_ type
|
||||
integer latestVersion
|
||||
varchar_241_ package FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
# public.instance_ai_checkpoints
|
||||
|
||||
## Columns
|
||||
|
||||
| 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. |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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_be9d0eca0b19fb93d4eb74b327 | CREATE INDEX "IDX_be9d0eca0b19fb93d4eb74b327" ON public.instance_ai_checkpoints USING btree ("resourceId") |
|
||||
|
||||
## 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_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
|
||||
}
|
||||
"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 updatedAt
|
||||
}
|
||||
"public.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# public.instance_ai_iteration_logs
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
# public.instance_ai_mcp_registry_connections
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | uuid | | false | | | |
|
||||
| credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | |
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.instance_ai_mcp_registry_connections" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
||||
"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.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
|
||||
varchar_36_ credentialId FK
|
||||
varchar_255_ serverSlug FK
|
||||
json toolFilter
|
||||
uuid userId FK
|
||||
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
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
boolean resolvableAllowFallback
|
||||
varchar_16_ resolverId FK
|
||||
}
|
||||
"public.mcp_registry_server" {
|
||||
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
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
# public.instance_ai_messages
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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_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_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# public.instance_ai_observation_cursors
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_5b6319b2e9a37c1064a72428f9a | CREATE UNIQUE INDEX "PK_5b6319b2e9a37c1064a72428f9a" ON public.instance_ai_observation_cursors USING btree ("observationScopeId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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 updatedAt
|
||||
}
|
||||
"public.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# public.instance_ai_observation_locks
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 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
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| CHK_instance_ai_observation_locks_taskKind | CHECK | CHECK ((("taskKind")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[]))) |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_fc491dd378b9448655c3c683f85 | CREATE UNIQUE INDEX "PK_fc491dd378b9448655c3c683f85" ON public.instance_ai_observation_locks USING btree ("observationScopeId", "taskKind") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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" {
|
||||
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" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
# public.instance_ai_observational_memory
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| isBufferingObservation | boolean | false | false | | | |
|
||||
| isBufferingReflection | boolean | false | false | | | |
|
||||
| lastBufferedAtTokens | integer | 0 | false | | | |
|
||||
| lastBufferedAtTime | timestamp(3) with time zone | | true | | | |
|
||||
| metadata | json | | 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| instance_ai_observational_memory_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| instance_ai_observational_memory_generationCount_not_null | n | NOT NULL "generationCount" |
|
||||
| instance_ai_observational_memory_id_not_null | n | NOT NULL id |
|
||||
| instance_ai_observational_memory_isBufferingReflection_not_null | n | NOT NULL "isBufferingReflection" |
|
||||
| instance_ai_observational_memory_isObserving_not_null | n | NOT NULL "isObserving" |
|
||||
| instance_ai_observational_memory_isReflecting_not_null | n | NOT NULL "isReflecting" |
|
||||
| instance_ai_observational_memory_lastBufferedAtTokens_not_null | n | NOT NULL "lastBufferedAtTokens" |
|
||||
| instance_ai_observational_memory_lookupKey_not_null | n | NOT NULL "lookupKey" |
|
||||
| instance_ai_observational_memory_observationTokenCount_not_null | n | NOT NULL "observationTokenCount" |
|
||||
| instance_ai_observational_memory_originType_not_null | n | NOT NULL "originType" |
|
||||
| instance_ai_observational_memory_pendingMessageTokens_not_null | n | NOT NULL "pendingMessageTokens" |
|
||||
| instance_ai_observational_memory_resourceId_not_null | n | NOT NULL "resourceId" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
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_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
# public.instance_ai_observations
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 | | | |
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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[]))) |
|
||||
| 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 |
|
||||
| instance_ai_observations_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
|
||||
| instance_ai_observations_status_not_null | n | NOT NULL status |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.instance_ai_observations" }o--o| "public.instance_ai_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES instance_ai_observations(id)"
|
||||
"public.instance_ai_observations" }o--o| "public.instance_ai_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES instance_ai_observations(id)"
|
||||
"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" {
|
||||
varchar_36_ id
|
||||
uuid 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.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
# public.instance_ai_pending_confirmations
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| CHK_instance_ai_pending_confirmations_kind | CHECK | CHECK (((kind)::text = ANY ((ARRAY['suspended'::character varying, 'inline'::character varying])::text[]))) |
|
||||
| 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" |
|
||||
| instance_ai_pending_confirmations_runId_not_null | n | NOT NULL "runId" |
|
||||
| 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_d7a4aba7440449865e2b924377 | CREATE INDEX "IDX_d7a4aba7440449865e2b924377" ON public.instance_ai_pending_confirmations USING btree ("expiresAt") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"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 updatedAt
|
||||
}
|
||||
"public.instance_ai_threads" {
|
||||
uuid id
|
||||
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
|
||||
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.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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# public.instance_ai_resources
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_45b5b0b6f715dae4292b86603d8 | CREATE UNIQUE INDEX "PK_45b5b0b6f715dae4292b86603d8" ON public.instance_ai_resources USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.instance_ai_resources" {
|
||||
varchar_255_ id
|
||||
text workingMemory
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
# public.instance_ai_run_snapshots
|
||||
|
||||
## Columns
|
||||
|
||||
| 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. |
|
||||
| spanId | varchar(64) | | true | | | OpenTelemetry span ID for the root Instance AI run. |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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_64_ spanId
|
||||
}
|
||||
"public.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
199
docs/generated/postgres-schema/public.instance_ai_threads.md
Normal file
199
docs/generated/postgres-schema/public.instance_ai_threads.md
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
# public.instance_ai_threads
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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_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_pending_confirmations" }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" {
|
||||
uuid id
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"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
|
||||
}
|
||||
"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
|
||||
timestamp_3__with_time_zone createdAt
|
||||
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 updatedAt
|
||||
}
|
||||
"public.instance_ai_observation_locks" {
|
||||
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_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 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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
# public.instance_ai_workflow_snapshots
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
# public.instance_version_history
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_874f58cb616935bf49d9dbd67e9 | CREATE UNIQUE INDEX "PK_874f58cb616935bf49d9dbd67e9" ON public.instance_version_history USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.instance_version_history" {
|
||||
integer id
|
||||
integer major
|
||||
integer minor
|
||||
integer patch
|
||||
timestamp_3__with_time_zone createdAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
38
docs/generated/postgres-schema/public.invalid_auth_token.md
Normal file
38
docs/generated/postgres-schema/public.invalid_auth_token.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# public.invalid_auth_token
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| token | varchar(512) | | false | | | |
|
||||
| expiresAt | timestamp(3) with time zone | | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_5779069b7235b256d91f7af1a15 | CREATE UNIQUE INDEX "PK_5779069b7235b256d91f7af1a15" ON public.invalid_auth_token USING btree (token) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.invalid_auth_token" {
|
||||
varchar_512_ token
|
||||
timestamp_3__with_time_zone expiresAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
64
docs/generated/postgres-schema/public.mcp_registry_server.md
Normal file
64
docs/generated/postgres-schema/public.mcp_registry_server.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# public.mcp_registry_server
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| CHK_tmp_mcp_registry_server_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'deprecated'::character varying])::text[]))) |
|
||||
| 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" |
|
||||
| tmp_mcp_registry_server_slug_not_null | n | NOT NULL slug |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_12fd89a1fb8489513b0a91f5d31 | CREATE UNIQUE INDEX "PK_12fd89a1fb8489513b0a91f5d31" ON public.mcp_registry_server USING btree (slug) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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" {
|
||||
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
|
||||
}
|
||||
"public.instance_ai_mcp_registry_connections" {
|
||||
uuid id
|
||||
varchar_36_ credentialId FK
|
||||
varchar_255_ serverSlug FK
|
||||
json toolFilter
|
||||
uuid userId FK
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
73
docs/generated/postgres-schema/public.oauth_access_tokens.md
Normal file
73
docs/generated/postgres-schema/public.oauth_access_tokens.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# public.oauth_access_tokens
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| token | varchar | | false | | | |
|
||||
| clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | |
|
||||
| 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) |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_dcd71f96a5d5f4bf79e67d322bf | CREATE UNIQUE INDEX "PK_dcd71f96a5d5f4bf79e67d322bf" ON public.oauth_access_tokens USING btree (token) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.oauth_access_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(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_access_tokens" {
|
||||
varchar token
|
||||
varchar clientId FK
|
||||
uuid userId FK
|
||||
}
|
||||
"public.oauth_clients" {
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
# public.oauth_authorization_codes
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| 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 | | | |
|
||||
| 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 |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| oauth_authorization_codes_code_not_null | n | NOT NULL code |
|
||||
| oauth_authorization_codes_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| oauth_authorization_codes_expiresAt_not_null | n | NOT NULL "expiresAt" |
|
||||
| oauth_authorization_codes_redirectUri_not_null | n | NOT NULL "redirectUri" |
|
||||
| oauth_authorization_codes_scope_not_null | n | NOT NULL scope |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_fb91ab932cfbd694061501cc20f | CREATE UNIQUE INDEX "PK_fb91ab932cfbd694061501cc20f" ON public.oauth_authorization_codes USING btree (code) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(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_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_clients" {
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
96
docs/generated/postgres-schema/public.oauth_clients.md
Normal file
96
docs/generated/postgres-schema/public.oauth_clients.md
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
# public.oauth_clients
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| oauth_clients_name_not_null | n | NOT NULL name |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_c4759172d3431bae6f04e678e0d | CREATE UNIQUE INDEX "PK_c4759172d3431bae6f04e678e0d" ON public.oauth_clients USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```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_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 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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
# public.oauth_refresh_tokens
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| scope | json | '["tool:listWorkflows","tool:getWorkflowDetails"]'::json | false | | | OAuth scopes granted for this refresh token |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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" |
|
||||
| oauth_refresh_tokens_scope_not_null | n | NOT NULL scope |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_74abaed0b30711b6532598b0392 | CREATE UNIQUE INDEX "PK_74abaed0b30711b6532598b0392" ON public.oauth_refresh_tokens USING btree (token) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.oauth_refresh_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(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_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_clients" {
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
78
docs/generated/postgres-schema/public.oauth_user_consents.md
Normal file
78
docs/generated/postgres-schema/public.oauth_user_consents.md
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
# public.oauth_user_consents
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
|
||||
## 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") |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_85b9ada746802c8993103470f05 | CREATE UNIQUE INDEX "PK_85b9ada746802c8993103470f05" ON public.oauth_user_consents USING btree (id) |
|
||||
| UQ_083721d99ce8db4033e2958ebb4 | CREATE UNIQUE INDEX "UQ_083721d99ce8db4033e2958ebb4" ON public.oauth_user_consents USING btree ("userId", "clientId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```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" {
|
||||
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
|
||||
}
|
||||
"public.oauth_clients" {
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
71
docs/generated/postgres-schema/public.processed_data.md
Normal file
71
docs/generated/postgres-schema/public.processed_data.md
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
# public.processed_data
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_ca04b9d8dc72de268fe07a65773 | CREATE UNIQUE INDEX "PK_ca04b9d8dc72de268fe07a65773" ON public.processed_data USING btree ("workflowId", context) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
190
docs/generated/postgres-schema/public.project.md
Normal file
190
docs/generated/postgres-schema/public.project.md
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
# public.project
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| project_createdAt_not_null | n | NOT NULL "createdAt" |
|
||||
| project_customTelemetryTags_not_null | n | NOT NULL "customTelemetryTags" |
|
||||
| project_id_not_null | n | NOT NULL id |
|
||||
| project_name_not_null | n | NOT NULL name |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_4d68b1358bb5b766d3e78f32f57 | CREATE UNIQUE INDEX "PK_4d68b1358bb5b766d3e78f32f57" ON public.project USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```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.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.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.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.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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.shared_credentials" {
|
||||
varchar_36_ credentialsId FK
|
||||
varchar_36_ projectId FK
|
||||
text role
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.shared_workflow" {
|
||||
varchar_36_ workflowId FK
|
||||
varchar_36_ projectId FK
|
||||
text role
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.folder" {
|
||||
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
|
||||
}
|
||||
"public.instance_ai_threads" {
|
||||
uuid id
|
||||
varchar_255_ resourceId
|
||||
text title
|
||||
json metadata
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
"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
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
94
docs/generated/postgres-schema/public.project_relation.md
Normal file
94
docs/generated/postgres-schema/public.project_relation.md
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
# public.project_relation
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
| 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) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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" {
|
||||
varchar_36_ projectId FK
|
||||
uuid userId FK
|
||||
varchar role FK
|
||||
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.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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
# public.project_secrets_provider_access
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| role | varchar(128) | 'secretsProviderConnection:user'::character varying | 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[]))) |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_0402b7fcec5415246656f102f83 | CREATE UNIQUE INDEX "PK_0402b7fcec5415246656f102f83" ON public.project_secrets_provider_access USING btree ("secretsProviderConnectionId", "projectId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```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" {
|
||||
integer secretsProviderConnectionId FK
|
||||
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
|
||||
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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
92
docs/generated/postgres-schema/public.role.md
Normal file
92
docs/generated/postgres-schema/public.role.md
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
# public.role
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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" {
|
||||
varchar_128_ slug
|
||||
text displayName
|
||||
text description
|
||||
text roleType
|
||||
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
|
||||
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
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
72
docs/generated/postgres-schema/public.role_mapping_rule.md
Normal file
72
docs/generated/postgres-schema/public.role_mapping_rule.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# public.role_mapping_rule
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | varchar(16) | | false | [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | | |
|
||||
| expression | text | | 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| role_mapping_rule_order_not_null | n | NOT NULL "order" |
|
||||
| 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 |
|
||||
| ---- | ---------- |
|
||||
| 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
|
||||
|
||||
```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" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
||||
|
||||
"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
|
||||
}
|
||||
"public.role_mapping_rule_project" {
|
||||
varchar_16_ roleMappingRuleId FK
|
||||
varchar_36_ projectId FK
|
||||
}
|
||||
"public.role" {
|
||||
varchar_128_ slug
|
||||
text displayName
|
||||
text description
|
||||
text roleType
|
||||
boolean systemRole
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
# public.role_mapping_rule_project
|
||||
|
||||
## Columns
|
||||
|
||||
| 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) | |
|
||||
|
||||
## 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") |
|
||||
|
||||
## 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") |
|
||||
|
||||
## 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" {
|
||||
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
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
57
docs/generated/postgres-schema/public.role_scope.md
Normal file
57
docs/generated/postgres-schema/public.role_scope.md
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# public.role_scope
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| roleSlug | varchar(128) | | false | | [public.role](public.role.md) | |
|
||||
| scopeSlug | varchar(128) | | false | | [public.scope](public.scope.md) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
||||
"public.role_scope" }o--|| "public.scope" : "FOREIGN KEY (#quot;scopeSlug#quot;) REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
||||
|
||||
"public.role_scope" {
|
||||
varchar_128_ roleSlug FK
|
||||
varchar_128_ scopeSlug FK
|
||||
}
|
||||
"public.role" {
|
||||
varchar_128_ slug
|
||||
text displayName
|
||||
text description
|
||||
text roleType
|
||||
boolean systemRole
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.scope" {
|
||||
varchar_128_ slug
|
||||
text displayName
|
||||
text description
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
44
docs/generated/postgres-schema/public.scope.md
Normal file
44
docs/generated/postgres-schema/public.scope.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# public.scope
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| scope_slug_not_null | n | NOT NULL slug |
|
||||
| PK_bfc45df0481abd7f355d6187da1 | PRIMARY KEY | PRIMARY KEY (slug) |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_bfc45df0481abd7f355d6187da1 | CREATE UNIQUE INDEX "PK_bfc45df0481abd7f355d6187da1" ON public.scope USING btree (slug) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
}
|
||||
"public.role_scope" {
|
||||
varchar_128_ roleSlug FK
|
||||
varchar_128_ scopeSlug FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# public.secrets_provider_connection
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| id | integer | | false | [public.project_secrets_provider_access](public.project_secrets_provider_access.md) | | |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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 |
|
||||
| secrets_provider_connection_isEnabled_not_null | n | NOT NULL "isEnabled" |
|
||||
| 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") |
|
||||
|
||||
## Relations
|
||||
|
||||
```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.secrets_provider_connection" {
|
||||
integer id
|
||||
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_128_ role
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
41
docs/generated/postgres-schema/public.settings.md
Normal file
41
docs/generated/postgres-schema/public.settings.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# public.settings
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| key | varchar(255) | | false | | | |
|
||||
| value | text | | false | | | |
|
||||
| loadOnStartup | boolean | false | false | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_dc0fe14e6d9943f268e7b119f69ab8bd | CREATE UNIQUE INDEX "PK_dc0fe14e6d9943f268e7b119f69ab8bd" ON public.settings USING btree (key) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.settings" {
|
||||
varchar_255_ key
|
||||
text value
|
||||
boolean loadOnStartup
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
75
docs/generated/postgres-schema/public.shared_credentials.md
Normal file
75
docs/generated/postgres-schema/public.shared_credentials.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# public.shared_credentials
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_8ef3a59796a228913f251779cff | CREATE UNIQUE INDEX "PK_8ef3a59796a228913f251779cff" ON public.shared_credentials USING btree ("credentialsId", "projectId") |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
||||
"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
|
||||
|
||||
"public.shared_credentials" {
|
||||
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
|
||||
varchar_36_ id
|
||||
boolean isManaged
|
||||
boolean isGlobal
|
||||
boolean isResolvable
|
||||
boolean resolvableAllowFallback
|
||||
varchar_16_ resolverId FK
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
85
docs/generated/postgres-schema/public.shared_workflow.md
Normal file
85
docs/generated/postgres-schema/public.shared_workflow.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# public.shared_workflow
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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" {
|
||||
varchar_36_ workflowId FK
|
||||
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
|
||||
}
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
56
docs/generated/postgres-schema/public.tag_entity.md
Normal file
56
docs/generated/postgres-schema/public.tag_entity.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# public.tag_entity
|
||||
|
||||
## Columns
|
||||
|
||||
| Name | Type | Default | Nullable | Children | Parents | Comment |
|
||||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
|
||||
| name | varchar(24) | | 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.workflows_tags](public.workflows_tags.md) [public.folder_tag](public.folder_tag.md) | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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) |
|
||||
|
||||
## Indexes
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| idx_812eb05f7451ca757fb98444ce | CREATE UNIQUE INDEX idx_812eb05f7451ca757fb98444ce ON public.tag_entity USING btree (name) |
|
||||
| pk_tag_entity_id | CREATE UNIQUE INDEX pk_tag_entity_id ON public.tag_entity USING btree (id) |
|
||||
| tag_entity_pkey | CREATE UNIQUE INDEX tag_entity_pkey ON public.tag_entity USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```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.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
|
||||
}
|
||||
"public.folder_tag" {
|
||||
varchar_36_ folderId FK
|
||||
varchar_36_ tagId FK
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
105
docs/generated/postgres-schema/public.test_case_execution.md
Normal file
105
docs/generated/postgres-schema/public.test_case_execution.md
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
# public.test_case_execution
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| 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 | | | |
|
||||
| inputs | json | | true | | | |
|
||||
| outputs | json | | true | | | |
|
||||
| runIndex | integer | | true | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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" {
|
||||
varchar_36_ id
|
||||
varchar_36_ testRunId FK
|
||||
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 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.execution_entity" {
|
||||
integer id
|
||||
boolean finished
|
||||
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
|
||||
varchar_2_ storedAt
|
||||
json tracingContext
|
||||
varchar_255_ deduplicationKey
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
143
docs/generated/postgres-schema/public.test_run.md
Normal file
143
docs/generated/postgres-schema/public.test_run.md
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
# public.test_run
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| 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) | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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") |
|
||||
|
||||
## 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_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
|
||||
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
|
||||
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.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
|
||||
}
|
||||
"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
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
41
docs/generated/postgres-schema/public.token_exchange_jti.md
Normal file
41
docs/generated/postgres-schema/public.token_exchange_jti.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# public.token_exchange_jti
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_d8e8a6f737d530fdd2dd716e89c | CREATE UNIQUE INDEX "PK_d8e8a6f737d530fdd2dd716e89c" ON public.token_exchange_jti USING btree (jti) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
|
||||
|
||||
"public.token_exchange_jti" {
|
||||
varchar_255_ jti
|
||||
timestamp_3__with_time_zone expiresAt
|
||||
timestamp_3__with_time_zone createdAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
56
docs/generated/postgres-schema/public.trusted_key.md
Normal file
56
docs/generated/postgres-schema/public.trusted_key.md
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# public.trusted_key
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
|
||||
## Constraints
|
||||
|
||||
| Name | Type | Definition |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_dc7d93798f3dbb6959f974c97e1 | CREATE UNIQUE INDEX "PK_dc7d93798f3dbb6959f974c97e1" ON public.trusted_key USING btree ("sourceId", kid) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
}
|
||||
"public.trusted_key_source" {
|
||||
varchar_36_ id
|
||||
varchar_32_ type
|
||||
text config
|
||||
varchar_32_ status
|
||||
text lastError
|
||||
timestamp_3__with_time_zone lastRefreshedAt
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
61
docs/generated/postgres-schema/public.trusted_key_source.md
Normal file
61
docs/generated/postgres-schema/public.trusted_key_source.md
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# public.trusted_key_source
|
||||
|
||||
## Columns
|
||||
|
||||
| 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 | | | |
|
||||
| lastError | text | | true | | | |
|
||||
| lastRefreshedAt | timestamp(3) with time zone | | 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 |
|
||||
| ---- | ---- | ---------- |
|
||||
| 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
|
||||
|
||||
| Name | Definition |
|
||||
| ---- | ---------- |
|
||||
| PK_99e8908ce2c2cdccce487db7fc6 | CREATE UNIQUE INDEX "PK_99e8908ce2c2cdccce487db7fc6" ON public.trusted_key_source USING btree (id) |
|
||||
|
||||
## Relations
|
||||
|
||||
```mermaid
|
||||
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
|
||||
text lastError
|
||||
timestamp_3__with_time_zone lastRefreshedAt
|
||||
timestamp_3__with_time_zone createdAt
|
||||
timestamp_3__with_time_zone updatedAt
|
||||
}
|
||||
"public.trusted_key" {
|
||||
varchar_36_ sourceId FK
|
||||
varchar_255_ kid
|
||||
text data
|
||||
timestamp_3__with_time_zone createdAt
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user