mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-28 11:35:03 +02:00
19050 lines
538 KiB
JSON
19050 lines
538 KiB
JSON
{
|
|
"name": "n8n database schema (PostgreSQL)",
|
|
"desc": "Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by hand.",
|
|
"tables": [
|
|
{
|
|
"name": "public.credentials_entity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "isManaged",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "isGlobal",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "isResolvable",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "resolvableAllowFallback",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "resolverId",
|
|
"type": "varchar(16)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_07fde106c0b471d8cc80a64fc8",
|
|
"def": "CREATE INDEX idx_07fde106c0b471d8cc80a64fc8 ON public.credentials_entity USING btree (type)",
|
|
"table": "public.credentials_entity",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "pk_credentials_entity_id",
|
|
"def": "CREATE UNIQUE INDEX pk_credentials_entity_id ON public.credentials_entity USING btree (id)",
|
|
"table": "public.credentials_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_pkey",
|
|
"def": "CREATE UNIQUE INDEX credentials_entity_pkey ON public.credentials_entity USING btree (id)",
|
|
"table": "public.credentials_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "credentials_entity_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_id_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_isGlobal_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isGlobal\"",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isGlobal"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_isManaged_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isManaged\"",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isManaged"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_isResolvable_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isResolvable\"",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isResolvable"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_resolvableAllowFallback_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resolvableAllowFallback\"",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resolvableAllowFallback"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "credentials_entity_resolverId_foreign",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"resolverId\") REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL",
|
|
"table": "public.credentials_entity",
|
|
"referenced_table": "public.dynamic_credential_resolver",
|
|
"columns": [
|
|
"resolverId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.execution_entity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "nextval('execution_entity_id_seq'::regclass)"
|
|
},
|
|
{
|
|
"name": "finished",
|
|
"type": "boolean",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "mode",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "retryOf",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "retrySuccessId",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "startedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "stoppedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "waitTill",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "deletedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "storedAt",
|
|
"type": "varchar(2)",
|
|
"nullable": false,
|
|
"default": "'db'::character varying"
|
|
},
|
|
{
|
|
"name": "tracingContext",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "deduplicationKey",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "jsonSizeBytes",
|
|
"type": "bigint",
|
|
"nullable": false,
|
|
"default": "0",
|
|
"comment": "Byte size of the JSON execution data bundle (run data, workflow snapshot, version id); excludes binary data. 0 means unknown."
|
|
},
|
|
{
|
|
"name": "workflowVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"default": "NULL::character varying",
|
|
"comment": "Version id of the workflow run by this execution; denormalized from the data bundle."
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "pk_e3e63bbf986767844bbe1166d4e",
|
|
"def": "CREATE UNIQUE INDEX pk_e3e63bbf986767844bbe1166d4e ON public.execution_entity USING btree (id)",
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_execution_entity_deletedAt",
|
|
"def": "CREATE INDEX \"IDX_execution_entity_deletedAt\" ON public.execution_entity USING btree (\"deletedAt\")",
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"deletedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_execution_entity_workflow_id_started_at",
|
|
"def": "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))",
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"workflowId",
|
|
"startedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_execution_entity_wait_till_status_deleted_at",
|
|
"def": "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))",
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"waitTill",
|
|
"status",
|
|
"deletedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_execution_entity_stopped_at_status_deleted_at",
|
|
"def": "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))",
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"stoppedAt",
|
|
"status",
|
|
"deletedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_execution_entity_deduplicationKey",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_execution_entity_deduplicationKey\" ON public.execution_entity USING btree (\"deduplicationKey\") WHERE (\"deduplicationKey\" IS NOT NULL)",
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"deduplicationKey"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "execution_entity_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_finished_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL finished",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"finished"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_jsonSizeBytes_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"jsonSizeBytes\"",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"jsonSizeBytes"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_mode_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL mode",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"mode"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_storedAt_check",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((\"storedAt\")::text = ANY ((ARRAY['db'::character varying, 'fs'::character varying, 's3'::character varying])::text[])))",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"storedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_storedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"storedAt\"",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"storedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_entity_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "pk_e3e63bbf986767844bbe1166d4e",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "fk_execution_entity_workflow_id",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.execution_entity",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_entity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "active",
|
|
"type": "boolean",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "nodes",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "connections",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "settings",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "staticData",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "pinData",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "versionId",
|
|
"type": "character(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "triggerCount",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "meta",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "parentFolderId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"default": "NULL::character varying"
|
|
},
|
|
{
|
|
"name": "isArchived",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "versionCounter",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "activeVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "nodeGroups",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
},
|
|
{
|
|
"name": "sourceWorkflowId",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "pk_workflow_entity_id",
|
|
"def": "CREATE UNIQUE INDEX pk_workflow_entity_id ON public.workflow_entity USING btree (id)",
|
|
"table": "public.workflow_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_pkey",
|
|
"def": "CREATE UNIQUE INDEX workflow_entity_pkey ON public.workflow_entity USING btree (id)",
|
|
"table": "public.workflow_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_workflow_entity_name",
|
|
"def": "CREATE INDEX \"IDX_workflow_entity_name\" ON public.workflow_entity USING btree (name)",
|
|
"table": "public.workflow_entity",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_workflow_entity_sourceWorkflowId",
|
|
"def": "CREATE INDEX \"IDX_workflow_entity_sourceWorkflowId\" ON public.workflow_entity USING btree (\"sourceWorkflowId\") WHERE (\"sourceWorkflowId\" IS NOT NULL)",
|
|
"table": "public.workflow_entity",
|
|
"columns": [
|
|
"sourceWorkflowId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflow_entity_active_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL active",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"active"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_connections_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL connections",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"connections"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_id_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_isArchived_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isArchived\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isArchived"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_nodeGroups_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"nodeGroups\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"nodeGroups"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_nodes_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL nodes",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"nodes"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_triggerCount_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"triggerCount\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"triggerCount"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_versionCounter_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"versionCounter\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionCounter"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_versionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"versionId\"",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_entity_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_08d6c67b7f722b0039d9d5ed620",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"activeVersionId\") REFERENCES workflow_history(\"versionId\") ON DELETE RESTRICT",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "public.workflow_history",
|
|
"columns": [
|
|
"activeVersionId"
|
|
],
|
|
"referenced_columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "fk_workflow_parent_folder",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"parentFolderId\") REFERENCES folder(id) ON DELETE CASCADE",
|
|
"table": "public.workflow_entity",
|
|
"referenced_table": "public.folder",
|
|
"columns": [
|
|
"parentFolderId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"triggers": [
|
|
{
|
|
"name": "workflow_version_increment",
|
|
"def": "CREATE TRIGGER workflow_version_increment BEFORE UPDATE ON public.workflow_entity FOR EACH ROW EXECUTE FUNCTION increment_workflow_version()"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.webhook_entity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "webhookPath",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "method",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "node",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "webhookId",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "pathLength",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_b21ace2e13596ccd87dc9bf4ea6",
|
|
"def": "CREATE UNIQUE INDEX \"PK_b21ace2e13596ccd87dc9bf4ea6\" ON public.webhook_entity USING btree (\"webhookPath\", method)",
|
|
"table": "public.webhook_entity",
|
|
"columns": [
|
|
"webhookPath",
|
|
"method"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_16f4436789e804e3e1c9eeb240",
|
|
"def": "CREATE INDEX idx_16f4436789e804e3e1c9eeb240 ON public.webhook_entity USING btree (\"webhookId\", method, \"pathLength\")",
|
|
"table": "public.webhook_entity",
|
|
"columns": [
|
|
"webhookId",
|
|
"method",
|
|
"pathLength"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "webhook_entity_method_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL method",
|
|
"table": "public.webhook_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"method"
|
|
]
|
|
},
|
|
{
|
|
"name": "webhook_entity_node_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL node",
|
|
"table": "public.webhook_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"node"
|
|
]
|
|
},
|
|
{
|
|
"name": "webhook_entity_webhookPath_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"webhookPath\"",
|
|
"table": "public.webhook_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"webhookPath"
|
|
]
|
|
},
|
|
{
|
|
"name": "webhook_entity_workflowId_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.webhook_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_b21ace2e13596ccd87dc9bf4ea6",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"webhookPath\", method)",
|
|
"table": "public.webhook_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"webhookPath",
|
|
"method"
|
|
]
|
|
},
|
|
{
|
|
"name": "fk_webhook_entity_workflow_id",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.webhook_entity",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.tag_entity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(24)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_812eb05f7451ca757fb98444ce",
|
|
"def": "CREATE UNIQUE INDEX idx_812eb05f7451ca757fb98444ce ON public.tag_entity USING btree (name)",
|
|
"table": "public.tag_entity",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "pk_tag_entity_id",
|
|
"def": "CREATE UNIQUE INDEX pk_tag_entity_id ON public.tag_entity USING btree (id)",
|
|
"table": "public.tag_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "tag_entity_pkey",
|
|
"def": "CREATE UNIQUE INDEX tag_entity_pkey ON public.tag_entity USING btree (id)",
|
|
"table": "public.tag_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "tag_entity_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "tag_entity_id_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "tag_entity_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "tag_entity_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "tag_entity_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflows_tags",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "tagId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "pk_workflows_tags",
|
|
"def": "CREATE UNIQUE INDEX pk_workflows_tags ON public.workflows_tags USING btree (\"workflowId\", \"tagId\")",
|
|
"table": "public.workflows_tags",
|
|
"columns": [
|
|
"workflowId",
|
|
"tagId"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_workflows_tags_workflow_id",
|
|
"def": "CREATE INDEX idx_workflows_tags_workflow_id ON public.workflows_tags USING btree (\"workflowId\")",
|
|
"table": "public.workflows_tags",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflows_tags_tagId_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL \"tagId\"",
|
|
"table": "public.workflows_tags",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tagId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflows_tags_workflowId_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflows_tags",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "fk_workflows_tags_workflow_id",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.workflows_tags",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "fk_workflows_tags_tag_id",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"tagId\") REFERENCES tag_entity(id) ON DELETE CASCADE",
|
|
"table": "public.workflows_tags",
|
|
"referenced_table": "public.tag_entity",
|
|
"columns": [
|
|
"tagId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "pk_workflows_tags",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"workflowId\", \"tagId\")",
|
|
"table": "public.workflows_tags",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId",
|
|
"tagId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.user",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
{
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "firstName",
|
|
"type": "varchar(32)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "lastName",
|
|
"type": "varchar(32)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "password",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "personalizationAnswers",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "settings",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "mfaEnabled",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "mfaSecret",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "mfaRecoveryCodes",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "lastActiveAt",
|
|
"type": "date",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "roleSlug",
|
|
"type": "varchar(128)",
|
|
"nullable": false,
|
|
"default": "'global:member'::character varying"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_ea8f538c94b6e352418254ed6474a81f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_ea8f538c94b6e352418254ed6474a81f\" ON public.\"user\" USING btree (id)",
|
|
"table": "public.user",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_e12875dfb3b1d92d7d7c5377e2",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_e12875dfb3b1d92d7d7c5377e2\" ON public.\"user\" USING btree (email)",
|
|
"table": "public.user",
|
|
"columns": [
|
|
"email"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_role_idx",
|
|
"def": "CREATE INDEX user_role_idx ON public.\"user\" USING btree (\"roleSlug\")",
|
|
"table": "public.user",
|
|
"columns": [
|
|
"roleSlug"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "user_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_disabled_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL disabled",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"disabled"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_mfaEnabled_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"mfaEnabled\"",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"mfaEnabled"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_roleSlug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"roleSlug\"",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"roleSlug"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_ea8f538c94b6e352418254ed6474a81f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_e12875dfb3b1d92d7d7c5377e2",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (email)",
|
|
"table": "public.user",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"email"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_eaea92ee7bfb9c1b6cd01505d56",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"roleSlug\") REFERENCES role(slug)",
|
|
"table": "public.user",
|
|
"referenced_table": "public.role",
|
|
"columns": [
|
|
"roleSlug"
|
|
],
|
|
"referenced_columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.settings",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "loadOnStartup",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_dc0fe14e6d9943f268e7b119f69ab8bd",
|
|
"def": "CREATE UNIQUE INDEX \"PK_dc0fe14e6d9943f268e7b119f69ab8bd\" ON public.settings USING btree (key)",
|
|
"table": "public.settings",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "settings_key_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL key",
|
|
"table": "public.settings",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "settings_loadOnStartup_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"loadOnStartup\"",
|
|
"table": "public.settings",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"loadOnStartup"
|
|
]
|
|
},
|
|
{
|
|
"name": "settings_value_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL value",
|
|
"table": "public.settings",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_dc0fe14e6d9943f268e7b119f69ab8bd",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (key)",
|
|
"table": "public.settings",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.installed_packages",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "packageName",
|
|
"type": "varchar(214)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "installedVersion",
|
|
"type": "varchar(50)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "authorName",
|
|
"type": "varchar(70)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "authorEmail",
|
|
"type": "varchar(70)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_08cc9197c39b028c1e9beca225940576fd1a5804",
|
|
"def": "CREATE UNIQUE INDEX \"PK_08cc9197c39b028c1e9beca225940576fd1a5804\" ON public.installed_packages USING btree (\"packageName\")",
|
|
"table": "public.installed_packages",
|
|
"columns": [
|
|
"packageName"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "installed_packages_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.installed_packages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "installed_packages_installedVersion_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"installedVersion\"",
|
|
"table": "public.installed_packages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"installedVersion"
|
|
]
|
|
},
|
|
{
|
|
"name": "installed_packages_packageName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"packageName\"",
|
|
"table": "public.installed_packages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"packageName"
|
|
]
|
|
},
|
|
{
|
|
"name": "installed_packages_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.installed_packages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_08cc9197c39b028c1e9beca225940576fd1a5804",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"packageName\")",
|
|
"table": "public.installed_packages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"packageName"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.installed_nodes",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(200)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(200)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "latestVersion",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "package",
|
|
"type": "varchar(241)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_8ebd28194e4f792f96b5933423fc439df97d9689",
|
|
"def": "CREATE UNIQUE INDEX \"PK_8ebd28194e4f792f96b5933423fc439df97d9689\" ON public.installed_nodes USING btree (name)",
|
|
"table": "public.installed_nodes",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "installed_nodes_latestVersion_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"latestVersion\"",
|
|
"table": "public.installed_nodes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"latestVersion"
|
|
]
|
|
},
|
|
{
|
|
"name": "installed_nodes_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.installed_nodes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "installed_nodes_package_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL package",
|
|
"table": "public.installed_nodes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"package"
|
|
]
|
|
},
|
|
{
|
|
"name": "installed_nodes_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.installed_nodes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_73f857fc5dce682cef8a99c11dbddbc969618951",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (package) REFERENCES installed_packages(\"packageName\") ON UPDATE CASCADE ON DELETE CASCADE",
|
|
"table": "public.installed_nodes",
|
|
"referenced_table": "public.installed_packages",
|
|
"columns": [
|
|
"package"
|
|
],
|
|
"referenced_columns": [
|
|
"packageName"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_8ebd28194e4f792f96b5933423fc439df97d9689",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (name)",
|
|
"table": "public.installed_nodes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_statistics",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "count",
|
|
"type": "bigint",
|
|
"nullable": true,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "latestEvent",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "rootCount",
|
|
"type": "bigint",
|
|
"nullable": true,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "nextval('workflow_statistics_id_seq'::regclass)"
|
|
},
|
|
{
|
|
"name": "workflowName",
|
|
"type": "varchar(128)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "workflow_statistics_pkey",
|
|
"def": "CREATE UNIQUE INDEX workflow_statistics_pkey ON public.workflow_statistics USING btree (id)",
|
|
"table": "public.workflow_statistics",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_workflow_statistics_workflow_name",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_workflow_statistics_workflow_name\" ON public.workflow_statistics USING btree (\"workflowId\", name)",
|
|
"table": "public.workflow_statistics",
|
|
"columns": [
|
|
"workflowId",
|
|
"name"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflow_statistics_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.workflow_statistics",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_statistics_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.workflow_statistics",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_statistics_workflowId_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_statistics",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_statistics_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.workflow_statistics",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.event_destinations",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "destination",
|
|
"type": "jsonb",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "event_destinations_pkey",
|
|
"def": "CREATE UNIQUE INDEX event_destinations_pkey ON public.event_destinations USING btree (id)",
|
|
"table": "public.event_destinations",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "event_destinations_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.event_destinations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "event_destinations_destination_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL destination",
|
|
"table": "public.event_destinations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"destination"
|
|
]
|
|
},
|
|
{
|
|
"name": "event_destinations_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.event_destinations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "event_destinations_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.event_destinations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "event_destinations_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.event_destinations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.auth_identity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "providerId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "providerType",
|
|
"type": "varchar(32)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "auth_identity_pkey",
|
|
"def": "CREATE UNIQUE INDEX auth_identity_pkey ON public.auth_identity USING btree (\"providerId\", \"providerType\")",
|
|
"table": "public.auth_identity",
|
|
"columns": [
|
|
"providerId",
|
|
"providerType"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "auth_identity_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.auth_identity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_identity_providerId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"providerId\"",
|
|
"table": "public.auth_identity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"providerId"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_identity_providerType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"providerType\"",
|
|
"table": "public.auth_identity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"providerType"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_identity_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.auth_identity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_identity_userId_fkey",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id)",
|
|
"table": "public.auth_identity",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_identity_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"providerId\", \"providerType\")",
|
|
"table": "public.auth_identity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"providerId",
|
|
"providerType"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.auth_provider_sync_history",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "nextval('auth_provider_sync_history_id_seq'::regclass)"
|
|
},
|
|
{
|
|
"name": "providerType",
|
|
"type": "varchar(32)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "runMode",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "startedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
},
|
|
{
|
|
"name": "endedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
},
|
|
{
|
|
"name": "scanned",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "created",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "updated",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "error",
|
|
"type": "text",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "auth_provider_sync_history_pkey",
|
|
"def": "CREATE UNIQUE INDEX auth_provider_sync_history_pkey ON public.auth_provider_sync_history USING btree (id)",
|
|
"table": "public.auth_provider_sync_history",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "auth_provider_sync_history_created_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL created",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"created"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_disabled_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL disabled",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"disabled"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_endedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"endedAt\"",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"endedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_providerType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"providerType\"",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"providerType"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_runMode_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"runMode\"",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runMode"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_scanned_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL scanned",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"scanned"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_startedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"startedAt\"",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"startedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_updated_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL updated",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updated"
|
|
]
|
|
},
|
|
{
|
|
"name": "auth_provider_sync_history_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.auth_provider_sync_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.variables",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "key",
|
|
"type": "varchar(50)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(50)",
|
|
"nullable": false,
|
|
"default": "'string'::character varying"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "variables_pkey",
|
|
"def": "CREATE UNIQUE INDEX variables_pkey ON public.variables USING btree (id)",
|
|
"table": "public.variables",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "variables_project_key_unique",
|
|
"def": "CREATE UNIQUE INDEX variables_project_key_unique ON public.variables USING btree (\"projectId\", key) WHERE (\"projectId\" IS NOT NULL)",
|
|
"table": "public.variables",
|
|
"columns": [
|
|
"projectId",
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "variables_global_key_unique",
|
|
"def": "CREATE UNIQUE INDEX variables_global_key_unique ON public.variables USING btree (key) WHERE (\"projectId\" IS NULL)",
|
|
"table": "public.variables",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "variables_id_not_null1",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.variables",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "variables_key_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL key",
|
|
"table": "public.variables",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "variables_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.variables",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "variables_value_max_len",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((value IS NULL) OR (char_length(value) \u003c= 1000)))",
|
|
"table": "public.variables",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "variables_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.variables",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_42f6c766f9f9d2edcc15bdd6e9b",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.variables",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.execution_data",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "executionId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowData",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "execution_data_pkey",
|
|
"def": "CREATE UNIQUE INDEX execution_data_pkey ON public.execution_data USING btree (\"executionId\")",
|
|
"table": "public.execution_data",
|
|
"columns": [
|
|
"executionId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "execution_data_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.execution_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_data_executionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"executionId\"",
|
|
"table": "public.execution_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"executionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_data_workflowData_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowData\"",
|
|
"table": "public.execution_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowData"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_data_fk",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE CASCADE",
|
|
"table": "public.execution_data",
|
|
"referenced_table": "public.execution_entity",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_data_pkey",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"executionId\")",
|
|
"table": "public.execution_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"executionId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_history",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "versionId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "authors",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "nodes",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "connections",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "autosaved",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "nodeGroups",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_b6572dd6173e4cd06fe79937b58",
|
|
"def": "CREATE UNIQUE INDEX \"PK_b6572dd6173e4cd06fe79937b58\" ON public.workflow_history USING btree (\"versionId\")",
|
|
"table": "public.workflow_history",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1e31657f5fe46816c34be7c1b4",
|
|
"def": "CREATE INDEX \"IDX_1e31657f5fe46816c34be7c1b4\" ON public.workflow_history USING btree (\"workflowId\")",
|
|
"table": "public.workflow_history",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflow_history_authors_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL authors",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"authors"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_autosaved_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL autosaved",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"autosaved"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_connections_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL connections",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"connections"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_nodeGroups_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"nodeGroups\"",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"nodeGroups"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_nodes_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL nodes",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"nodes"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_versionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"versionId\"",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_history_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1e31657f5fe46816c34be7c1b4b",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_b6572dd6173e4cd06fe79937b58",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"versionId\")",
|
|
"table": "public.workflow_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.project",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "icon",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "varchar(512)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "creatorId",
|
|
"type": "uuid",
|
|
"nullable": true,
|
|
"comment": "ID of the user who created the project"
|
|
},
|
|
{
|
|
"name": "customTelemetryTags",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_4d68b1358bb5b766d3e78f32f57",
|
|
"def": "CREATE UNIQUE INDEX \"PK_4d68b1358bb5b766d3e78f32f57\" ON public.project USING btree (id)",
|
|
"table": "public.project",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "project_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_customTelemetryTags_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"customTelemetryTags\"",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"customTelemetryTags"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "projects_creatorId_foreign",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"creatorId\") REFERENCES \"user\"(id) ON DELETE SET NULL",
|
|
"table": "public.project",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"creatorId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_4d68b1358bb5b766d3e78f32f57",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.project_relation",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_1caaa312a5d7184a003be0f0cb6",
|
|
"def": "CREATE UNIQUE INDEX \"PK_1caaa312a5d7184a003be0f0cb6\" ON public.project_relation USING btree (\"projectId\", \"userId\")",
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"projectId",
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_61448d56d61802b5dfde5cdb00",
|
|
"def": "CREATE INDEX \"IDX_61448d56d61802b5dfde5cdb00\" ON public.project_relation USING btree (\"projectId\")",
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_5f0643f6717905a05164090dde",
|
|
"def": "CREATE INDEX \"IDX_5f0643f6717905a05164090dde\" ON public.project_relation USING btree (\"userId\")",
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_relation_role_idx",
|
|
"def": "CREATE INDEX project_relation_role_idx ON public.project_relation USING btree (role)",
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_relation_role_project_idx",
|
|
"def": "CREATE INDEX project_relation_role_project_idx ON public.project_relation USING btree (\"projectId\", role)",
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"projectId",
|
|
"role"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "project_relation_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_relation_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_relation_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_relation_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_relation_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_5f0643f6717905a05164090dde7",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_61448d56d61802b5dfde5cdb002",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_1caaa312a5d7184a003be0f0cb6",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"projectId\", \"userId\")",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId",
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_c6b99592dc96b0d836d7a21db91",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (role) REFERENCES role(slug)",
|
|
"table": "public.project_relation",
|
|
"referenced_table": "public.role",
|
|
"columns": [
|
|
"role"
|
|
],
|
|
"referenced_columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.shared_credentials",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "credentialsId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_8ef3a59796a228913f251779cff",
|
|
"def": "CREATE UNIQUE INDEX \"PK_8ef3a59796a228913f251779cff\" ON public.shared_credentials USING btree (\"credentialsId\", \"projectId\")",
|
|
"table": "public.shared_credentials",
|
|
"columns": [
|
|
"credentialsId",
|
|
"projectId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "shared_credentials_2_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_credentials_2_credentialsId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"credentialsId\"",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialsId"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_credentials_2_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_credentials_2_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_credentials_2_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_416f66fc846c7c442970c094ccf",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"credentialsId\") REFERENCES credentials_entity(id) ON DELETE CASCADE",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credentialsId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_812c2852270da1247756e77f5a4",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_8ef3a59796a228913f251779cff",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"credentialsId\", \"projectId\")",
|
|
"table": "public.shared_credentials",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialsId",
|
|
"projectId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.shared_workflow",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_5ba87620386b847201c9531c58f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_5ba87620386b847201c9531c58f\" ON public.shared_workflow USING btree (\"workflowId\", \"projectId\")",
|
|
"table": "public.shared_workflow",
|
|
"columns": [
|
|
"workflowId",
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_shared_workflow_projectId",
|
|
"def": "CREATE INDEX \"IDX_shared_workflow_projectId\" ON public.shared_workflow USING btree (\"projectId\")",
|
|
"table": "public.shared_workflow",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "shared_workflow_2_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_workflow_2_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_workflow_2_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_workflow_2_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "shared_workflow_2_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_daa206a04983d47d0a9c34649ce",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a45ea5f27bcfdc21af9b4188560",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_5ba87620386b847201c9531c58f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"workflowId\", \"projectId\")",
|
|
"table": "public.shared_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId",
|
|
"projectId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.execution_metadata",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "nextval('execution_metadata_temp_id_seq'::regclass)"
|
|
},
|
|
{
|
|
"name": "executionId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "text",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_17a0b6284f8d626aae88e1c16e4",
|
|
"def": "CREATE UNIQUE INDEX \"PK_17a0b6284f8d626aae88e1c16e4\" ON public.execution_metadata USING btree (id)",
|
|
"table": "public.execution_metadata",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_cec8eea3bf49551482ccb4933e",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_cec8eea3bf49551482ccb4933e\" ON public.execution_metadata USING btree (\"executionId\", key)",
|
|
"table": "public.execution_metadata",
|
|
"columns": [
|
|
"executionId",
|
|
"key"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "execution_metadata_temp_executionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"executionId\"",
|
|
"table": "public.execution_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"executionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_metadata_temp_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.execution_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_metadata_temp_key_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL key",
|
|
"table": "public.execution_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_metadata_temp_value_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL value",
|
|
"table": "public.execution_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_31d0b4c93fb85ced26f6005cda3",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE CASCADE",
|
|
"table": "public.execution_metadata",
|
|
"referenced_table": "public.execution_entity",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_17a0b6284f8d626aae88e1c16e4",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.execution_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.invalid_auth_token",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "token",
|
|
"type": "varchar(512)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "expiresAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_5779069b7235b256d91f7af1a15",
|
|
"def": "CREATE UNIQUE INDEX \"PK_5779069b7235b256d91f7af1a15\" ON public.invalid_auth_token USING btree (token)",
|
|
"table": "public.invalid_auth_token",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "invalid_auth_token_expiresAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"expiresAt\"",
|
|
"table": "public.invalid_auth_token",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expiresAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "invalid_auth_token_token_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL token",
|
|
"table": "public.invalid_auth_token",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_5779069b7235b256d91f7af1a15",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (token)",
|
|
"table": "public.invalid_auth_token",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.execution_annotations",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "nextval('execution_annotations_id_seq'::regclass)"
|
|
},
|
|
{
|
|
"name": "executionId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "vote",
|
|
"type": "varchar(6)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "note",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_7afcf93ffa20c4252869a7c6a23",
|
|
"def": "CREATE UNIQUE INDEX \"PK_7afcf93ffa20c4252869a7c6a23\" ON public.execution_annotations USING btree (id)",
|
|
"table": "public.execution_annotations",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_97f863fa83c4786f1956508496",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_97f863fa83c4786f1956508496\" ON public.execution_annotations USING btree (\"executionId\")",
|
|
"table": "public.execution_annotations",
|
|
"columns": [
|
|
"executionId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "execution_annotations_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.execution_annotations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_annotations_executionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"executionId\"",
|
|
"table": "public.execution_annotations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"executionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_annotations_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.execution_annotations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_annotations_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.execution_annotations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_97f863fa83c4786f19565084960",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE CASCADE",
|
|
"table": "public.execution_annotations",
|
|
"referenced_table": "public.execution_entity",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_7afcf93ffa20c4252869a7c6a23",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.execution_annotations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.annotation_tag_entity",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(24)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_69dfa041592c30bbc0d4b84aa00",
|
|
"def": "CREATE UNIQUE INDEX \"PK_69dfa041592c30bbc0d4b84aa00\" ON public.annotation_tag_entity USING btree (id)",
|
|
"table": "public.annotation_tag_entity",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_ae51b54c4bb430cf92f48b623f",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_ae51b54c4bb430cf92f48b623f\" ON public.annotation_tag_entity USING btree (name)",
|
|
"table": "public.annotation_tag_entity",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "annotation_tag_entity_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.annotation_tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "annotation_tag_entity_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.annotation_tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "annotation_tag_entity_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.annotation_tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "annotation_tag_entity_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.annotation_tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_69dfa041592c30bbc0d4b84aa00",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.annotation_tag_entity",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.execution_annotation_tags",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "annotationId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "tagId",
|
|
"type": "varchar(24)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_979ec03d31294cca484be65d11f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_979ec03d31294cca484be65d11f\" ON public.execution_annotation_tags USING btree (\"annotationId\", \"tagId\")",
|
|
"table": "public.execution_annotation_tags",
|
|
"columns": [
|
|
"annotationId",
|
|
"tagId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a3697779b366e131b2bbdae297",
|
|
"def": "CREATE INDEX \"IDX_a3697779b366e131b2bbdae297\" ON public.execution_annotation_tags USING btree (\"tagId\")",
|
|
"table": "public.execution_annotation_tags",
|
|
"columns": [
|
|
"tagId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_c1519757391996eb06064f0e7c",
|
|
"def": "CREATE INDEX \"IDX_c1519757391996eb06064f0e7c\" ON public.execution_annotation_tags USING btree (\"annotationId\")",
|
|
"table": "public.execution_annotation_tags",
|
|
"columns": [
|
|
"annotationId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "execution_annotation_tags_annotationId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"annotationId\"",
|
|
"table": "public.execution_annotation_tags",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"annotationId"
|
|
]
|
|
},
|
|
{
|
|
"name": "execution_annotation_tags_tagId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"tagId\"",
|
|
"table": "public.execution_annotation_tags",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tagId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_c1519757391996eb06064f0e7c8",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"annotationId\") REFERENCES execution_annotations(id) ON DELETE CASCADE",
|
|
"table": "public.execution_annotation_tags",
|
|
"referenced_table": "public.execution_annotations",
|
|
"columns": [
|
|
"annotationId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a3697779b366e131b2bbdae2976",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"tagId\") REFERENCES annotation_tag_entity(id) ON DELETE CASCADE",
|
|
"table": "public.execution_annotation_tags",
|
|
"referenced_table": "public.annotation_tag_entity",
|
|
"columns": [
|
|
"tagId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_979ec03d31294cca484be65d11f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"annotationId\", \"tagId\")",
|
|
"table": "public.execution_annotation_tags",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"annotationId",
|
|
"tagId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.user_api_keys",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "label",
|
|
"type": "varchar(100)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "apiKey",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "scopes",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "audience",
|
|
"type": "varchar",
|
|
"nullable": false,
|
|
"default": "'public-api'::character varying"
|
|
},
|
|
{
|
|
"name": "lastUsedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_978fa5caa3468f463dac9d92e69",
|
|
"def": "CREATE UNIQUE INDEX \"PK_978fa5caa3468f463dac9d92e69\" ON public.user_api_keys USING btree (id)",
|
|
"table": "public.user_api_keys",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_63d7bbae72c767cf162d459fcc",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_63d7bbae72c767cf162d459fcc\" ON public.user_api_keys USING btree (\"userId\", label)",
|
|
"table": "public.user_api_keys",
|
|
"columns": [
|
|
"userId",
|
|
"label"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1ef35bac35d20bdae979d917a3",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_1ef35bac35d20bdae979d917a3\" ON public.user_api_keys USING btree (\"apiKey\")",
|
|
"table": "public.user_api_keys",
|
|
"columns": [
|
|
"apiKey"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "user_api_keys_apiKey_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"apiKey\"",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"apiKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_api_keys_audience_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL audience",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"audience"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_api_keys_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_api_keys_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_api_keys_label_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL label",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"label"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_api_keys_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_api_keys_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e131705cbbc8fb589889b02d457",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_978fa5caa3468f463dac9d92e69",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.user_api_keys",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.processed_data",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "context",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "text",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_ca04b9d8dc72de268fe07a65773",
|
|
"def": "CREATE UNIQUE INDEX \"PK_ca04b9d8dc72de268fe07a65773\" ON public.processed_data USING btree (\"workflowId\", context)",
|
|
"table": "public.processed_data",
|
|
"columns": [
|
|
"workflowId",
|
|
"context"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "processed_data_context_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL context",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"context"
|
|
]
|
|
},
|
|
{
|
|
"name": "processed_data_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "processed_data_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "processed_data_value_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL value",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "processed_data_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_06a69a7032c97a763c2c7599464",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_ca04b9d8dc72de268fe07a65773",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"workflowId\", context)",
|
|
"table": "public.processed_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId",
|
|
"context"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.folder",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "parentFolderId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_6278a41a706740c94c02e288df8",
|
|
"def": "CREATE UNIQUE INDEX \"PK_6278a41a706740c94c02e288df8\" ON public.folder USING btree (id)",
|
|
"table": "public.folder",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_14f68deffaf858465715995508",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_14f68deffaf858465715995508\" ON public.folder USING btree (\"projectId\", id)",
|
|
"table": "public.folder",
|
|
"columns": [
|
|
"projectId",
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "folder_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.folder",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "folder_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.folder",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "folder_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.folder",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "folder_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.folder",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "folder_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.folder",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a8260b0b36939c6247f385b8221",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.folder",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_804ea52f6729e3940498bd54d78",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"parentFolderId\") REFERENCES folder(id) ON DELETE CASCADE",
|
|
"table": "public.folder",
|
|
"referenced_table": "public.folder",
|
|
"columns": [
|
|
"parentFolderId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_6278a41a706740c94c02e288df8",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.folder",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.folder_tag",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "folderId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "tagId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_27e4e00852f6b06a925a4d83a3e",
|
|
"def": "CREATE UNIQUE INDEX \"PK_27e4e00852f6b06a925a4d83a3e\" ON public.folder_tag USING btree (\"folderId\", \"tagId\")",
|
|
"table": "public.folder_tag",
|
|
"columns": [
|
|
"folderId",
|
|
"tagId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "folder_tag_folderId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"folderId\"",
|
|
"table": "public.folder_tag",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"folderId"
|
|
]
|
|
},
|
|
{
|
|
"name": "folder_tag_tagId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"tagId\"",
|
|
"table": "public.folder_tag",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tagId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_dc88164176283de80af47621746",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"tagId\") REFERENCES tag_entity(id) ON DELETE CASCADE",
|
|
"table": "public.folder_tag",
|
|
"referenced_table": "public.tag_entity",
|
|
"columns": [
|
|
"tagId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_94a60854e06f2897b2e0d39edba",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"folderId\") REFERENCES folder(id) ON DELETE CASCADE",
|
|
"table": "public.folder_tag",
|
|
"referenced_table": "public.folder",
|
|
"columns": [
|
|
"folderId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_27e4e00852f6b06a925a4d83a3e",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"folderId\", \"tagId\")",
|
|
"table": "public.folder_tag",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"folderId",
|
|
"tagId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.insights_metadata",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "metaId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "workflowName",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectName",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_f448a94c35218b6208ce20cf5a1",
|
|
"def": "CREATE UNIQUE INDEX \"PK_f448a94c35218b6208ce20cf5a1\" ON public.insights_metadata USING btree (\"metaId\")",
|
|
"table": "public.insights_metadata",
|
|
"columns": [
|
|
"metaId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1d8ab99d5861c9388d2dc1cf73",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_1d8ab99d5861c9388d2dc1cf73\" ON public.insights_metadata USING btree (\"workflowId\")",
|
|
"table": "public.insights_metadata",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "insights_metadata_metaId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"metaId\"",
|
|
"table": "public.insights_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"metaId"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_metadata_projectName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectName\"",
|
|
"table": "public.insights_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectName"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_metadata_workflowName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowName\"",
|
|
"table": "public.insights_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowName"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1d8ab99d5861c9388d2dc1cf733",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE SET NULL",
|
|
"table": "public.insights_metadata",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_2375a1eda085adb16b24615b69c",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE SET NULL",
|
|
"table": "public.insights_metadata",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_f448a94c35218b6208ce20cf5a1",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"metaId\")",
|
|
"table": "public.insights_metadata",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"metaId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.insights_raw",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "metaId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "0: time_saved_minutes, 1: runtime_milliseconds, 2: success, 3: failure"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "bigint",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "timestamp",
|
|
"type": "timestamp(0) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_ec15125755151e3a7e00e00014f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_ec15125755151e3a7e00e00014f\" ON public.insights_raw USING btree (id)",
|
|
"table": "public.insights_raw",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_insights_raw_timestamp_id",
|
|
"def": "CREATE INDEX \"IDX_insights_raw_timestamp_id\" ON public.insights_raw USING btree (\"timestamp\", id)",
|
|
"table": "public.insights_raw",
|
|
"columns": [
|
|
"timestamp",
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "insights_raw_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_raw_metaId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"metaId\"",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"metaId"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_raw_timestamp_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"timestamp\"",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"timestamp"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_raw_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_raw_value_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL value",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6e2e33741adef2a7c5d66befa4e",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"metaId\") REFERENCES insights_metadata(\"metaId\") ON DELETE CASCADE",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "public.insights_metadata",
|
|
"columns": [
|
|
"metaId"
|
|
],
|
|
"referenced_columns": [
|
|
"metaId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_ec15125755151e3a7e00e00014f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.insights_raw",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.insights_by_period",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "metaId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "0: time_saved_minutes, 1: runtime_milliseconds, 2: success, 3: failure"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "bigint",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "periodUnit",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "0: hour, 1: day, 2: week"
|
|
},
|
|
{
|
|
"name": "periodStart",
|
|
"type": "timestamp(0) with time zone",
|
|
"nullable": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_b606942249b90cc39b0265f0575",
|
|
"def": "CREATE UNIQUE INDEX \"PK_b606942249b90cc39b0265f0575\" ON public.insights_by_period USING btree (id)",
|
|
"table": "public.insights_by_period",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_60b6a84299eeb3f671dfec7693",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_60b6a84299eeb3f671dfec7693\" ON public.insights_by_period USING btree (\"periodStart\", type, \"periodUnit\", \"metaId\")",
|
|
"table": "public.insights_by_period",
|
|
"columns": [
|
|
"periodStart",
|
|
"type",
|
|
"periodUnit",
|
|
"metaId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "insights_by_period_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_by_period_metaId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"metaId\"",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"metaId"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_by_period_periodUnit_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"periodUnit\"",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"periodUnit"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_by_period_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "insights_by_period_value_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL value",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6414cfed98daabbfdd61a1cfbc0",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"metaId\") REFERENCES insights_metadata(\"metaId\") ON DELETE CASCADE",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "public.insights_metadata",
|
|
"columns": [
|
|
"metaId"
|
|
],
|
|
"referenced_columns": [
|
|
"metaId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_b606942249b90cc39b0265f0575",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.insights_by_period",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.test_run",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "errorCode",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "errorDetails",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "runAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "completedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "metrics",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "runningInstanceId",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "cancelRequested",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "workflowVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "evaluationConfigId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "evaluationConfigSnapshot",
|
|
"type": "jsonb",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "collectionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_011c050f566e9db509a0fadb9b9",
|
|
"def": "CREATE UNIQUE INDEX \"PK_011c050f566e9db509a0fadb9b9\" ON public.test_run USING btree (id)",
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_d6870d3b6e4c185d33926f423c",
|
|
"def": "CREATE INDEX \"IDX_d6870d3b6e4c185d33926f423c\" ON public.test_run USING btree (\"workflowId\")",
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_test_run_evaluationConfigId",
|
|
"def": "CREATE INDEX \"IDX_test_run_evaluationConfigId\" ON public.test_run USING btree (\"evaluationConfigId\")",
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_test_run_collectionId",
|
|
"def": "CREATE INDEX \"IDX_test_run_collectionId\" ON public.test_run USING btree (\"collectionId\")",
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"collectionId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "test_run_cancelRequested_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"cancelRequested\"",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"cancelRequested"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_run_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_run_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_run_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_run_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_run_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_d6870d3b6e4c185d33926f423c8",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.test_run",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_011c050f566e9db509a0fadb9b9",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.test_run",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_test_run_evaluation_config_id",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"evaluationConfigId\") REFERENCES evaluation_config(id) ON DELETE SET NULL",
|
|
"table": "public.test_run",
|
|
"referenced_table": "public.evaluation_config",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_test_run_collection_id",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"collectionId\") REFERENCES evaluation_collection(id) ON DELETE SET NULL",
|
|
"table": "public.test_run",
|
|
"referenced_table": "public.evaluation_collection",
|
|
"columns": [
|
|
"collectionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.test_case_execution",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "testRunId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "executionId",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "runAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "completedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "errorCode",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "errorDetails",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "metrics",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "inputs",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "outputs",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "runIndex",
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_90c121f77a78a6580e94b794bce",
|
|
"def": "CREATE UNIQUE INDEX \"PK_90c121f77a78a6580e94b794bce\" ON public.test_case_execution USING btree (id)",
|
|
"table": "public.test_case_execution",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_8e4b4774db42f1e6dda3452b2a",
|
|
"def": "CREATE INDEX \"IDX_8e4b4774db42f1e6dda3452b2a\" ON public.test_case_execution USING btree (\"testRunId\")",
|
|
"table": "public.test_case_execution",
|
|
"columns": [
|
|
"testRunId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "test_case_execution_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_case_execution_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_case_execution_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_case_execution_testRunId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"testRunId\"",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"testRunId"
|
|
]
|
|
},
|
|
{
|
|
"name": "test_case_execution_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e48965fac35d0f5b9e7f51d8c44",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE SET NULL",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "public.execution_entity",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_8e4b4774db42f1e6dda3452b2af",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"testRunId\") REFERENCES test_run(id) ON DELETE CASCADE",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "public.test_run",
|
|
"columns": [
|
|
"testRunId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_90c121f77a78a6580e94b794bce",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.test_case_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.scope",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "slug",
|
|
"type": "varchar(128)",
|
|
"nullable": false,
|
|
"comment": "Unique identifier of the scope for example: \"project:create\""
|
|
},
|
|
{
|
|
"name": "displayName",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Name used to display in the UI"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Text describing the scope in more detail of users"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_bfc45df0481abd7f355d6187da1",
|
|
"def": "CREATE UNIQUE INDEX \"PK_bfc45df0481abd7f355d6187da1\" ON public.scope USING btree (slug)",
|
|
"table": "public.scope",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "scope_slug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL slug",
|
|
"table": "public.scope",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_bfc45df0481abd7f355d6187da1",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (slug)",
|
|
"table": "public.scope",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.role",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "slug",
|
|
"type": "varchar(128)",
|
|
"nullable": false,
|
|
"comment": "Unique identifier of the role for example: \"global:owner\""
|
|
},
|
|
{
|
|
"name": "displayName",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Name used to display in the UI"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Text describing the scope in more detail of users"
|
|
},
|
|
{
|
|
"name": "roleType",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Type of the role, e.g., global, project, or workflow"
|
|
},
|
|
{
|
|
"name": "systemRole",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false",
|
|
"comment": "Indicates if the role is managed by the system and cannot be edited"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_35c9b140caaf6da09cfabb0d675",
|
|
"def": "CREATE UNIQUE INDEX \"PK_35c9b140caaf6da09cfabb0d675\" ON public.role USING btree (slug)",
|
|
"table": "public.role",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_UniqueRoleDisplayName",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_UniqueRoleDisplayName\" ON public.role USING btree (\"displayName\")",
|
|
"table": "public.role",
|
|
"columns": [
|
|
"displayName"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "role_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.role",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_slug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL slug",
|
|
"table": "public.role",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_systemRole_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"systemRole\"",
|
|
"table": "public.role",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"systemRole"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.role",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_35c9b140caaf6da09cfabb0d675",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (slug)",
|
|
"table": "public.role",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.role_scope",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "roleSlug",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "scopeSlug",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_role_scope",
|
|
"def": "CREATE UNIQUE INDEX \"PK_role_scope\" ON public.role_scope USING btree (\"roleSlug\", \"scopeSlug\")",
|
|
"table": "public.role_scope",
|
|
"columns": [
|
|
"roleSlug",
|
|
"scopeSlug"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_role_scope_scopeSlug",
|
|
"def": "CREATE INDEX \"IDX_role_scope_scopeSlug\" ON public.role_scope USING btree (\"scopeSlug\")",
|
|
"table": "public.role_scope",
|
|
"columns": [
|
|
"scopeSlug"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "role_scope_roleSlug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"roleSlug\"",
|
|
"table": "public.role_scope",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"roleSlug"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_scope_scopeSlug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"scopeSlug\"",
|
|
"table": "public.role_scope",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"scopeSlug"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_scope",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"scopeSlug\") REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE",
|
|
"table": "public.role_scope",
|
|
"referenced_table": "public.scope",
|
|
"columns": [
|
|
"scopeSlug"
|
|
],
|
|
"referenced_columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_role",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"roleSlug\") REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE",
|
|
"table": "public.role_scope",
|
|
"referenced_table": "public.role",
|
|
"columns": [
|
|
"roleSlug"
|
|
],
|
|
"referenced_columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_role_scope",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"roleSlug\", \"scopeSlug\")",
|
|
"table": "public.role_scope",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"roleSlug",
|
|
"scopeSlug"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.data_table",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_e226d0001b9e6097cbfe70617cb",
|
|
"def": "CREATE UNIQUE INDEX \"PK_e226d0001b9e6097cbfe70617cb\" ON public.data_table USING btree (id)",
|
|
"table": "public.data_table",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_b23096ef747281ac944d28e8b0d",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_b23096ef747281ac944d28e8b0d\" ON public.data_table USING btree (\"projectId\", name)",
|
|
"table": "public.data_table",
|
|
"columns": [
|
|
"projectId",
|
|
"name"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "data_table_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_c2a794257dee48af7c9abf681de",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.data_table",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_e226d0001b9e6097cbfe70617cb",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_b23096ef747281ac944d28e8b0d",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (\"projectId\", name)",
|
|
"table": "public.data_table",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId",
|
|
"name"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.data_table_column",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(32)",
|
|
"nullable": false,
|
|
"comment": "Expected: string, number, boolean, or date (not enforced as a constraint)"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "Column order, starting from 0 (0 = first column)"
|
|
},
|
|
{
|
|
"name": "dataTableId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_673cb121ee4a8a5e27850c72c51",
|
|
"def": "CREATE UNIQUE INDEX \"PK_673cb121ee4a8a5e27850c72c51\" ON public.data_table_column USING btree (id)",
|
|
"table": "public.data_table_column",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_8082ec4890f892f0bc77473a123",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_8082ec4890f892f0bc77473a123\" ON public.data_table_column USING btree (\"dataTableId\", name)",
|
|
"table": "public.data_table_column",
|
|
"columns": [
|
|
"dataTableId",
|
|
"name"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "data_table_column_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_column_dataTableId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"dataTableId\"",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"dataTableId"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_column_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_column_index_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL index",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"index"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_column_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_column_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "data_table_column_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_930b6e8faaf88294cef23484160",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"dataTableId\") REFERENCES data_table(id) ON DELETE CASCADE",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "public.data_table",
|
|
"columns": [
|
|
"dataTableId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_673cb121ee4a8a5e27850c72c51",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_8082ec4890f892f0bc77473a123",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (\"dataTableId\", name)",
|
|
"table": "public.data_table_column",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"dataTableId",
|
|
"name"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.chat_hub_sessions",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "varchar(256)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "ownerId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "lastMessageAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "credentialId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"type": "varchar(16)",
|
|
"nullable": true,
|
|
"comment": "ChatHubProvider enum: \"openai\", \"anthropic\", \"google\", \"n8n\""
|
|
},
|
|
{
|
|
"name": "model",
|
|
"type": "varchar(256)",
|
|
"nullable": true,
|
|
"comment": "Model name used at the respective Model node, ie. \"gpt-4\""
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "uuid",
|
|
"nullable": true,
|
|
"comment": "ID of the custom agent (if provider is \"custom-agent\")"
|
|
},
|
|
{
|
|
"name": "agentName",
|
|
"type": "varchar(128)",
|
|
"nullable": true,
|
|
"comment": "Cached name of the custom agent (if provider is \"custom-agent\")"
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"default": "'production'::character varying"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_1eafef1273c70e4464fec703412",
|
|
"def": "CREATE UNIQUE INDEX \"PK_1eafef1273c70e4464fec703412\" ON public.chat_hub_sessions USING btree (id)",
|
|
"table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_chat_hub_sessions_owner_lastmsg_id",
|
|
"def": "CREATE INDEX \"IDX_chat_hub_sessions_owner_lastmsg_id\" ON public.chat_hub_sessions USING btree (\"ownerId\", \"lastMessageAt\" DESC, id)",
|
|
"table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"ownerId",
|
|
"lastMessageAt",
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_chat_hub_sessions_type",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((type)::text = ANY ((ARRAY['production'::character varying, 'manual'::character varying])::text[])))",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_lastMessageAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastMessageAt\"",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastMessageAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_ownerId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"ownerId\"",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"ownerId"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_title_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL title",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"title"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_sessions_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e9ecf8ede7d989fcd18790fe36a",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"ownerId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"ownerId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_9f9293d9f552496c40e0d1a8f80",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_7bc13b4c7e6afbfaf9be326c189",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_1eafef1273c70e4464fec703412",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_chat_hub_sessions_agentId",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES chat_hub_agents(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_sessions",
|
|
"referenced_table": "public.chat_hub_agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.chat_hub_messages",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "sessionId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "previousMessageId",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "revisionOfMessageId",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "retryOfMessageId",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"comment": "ChatHubMessageType enum: \"human\", \"ai\", \"system\", \"tool\", \"generic\""
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "content",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"type": "varchar(16)",
|
|
"nullable": true,
|
|
"comment": "ChatHubProvider enum: \"openai\", \"anthropic\", \"google\", \"n8n\""
|
|
},
|
|
{
|
|
"name": "model",
|
|
"type": "varchar(256)",
|
|
"nullable": true,
|
|
"comment": "Model name used at the respective Model node, ie. \"gpt-4\""
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "executionId",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "uuid",
|
|
"nullable": true,
|
|
"comment": "ID of the custom agent (if provider is \"custom-agent\")"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"default": "'success'::character varying",
|
|
"comment": "ChatHubMessageStatus enum, eg. \"success\", \"error\", \"running\", \"cancelled\""
|
|
},
|
|
{
|
|
"name": "attachments",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "File attachments for the message (if any), stored as JSON. Files are stored as base64-encoded data URLs."
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_7704a5add6baed43eef835f0bfb",
|
|
"def": "CREATE UNIQUE INDEX \"PK_7704a5add6baed43eef835f0bfb\" ON public.chat_hub_messages USING btree (id)",
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_chat_hub_messages_sessionId",
|
|
"def": "CREATE INDEX \"IDX_chat_hub_messages_sessionId\" ON public.chat_hub_messages USING btree (\"sessionId\")",
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"sessionId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "chat_hub_messages_content_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL content",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"content"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_sessionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"sessionId\"",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sessionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_messages_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6afb260449dd7a9b85355d4e0c9",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.execution_entity",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_acf8926098f063cdbbad8497fd1",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e22538eb50a71a17954cd7e076c",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"sessionId\") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"sessionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1f4998c8a7dec9e00a9ab15550e",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"revisionOfMessageId\") REFERENCES chat_hub_messages(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"revisionOfMessageId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_25c9736e7f769f3a005eef4b372",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"retryOfMessageId\") REFERENCES chat_hub_messages(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"retryOfMessageId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e5d1fa722c5a8d38ac204746662",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"previousMessageId\") REFERENCES chat_hub_messages(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"previousMessageId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_7704a5add6baed43eef835f0bfb",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_chat_hub_messages_agentId",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES chat_hub_agents(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_messages",
|
|
"referenced_table": "public.chat_hub_agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.chat_hub_agents",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(256)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "varchar(512)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "systemPrompt",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "ownerId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "credentialId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "provider",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"comment": "ChatHubProvider enum: \"openai\", \"anthropic\", \"google\", \"n8n\""
|
|
},
|
|
{
|
|
"name": "model",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Model name used at the respective Model node, ie. \"gpt-4\""
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "icon",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "files",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
},
|
|
{
|
|
"name": "suggestedPrompts",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_f39a3b36bbdf0e2979ddb21cf78",
|
|
"def": "CREATE UNIQUE INDEX \"PK_f39a3b36bbdf0e2979ddb21cf78\" ON public.chat_hub_agents USING btree (id)",
|
|
"table": "public.chat_hub_agents",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "chat_hub_agents_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_files_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL files",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"files"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_model_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL model",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"model"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_ownerId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"ownerId\"",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"ownerId"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_provider_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL provider",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"provider"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_suggestedPrompts_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"suggestedPrompts\"",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"suggestedPrompts"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_systemPrompt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"systemPrompt\"",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"systemPrompt"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agents_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_441ba2caba11e077ce3fbfa2cd8",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"ownerId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"ownerId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_9c61ad497dcbae499c96a6a78ba",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE SET NULL",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_f39a3b36bbdf0e2979ddb21cf78",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.chat_hub_agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.oauth_clients",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "redirectUris",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "grantTypes",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "clientSecret",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "clientSecretExpiresAt",
|
|
"type": "bigint",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "tokenEndpointAuthMethod",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"default": "'none'::character varying",
|
|
"comment": "Possible values: none, client_secret_basic or client_secret_post"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_c4759172d3431bae6f04e678e0d",
|
|
"def": "CREATE UNIQUE INDEX \"PK_c4759172d3431bae6f04e678e0d\" ON public.oauth_clients USING btree (id)",
|
|
"table": "public.oauth_clients",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "oauth_clients_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_clients_grantTypes_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"grantTypes\"",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"grantTypes"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_clients_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_clients_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_clients_redirectUris_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"redirectUris\"",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"redirectUris"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_clients_tokenEndpointAuthMethod_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"tokenEndpointAuthMethod\"",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tokenEndpointAuthMethod"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_clients_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_c4759172d3431bae6f04e678e0d",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.oauth_clients",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.oauth_authorization_codes",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "code",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "clientId",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "redirectUri",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "codeChallenge",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "codeChallengeMethod",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "expiresAt",
|
|
"type": "bigint",
|
|
"nullable": false,
|
|
"comment": "Unix timestamp in milliseconds"
|
|
},
|
|
{
|
|
"name": "state",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "used",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "resource",
|
|
"type": "varchar",
|
|
"nullable": true,
|
|
"comment": "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."
|
|
},
|
|
{
|
|
"name": "scope",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[\"tool:listWorkflows\",\"tool:getWorkflowDetails\"]'::json",
|
|
"comment": "OAuth scopes granted for this authorization code"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_fb91ab932cfbd694061501cc20f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_fb91ab932cfbd694061501cc20f\" ON public.oauth_authorization_codes USING btree (code)",
|
|
"table": "public.oauth_authorization_codes",
|
|
"columns": [
|
|
"code"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "oauth_authorization_codes_clientId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"clientId\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"clientId"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_codeChallengeMethod_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"codeChallengeMethod\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"codeChallengeMethod"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_codeChallenge_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"codeChallenge\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"codeChallenge"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_code_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL code",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"code"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_expiresAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"expiresAt\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expiresAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_redirectUri_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"redirectUri\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"redirectUri"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_scope_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL scope",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"scope"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_used_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL used",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"used"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_authorization_codes_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_aa8d3560484944c19bdf79ffa16",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_64d965bd072ea24fb6da55468cd",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "public.oauth_clients",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_fb91ab932cfbd694061501cc20f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (code)",
|
|
"table": "public.oauth_authorization_codes",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"code"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.oauth_access_tokens",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "token",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "clientId",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_dcd71f96a5d5f4bf79e67d322bf",
|
|
"def": "CREATE UNIQUE INDEX \"PK_dcd71f96a5d5f4bf79e67d322bf\" ON public.oauth_access_tokens USING btree (token)",
|
|
"table": "public.oauth_access_tokens",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "oauth_access_tokens_clientId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"clientId\"",
|
|
"table": "public.oauth_access_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"clientId"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_access_tokens_token_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL token",
|
|
"table": "public.oauth_access_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_access_tokens_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.oauth_access_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_7234a36d8e49a1fa85095328845",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_access_tokens",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_78b26968132b7e5e45b75876481",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_access_tokens",
|
|
"referenced_table": "public.oauth_clients",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_dcd71f96a5d5f4bf79e67d322bf",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (token)",
|
|
"table": "public.oauth_access_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.oauth_refresh_tokens",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "token",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "clientId",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "expiresAt",
|
|
"type": "bigint",
|
|
"nullable": false,
|
|
"comment": "Unix timestamp in milliseconds"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "scope",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[\"tool:listWorkflows\",\"tool:getWorkflowDetails\"]'::json",
|
|
"comment": "OAuth scopes granted for this refresh token"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_74abaed0b30711b6532598b0392",
|
|
"def": "CREATE UNIQUE INDEX \"PK_74abaed0b30711b6532598b0392\" ON public.oauth_refresh_tokens USING btree (token)",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "oauth_refresh_tokens_clientId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"clientId\"",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"clientId"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_refresh_tokens_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_refresh_tokens_expiresAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"expiresAt\"",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expiresAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_refresh_tokens_scope_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL scope",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"scope"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_refresh_tokens_token_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL token",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_refresh_tokens_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_refresh_tokens_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a699f3ed9fd0c1b19bc2608ac53",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_b388696ce4d8be7ffbe8d3e4b69",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "public.oauth_clients",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_74abaed0b30711b6532598b0392",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (token)",
|
|
"table": "public.oauth_refresh_tokens",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"token"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.oauth_user_consents",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "clientId",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "grantedAt",
|
|
"type": "bigint",
|
|
"nullable": false,
|
|
"comment": "Unix timestamp in milliseconds"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_85b9ada746802c8993103470f05",
|
|
"def": "CREATE UNIQUE INDEX \"PK_85b9ada746802c8993103470f05\" ON public.oauth_user_consents USING btree (id)",
|
|
"table": "public.oauth_user_consents",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_083721d99ce8db4033e2958ebb4",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_083721d99ce8db4033e2958ebb4\" ON public.oauth_user_consents USING btree (\"userId\", \"clientId\")",
|
|
"table": "public.oauth_user_consents",
|
|
"columns": [
|
|
"userId",
|
|
"clientId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "oauth_user_consents_clientId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"clientId\"",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"clientId"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_user_consents_grantedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"grantedAt\"",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"grantedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_user_consents_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "oauth_user_consents_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_21e6c3c2d78a097478fae6aaefa",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a651acea2f6c97f8c4514935486",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "public.oauth_clients",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_85b9ada746802c8993103470f05",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_083721d99ce8db4033e2958ebb4",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (\"userId\", \"clientId\")",
|
|
"table": "public.oauth_user_consents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId",
|
|
"clientId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_dependency",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowVersionId",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "Version of the workflow"
|
|
},
|
|
{
|
|
"name": "dependencyType",
|
|
"type": "varchar(32)",
|
|
"nullable": false,
|
|
"comment": "Type of dependency: \"credential\", \"nodeType\", \"webhookPath\", or \"workflowCall\""
|
|
},
|
|
{
|
|
"name": "dependencyKey",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "ID or name of the dependency"
|
|
},
|
|
{
|
|
"name": "dependencyInfo",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Additional info about the dependency, interpreted based on type"
|
|
},
|
|
{
|
|
"name": "indexVersionId",
|
|
"type": "smallint",
|
|
"nullable": false,
|
|
"default": "1",
|
|
"comment": "Version of the index structure"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "publishedVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_52325e34cd7a2f0f67b0f3cad65",
|
|
"def": "CREATE UNIQUE INDEX \"PK_52325e34cd7a2f0f67b0f3cad65\" ON public.workflow_dependency USING btree (id)",
|
|
"table": "public.workflow_dependency",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a4ff2d9b9628ea988fa9e7d0bf",
|
|
"def": "CREATE INDEX \"IDX_a4ff2d9b9628ea988fa9e7d0bf\" ON public.workflow_dependency USING btree (\"workflowId\")",
|
|
"table": "public.workflow_dependency",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_e7fe1cfda990c14a445937d0b9",
|
|
"def": "CREATE INDEX \"IDX_e7fe1cfda990c14a445937d0b9\" ON public.workflow_dependency USING btree (\"dependencyType\")",
|
|
"table": "public.workflow_dependency",
|
|
"columns": [
|
|
"dependencyType"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_e48a201071ab85d9d09119d640",
|
|
"def": "CREATE INDEX \"IDX_e48a201071ab85d9d09119d640\" ON public.workflow_dependency USING btree (\"dependencyKey\")",
|
|
"table": "public.workflow_dependency",
|
|
"columns": [
|
|
"dependencyKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_workflow_dependency_publishedVersionId",
|
|
"def": "CREATE INDEX \"IDX_workflow_dependency_publishedVersionId\" ON public.workflow_dependency USING btree (\"publishedVersionId\")",
|
|
"table": "public.workflow_dependency",
|
|
"columns": [
|
|
"publishedVersionId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflow_dependency_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_dependency_dependencyKey_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"dependencyKey\"",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"dependencyKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_dependency_dependencyType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"dependencyType\"",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"dependencyType"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_dependency_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_dependency_indexVersionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"indexVersionId\"",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"indexVersionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_dependency_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_dependency_workflowVersionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowVersionId\"",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowVersionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a4ff2d9b9628ea988fa9e7d0bf8",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_52325e34cd7a2f0f67b0f3cad65",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.workflow_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.binary_data",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "fileId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "sourceType",
|
|
"type": "varchar(50)",
|
|
"nullable": false,
|
|
"comment": "Source the file belongs to, e.g. 'execution'"
|
|
},
|
|
{
|
|
"name": "sourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "ID of the source, e.g. execution ID"
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "bytea",
|
|
"nullable": false,
|
|
"comment": "Raw, not base64 encoded"
|
|
},
|
|
{
|
|
"name": "mimeType",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "fileName",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "fileSize",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "In bytes"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_fc3691585b39408bb0551122af6",
|
|
"def": "CREATE UNIQUE INDEX \"PK_fc3691585b39408bb0551122af6\" ON public.binary_data USING btree (\"fileId\")",
|
|
"table": "public.binary_data",
|
|
"columns": [
|
|
"fileId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_56900edc3cfd16612e2ef2c6a8",
|
|
"def": "CREATE INDEX \"IDX_56900edc3cfd16612e2ef2c6a8\" ON public.binary_data USING btree (\"sourceType\", \"sourceId\")",
|
|
"table": "public.binary_data",
|
|
"columns": [
|
|
"sourceType",
|
|
"sourceId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_binary_data_sourceType",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((\"sourceType\")::text = ANY ((ARRAY['execution'::character varying, 'chat_message_attachment'::character varying, 'agent_file'::character varying])::text[])))",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sourceType"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_fileId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"fileId\"",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"fileId"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_fileSize_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"fileSize\"",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"fileSize"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_sourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"sourceId\"",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_sourceType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"sourceType\"",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sourceType"
|
|
]
|
|
},
|
|
{
|
|
"name": "binary_data_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_fc3691585b39408bb0551122af6",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"fileId\")",
|
|
"table": "public.binary_data",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"fileId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_publish_history",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "versionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "event",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Type of history record: activated (workflow is now active), deactivated (workflow is now inactive)"
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_c788f7caf88e91e365c97d6d04a",
|
|
"def": "CREATE UNIQUE INDEX \"PK_c788f7caf88e91e365c97d6d04a\" ON public.workflow_publish_history USING btree (id)",
|
|
"table": "public.workflow_publish_history",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_070b5de842ece9ccdda0d9738b",
|
|
"def": "CREATE INDEX \"IDX_070b5de842ece9ccdda0d9738b\" ON public.workflow_publish_history USING btree (\"workflowId\", \"versionId\")",
|
|
"table": "public.workflow_publish_history",
|
|
"columns": [
|
|
"workflowId",
|
|
"versionId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_workflow_publish_history_event",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((event)::text = ANY ((ARRAY['activated'::character varying, 'deactivated'::character varying])::text[])))",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"event"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publish_history_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publish_history_event_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL event",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"event"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publish_history_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publish_history_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6eab5bd9eedabe9c54bd879fc40",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE SET NULL",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_c01316f8c2d7101ec4fa9809267",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_b4cfbc7556d07f36ca177f5e473",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"versionId\") REFERENCES workflow_history(\"versionId\") ON DELETE SET NULL",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "public.workflow_history",
|
|
"columns": [
|
|
"versionId"
|
|
],
|
|
"referenced_columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_c788f7caf88e91e365c97d6d04a",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.workflow_publish_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.dynamic_credential_resolver",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"comment": "Encrypted resolver configuration (JSON encrypted as string)"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_b76cfb088dcdaf5275e9980bb64",
|
|
"def": "CREATE UNIQUE INDEX \"PK_b76cfb088dcdaf5275e9980bb64\" ON public.dynamic_credential_resolver USING btree (id)",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_9c9ee9df586e60bb723234e499",
|
|
"def": "CREATE INDEX \"IDX_9c9ee9df586e60bb723234e499\" ON public.dynamic_credential_resolver USING btree (type)",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "dynamic_credential_resolver_config_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL config",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"config"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_resolver_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_resolver_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_resolver_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_resolver_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_resolver_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_b76cfb088dcdaf5275e9980bb64",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.dynamic_credential_resolver",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.dynamic_credential_user_entry",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "credentialId",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resolverId",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_74f548e633abc66dc27c8f0ca77",
|
|
"def": "CREATE UNIQUE INDEX \"PK_74f548e633abc66dc27c8f0ca77\" ON public.dynamic_credential_user_entry USING btree (\"credentialId\", \"userId\", \"resolverId\")",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"columns": [
|
|
"credentialId",
|
|
"userId",
|
|
"resolverId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a36dc616fabc3f736bb82410a2",
|
|
"def": "CREATE INDEX \"IDX_a36dc616fabc3f736bb82410a2\" ON public.dynamic_credential_user_entry USING btree (\"userId\")",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_6edec973a6450990977bb854c3",
|
|
"def": "CREATE INDEX \"IDX_6edec973a6450990977bb854c3\" ON public.dynamic_credential_user_entry USING btree (\"resolverId\")",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"columns": [
|
|
"resolverId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "dynamic_credential_user_entry_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_user_entry_credentialId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"credentialId\"",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialId"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_user_entry_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_user_entry_resolverId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resolverId\"",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resolverId"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_user_entry_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "dynamic_credential_user_entry_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a36dc616fabc3f736bb82410a22",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_945ba70b342a066d1306b12ccd2",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE CASCADE",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6edec973a6450990977bb854c38",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"resolverId\") REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "public.dynamic_credential_resolver",
|
|
"columns": [
|
|
"resolverId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_74f548e633abc66dc27c8f0ca77",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"credentialId\", \"userId\", \"resolverId\")",
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialId",
|
|
"userId",
|
|
"resolverId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.secrets_provider_connection",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "providerKey",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Type of secrets provider. Possible values: awsSecretsManager, gcpSecretsManager, vault, azureKeyVault, infisical"
|
|
},
|
|
{
|
|
"name": "encryptedSettings",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "isEnabled",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_4350ae85e76f9ba7df1370acb5d",
|
|
"def": "CREATE UNIQUE INDEX \"PK_4350ae85e76f9ba7df1370acb5d\" ON public.secrets_provider_connection USING btree (id)",
|
|
"table": "public.secrets_provider_connection",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_secrets_provider_connection_providerKey",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_secrets_provider_connection_providerKey\" ON public.secrets_provider_connection USING btree (\"providerKey\")",
|
|
"table": "public.secrets_provider_connection",
|
|
"columns": [
|
|
"providerKey"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "secrets_provider_connection_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "secrets_provider_connection_encryptedSettings_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"encryptedSettings\"",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"encryptedSettings"
|
|
]
|
|
},
|
|
{
|
|
"name": "secrets_provider_connection_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "secrets_provider_connection_isEnabled_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isEnabled\"",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isEnabled"
|
|
]
|
|
},
|
|
{
|
|
"name": "secrets_provider_connection_providerKey_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"providerKey\"",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"providerKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "secrets_provider_connection_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "secrets_provider_connection_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_4350ae85e76f9ba7df1370acb5d",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.secrets_provider_connection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.project_secrets_provider_access",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "secretsProviderConnectionId",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "varchar(128)",
|
|
"nullable": false,
|
|
"default": "'secretsProviderConnection:user'::character varying"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_0402b7fcec5415246656f102f83",
|
|
"def": "CREATE UNIQUE INDEX \"PK_0402b7fcec5415246656f102f83\" ON public.project_secrets_provider_access USING btree (\"secretsProviderConnectionId\", \"projectId\")",
|
|
"table": "public.project_secrets_provider_access",
|
|
"columns": [
|
|
"secretsProviderConnectionId",
|
|
"projectId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_project_secrets_provider_access_role",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((role)::text = ANY ((ARRAY['secretsProviderConnection:owner'::character varying, 'secretsProviderConnection:user'::character varying])::text[])))",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_secrets_provider_ac_secretsProviderConnectionI_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"secretsProviderConnectionId\"",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"secretsProviderConnectionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_secrets_provider_access_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_secrets_provider_access_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_secrets_provider_access_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "project_secrets_provider_access_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_bd264b81209355b543878deedb1",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_18e5c27d2524b1638b292904e48",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"secretsProviderConnectionId\") REFERENCES secrets_provider_connection(id) ON DELETE CASCADE",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "public.secrets_provider_connection",
|
|
"columns": [
|
|
"secretsProviderConnectionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_0402b7fcec5415246656f102f83",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"secretsProviderConnectionId\", \"projectId\")",
|
|
"table": "public.project_secrets_provider_access",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"secretsProviderConnectionId",
|
|
"projectId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_published_version",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "publishedVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_5c76fb7ee939fe2530374d3f75a",
|
|
"def": "CREATE UNIQUE INDEX \"PK_5c76fb7ee939fe2530374d3f75a\" ON public.workflow_published_version USING btree (\"workflowId\")",
|
|
"table": "public.workflow_published_version",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflow_published_version_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_published_version_publishedVersionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"publishedVersionId\"",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"publishedVersionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_published_version_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_published_version_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_5c76fb7ee939fe2530374d3f75a",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE RESTRICT",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_df3428a541b802d6a63ac56e330",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"publishedVersionId\") REFERENCES workflow_history(\"versionId\") ON DELETE RESTRICT",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "public.workflow_history",
|
|
"columns": [
|
|
"publishedVersionId"
|
|
],
|
|
"referenced_columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_5c76fb7ee939fe2530374d3f75a",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"workflowId\")",
|
|
"table": "public.workflow_published_version",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.dynamic_credential_entry",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "credential_id",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "subject_id",
|
|
"type": "varchar(2048)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resolver_id",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_5135ffcabecad4727ff6b9b803d",
|
|
"def": "CREATE UNIQUE INDEX \"PK_5135ffcabecad4727ff6b9b803d\" ON public.dynamic_credential_entry USING btree (credential_id, subject_id, resolver_id)",
|
|
"table": "public.dynamic_credential_entry",
|
|
"columns": [
|
|
"credential_id",
|
|
"subject_id",
|
|
"resolver_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_62476b94b56d9dc7ed9ed75d3d",
|
|
"def": "CREATE INDEX \"IDX_62476b94b56d9dc7ed9ed75d3d\" ON public.dynamic_credential_entry USING btree (subject_id)",
|
|
"table": "public.dynamic_credential_entry",
|
|
"columns": [
|
|
"subject_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_d61a12235d268a49af6a3c09c1",
|
|
"def": "CREATE INDEX \"IDX_d61a12235d268a49af6a3c09c1\" ON public.dynamic_credential_entry USING btree (resolver_id)",
|
|
"table": "public.dynamic_credential_entry",
|
|
"columns": [
|
|
"resolver_id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "tmp_dynamic_credential_entry_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_dynamic_credential_entry_credential_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL credential_id",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credential_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_dynamic_credential_entry_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_dynamic_credential_entry_resolver_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL resolver_id",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resolver_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_dynamic_credential_entry_subject_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL subject_id",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"subject_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_dynamic_credential_entry_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a6d1dd080958304a47a02952aab",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credential_id"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_d61a12235d268a49af6a3c09c13",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "public.dynamic_credential_resolver",
|
|
"columns": [
|
|
"resolver_id"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_5135ffcabecad4727ff6b9b803d",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (credential_id, subject_id, resolver_id)",
|
|
"table": "public.dynamic_credential_entry",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credential_id",
|
|
"subject_id",
|
|
"resolver_id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.chat_hub_tools",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "typeVersion",
|
|
"type": "double precision",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "ownerId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "definition",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "true"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_696d26426c704fba79b2c195ef5",
|
|
"def": "CREATE UNIQUE INDEX \"PK_696d26426c704fba79b2c195ef5\" ON public.chat_hub_tools USING btree (id)",
|
|
"table": "public.chat_hub_tools",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_4c72ebdb265d1775bf61147af0",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_4c72ebdb265d1775bf61147af0\" ON public.chat_hub_tools USING btree (\"ownerId\", name)",
|
|
"table": "public.chat_hub_tools",
|
|
"columns": [
|
|
"ownerId",
|
|
"name"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "chat_hub_tools_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_definition_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL definition",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"definition"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_enabled_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL enabled",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"enabled"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_ownerId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"ownerId\"",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"ownerId"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_typeVersion_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"typeVersion\"",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"typeVersion"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_tools_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_b8030b47af9213f1fd15450fb7f",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"ownerId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"ownerId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_696d26426c704fba79b2c195ef5",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.chat_hub_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.chat_hub_session_tools",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "sessionId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "toolId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_87aea76ff4c274c4a5ac838ebe3",
|
|
"def": "CREATE UNIQUE INDEX \"PK_87aea76ff4c274c4a5ac838ebe3\" ON public.chat_hub_session_tools USING btree (\"sessionId\", \"toolId\")",
|
|
"table": "public.chat_hub_session_tools",
|
|
"columns": [
|
|
"sessionId",
|
|
"toolId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "chat_hub_session_tools_sessionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"sessionId\"",
|
|
"table": "public.chat_hub_session_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sessionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_session_tools_toolId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"toolId\"",
|
|
"table": "public.chat_hub_session_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"toolId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e649bf1295f4ed8d4299ed290f9",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"sessionId\") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_session_tools",
|
|
"referenced_table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"sessionId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6596a328affd8d4967ffb303eee",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"toolId\") REFERENCES chat_hub_tools(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_session_tools",
|
|
"referenced_table": "public.chat_hub_tools",
|
|
"columns": [
|
|
"toolId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_87aea76ff4c274c4a5ac838ebe3",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"sessionId\", \"toolId\")",
|
|
"table": "public.chat_hub_session_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sessionId",
|
|
"toolId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.chat_hub_agent_tools",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "toolId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_cc8806fdea48297a7d497035d72",
|
|
"def": "CREATE UNIQUE INDEX \"PK_cc8806fdea48297a7d497035d72\" ON public.chat_hub_agent_tools USING btree (\"agentId\", \"toolId\")",
|
|
"table": "public.chat_hub_agent_tools",
|
|
"columns": [
|
|
"agentId",
|
|
"toolId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "chat_hub_agent_tools_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.chat_hub_agent_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "chat_hub_agent_tools_toolId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"toolId\"",
|
|
"table": "public.chat_hub_agent_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"toolId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_2b53d796b3dbae91b1a9553c048",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES chat_hub_agents(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_agent_tools",
|
|
"referenced_table": "public.chat_hub_agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_43e70f04c53344f82483d0570f6",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"toolId\") REFERENCES chat_hub_tools(id) ON DELETE CASCADE",
|
|
"table": "public.chat_hub_agent_tools",
|
|
"referenced_table": "public.chat_hub_tools",
|
|
"columns": [
|
|
"toolId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_cc8806fdea48297a7d497035d72",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"toolId\")",
|
|
"table": "public.chat_hub_agent_tools",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"toolId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_builder_session",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "messages",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
},
|
|
{
|
|
"name": "previousSummary",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Summary of prior conversation from compaction (/compact or auto-compact)"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "activeVersionCardId",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "resumeAfterRestoreMessageId",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_e69ef0d385986e273423b0e8695",
|
|
"def": "CREATE UNIQUE INDEX \"PK_e69ef0d385986e273423b0e8695\" ON public.workflow_builder_session USING btree (id)",
|
|
"table": "public.workflow_builder_session",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_ec2aa73632932d485a1d5192ce1",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_ec2aa73632932d485a1d5192ce1\" ON public.workflow_builder_session USING btree (\"workflowId\", \"userId\")",
|
|
"table": "public.workflow_builder_session",
|
|
"columns": [
|
|
"workflowId",
|
|
"userId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "workflow_builder_session_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_builder_session_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_builder_session_messages_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL messages",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"messages"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_builder_session_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_builder_session_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_builder_session_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_00290cdeee4d4d7db84709be936",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_7983c618db48f47bf5a4cc1e1e4",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_e69ef0d385986e273423b0e8695",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_ec2aa73632932d485a1d5192ce1",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (\"workflowId\", \"userId\")",
|
|
"table": "public.workflow_builder_session",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId",
|
|
"userId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.role_mapping_rule",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "expression",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Expected values: 'instance' (maps to a global role) or 'project' (maps to a project role; projects linked via role_mapping_rule_project)."
|
|
},
|
|
{
|
|
"name": "order",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_d772c8ec1a89b52d31c882bc560",
|
|
"def": "CREATE UNIQUE INDEX \"PK_d772c8ec1a89b52d31c882bc560\" ON public.role_mapping_rule USING btree (id)",
|
|
"table": "public.role_mapping_rule",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_b33ac896ad3099fc8de36fdc1c4",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_b33ac896ad3099fc8de36fdc1c4\" ON public.role_mapping_rule USING btree (type, \"order\")",
|
|
"table": "public.role_mapping_rule",
|
|
"columns": [
|
|
"type",
|
|
"order"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_bb66e404c35996b0d694617750",
|
|
"def": "CREATE INDEX \"IDX_bb66e404c35996b0d694617750\" ON public.role_mapping_rule USING btree (role)",
|
|
"table": "public.role_mapping_rule",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "role_mapping_rule_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_expression_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL expression",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expression"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_order_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"order\"",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"order"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_bb66e404c35996b0d6946177501",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "public.role",
|
|
"columns": [
|
|
"role"
|
|
],
|
|
"referenced_columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_d772c8ec1a89b52d31c882bc560",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_b33ac896ad3099fc8de36fdc1c4",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (type, \"order\")",
|
|
"table": "public.role_mapping_rule",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type",
|
|
"order"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.role_mapping_rule_project",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "roleMappingRuleId",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_198c5b5aea509d139274efcaf9a",
|
|
"def": "CREATE UNIQUE INDEX \"PK_198c5b5aea509d139274efcaf9a\" ON public.role_mapping_rule_project USING btree (\"roleMappingRuleId\", \"projectId\")",
|
|
"table": "public.role_mapping_rule_project",
|
|
"columns": [
|
|
"roleMappingRuleId",
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_35a78869286c65d9330d02b88f",
|
|
"def": "CREATE INDEX \"IDX_35a78869286c65d9330d02b88f\" ON public.role_mapping_rule_project USING btree (\"projectId\")",
|
|
"table": "public.role_mapping_rule_project",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "role_mapping_rule_project_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.role_mapping_rule_project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "role_mapping_rule_project_roleMappingRuleId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"roleMappingRuleId\"",
|
|
"table": "public.role_mapping_rule_project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"roleMappingRuleId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_35a78869286c65d9330d02b88f5",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.role_mapping_rule_project",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_dd7ce4dfa09e95b36a626bd9de3",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"roleMappingRuleId\") REFERENCES role_mapping_rule(id) ON DELETE CASCADE",
|
|
"table": "public.role_mapping_rule_project",
|
|
"referenced_table": "public.role_mapping_rule",
|
|
"columns": [
|
|
"roleMappingRuleId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_198c5b5aea509d139274efcaf9a",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"roleMappingRuleId\", \"projectId\")",
|
|
"table": "public.role_mapping_rule_project",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"roleMappingRuleId",
|
|
"projectId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.credential_dependency",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "credentialId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "dependencyType",
|
|
"type": "varchar(64)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "dependencyId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_80212729ed0ffa0709417ab28f4",
|
|
"def": "CREATE UNIQUE INDEX \"PK_80212729ed0ffa0709417ab28f4\" ON public.credential_dependency USING btree (id)",
|
|
"table": "public.credential_dependency",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_5ec8e8c8d3539f3696cf73b43b",
|
|
"def": "CREATE INDEX \"IDX_5ec8e8c8d3539f3696cf73b43b\" ON public.credential_dependency USING btree (\"credentialId\")",
|
|
"table": "public.credential_dependency",
|
|
"columns": [
|
|
"credentialId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_91ee85fa9619dd6776725e117b",
|
|
"def": "CREATE INDEX \"IDX_91ee85fa9619dd6776725e117b\" ON public.credential_dependency USING btree (\"dependencyType\", \"dependencyId\")",
|
|
"table": "public.credential_dependency",
|
|
"columns": [
|
|
"dependencyType",
|
|
"dependencyId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_credential_dependency_credentialId_dependencyType_dependenc",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_credential_dependency_credentialId_dependencyType_dependenc\" ON public.credential_dependency USING btree (\"credentialId\", \"dependencyType\", \"dependencyId\")",
|
|
"table": "public.credential_dependency",
|
|
"columns": [
|
|
"credentialId",
|
|
"dependencyType",
|
|
"dependencyId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "credential_dependency_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "credential_dependency_credentialId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"credentialId\"",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialId"
|
|
]
|
|
},
|
|
{
|
|
"name": "credential_dependency_dependencyId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"dependencyId\"",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"dependencyId"
|
|
]
|
|
},
|
|
{
|
|
"name": "credential_dependency_dependencyType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"dependencyType\"",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"dependencyType"
|
|
]
|
|
},
|
|
{
|
|
"name": "credential_dependency_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_5ec8e8c8d3539f3696cf73b43bf",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE CASCADE",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_80212729ed0ffa0709417ab28f4",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.credential_dependency",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_version_history",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "nextval('instance_version_history_id_seq'::regclass)"
|
|
},
|
|
{
|
|
"name": "major",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "minor",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "patch",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_874f58cb616935bf49d9dbd67e9",
|
|
"def": "CREATE UNIQUE INDEX \"PK_874f58cb616935bf49d9dbd67e9\" ON public.instance_version_history USING btree (id)",
|
|
"table": "public.instance_version_history",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_version_history_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_version_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_version_history_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_version_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_version_history_major_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL major",
|
|
"table": "public.instance_version_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"major"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_version_history_minor_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL minor",
|
|
"table": "public.instance_version_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"minor"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_version_history_patch_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL patch",
|
|
"table": "public.instance_version_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"patch"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_874f58cb616935bf49d9dbd67e9",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_version_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_threads",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"default": "''::text"
|
|
},
|
|
{
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Project this thread is scoped to"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_35575100e45cdedeb89ae0643e9",
|
|
"def": "CREATE UNIQUE INDEX \"PK_35575100e45cdedeb89ae0643e9\" ON public.instance_ai_threads USING btree (id)",
|
|
"table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_f36dea4d38fe92e0e8f44d5a56",
|
|
"def": "CREATE INDEX \"IDX_f36dea4d38fe92e0e8f44d5a56\" ON public.instance_ai_threads USING btree (\"resourceId\")",
|
|
"table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_instance_ai_threads_projectId",
|
|
"def": "CREATE INDEX \"IDX_instance_ai_threads_projectId\" ON public.instance_ai_threads USING btree (\"projectId\")",
|
|
"table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_threads_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_threads_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_threads_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_threads_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_threads_title_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL title",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"title"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_threads_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_instance_ai_threads_projectId",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_35575100e45cdedeb89ae0643e9",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_messages",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "content",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(32)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_156c6f287225e9befe0181bb02b",
|
|
"def": "CREATE UNIQUE INDEX \"PK_156c6f287225e9befe0181bb02b\" ON public.instance_ai_messages USING btree (id)",
|
|
"table": "public.instance_ai_messages",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1eeb64cb9d66a927988de759e6",
|
|
"def": "CREATE INDEX \"IDX_1eeb64cb9d66a927988de759e6\" ON public.instance_ai_messages USING btree (\"threadId\")",
|
|
"table": "public.instance_ai_messages",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_76e212c6867fbaa06bf0decd6f",
|
|
"def": "CREATE INDEX \"IDX_76e212c6867fbaa06bf0decd6f\" ON public.instance_ai_messages USING btree (\"resourceId\")",
|
|
"table": "public.instance_ai_messages",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_messages_content_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL content",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"content"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_messages_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_messages_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_messages_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_messages_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_messages_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1eeb64cb9d66a927988de759e6e",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_156c6f287225e9befe0181bb02b",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_resources",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workingMemory",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_45b5b0b6f715dae4292b86603d8",
|
|
"def": "CREATE UNIQUE INDEX \"PK_45b5b0b6f715dae4292b86603d8\" ON public.instance_ai_resources USING btree (id)",
|
|
"table": "public.instance_ai_resources",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_resources_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_resources_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_resources_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_45b5b0b6f715dae4292b86603d8",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_observational_memory",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "lookupKey",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "scope",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "activeObservations",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"default": "''::text"
|
|
},
|
|
{
|
|
"name": "originType",
|
|
"type": "varchar(32)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "generationCount",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "lastObservedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "pendingMessageTokens",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "totalTokensObserved",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "observationTokenCount",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "isObserving",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "isReflecting",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "observedMessageIds",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "observedTimezone",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedObservations",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedObservationTokens",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedMessageIds",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedReflection",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedReflectionTokens",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedReflectionInputTokens",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "reflectedObservationLineCount",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "bufferedObservationChunks",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "isBufferingObservation",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "isBufferingReflection",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "lastBufferedAtTokens",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "lastBufferedAtTime",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_7192dd00cddba039bf1d3e6a098",
|
|
"def": "CREATE UNIQUE INDEX \"PK_7192dd00cddba039bf1d3e6a098\" ON public.instance_ai_observational_memory USING btree (id)",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_92f13cb6bc694227e069447f7b",
|
|
"def": "CREATE INDEX \"IDX_92f13cb6bc694227e069447f7b\" ON public.instance_ai_observational_memory USING btree (\"lookupKey\")",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"columns": [
|
|
"lookupKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a680ac96aae02dc887bbaac512",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_a680ac96aae02dc887bbaac512\" ON public.instance_ai_observational_memory USING btree (scope, \"threadId\", \"resourceId\")",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"columns": [
|
|
"scope",
|
|
"threadId",
|
|
"resourceId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_observational_memor_isBufferingObservation_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isBufferingObservation\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isBufferingObservation"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_activeObservations_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"activeObservations\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"activeObservations"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_config_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL config",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"config"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_generationCount_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"generationCount\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"generationCount"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_isBufferingReflection_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isBufferingReflection\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isBufferingReflection"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_isObserving_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isObserving\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isObserving"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_isReflecting_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"isReflecting\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"isReflecting"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_lastBufferedAtTokens_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastBufferedAtTokens\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastBufferedAtTokens"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_lookupKey_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lookupKey\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lookupKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_observationTokenCount_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationTokenCount\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationTokenCount"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_originType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"originType\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"originType"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_pendingMessageTokens_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"pendingMessageTokens\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"pendingMessageTokens"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_scope_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL scope",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"scope"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_totalTokensObserved_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"totalTokensObserved\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"totalTokensObserved"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observational_memory_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_34018c303885cd37093458e6409",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE SET NULL",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_7192dd00cddba039bf1d3e6a098",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_observational_memory",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_workflow_snapshots",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "runId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowName",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "snapshot",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_93f2696eb321dfe1d7defe7073f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_93f2696eb321dfe1d7defe7073f\" ON public.instance_ai_workflow_snapshots USING btree (\"runId\", \"workflowName\")",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"columns": [
|
|
"runId",
|
|
"workflowName"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a371ee6b8e0ebb5635f8baa46d",
|
|
"def": "CREATE INDEX \"IDX_a371ee6b8e0ebb5635f8baa46d\" ON public.instance_ai_workflow_snapshots USING btree (\"workflowName\", status)",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"columns": [
|
|
"workflowName",
|
|
"status"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_workflow_snapshots_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_workflow_snapshots_runId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"runId\"",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_workflow_snapshots_snapshot_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL snapshot",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"snapshot"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_workflow_snapshots_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_workflow_snapshots_workflowName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowName\"",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowName"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_93f2696eb321dfe1d7defe7073f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"runId\", \"workflowName\")",
|
|
"table": "public.instance_ai_workflow_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runId",
|
|
"workflowName"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_run_snapshots",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "runId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "messageGroupId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "runIds",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "tree",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "langsmithRunId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "LangSmith run ID (UUID v4, e.g. \"f47ac10b-58cc-4372-a567-0e02b2c3d479\")."
|
|
},
|
|
{
|
|
"name": "langsmithTraceId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "LangSmith trace ID (UUID v4, e.g. \"f47ac10b-58cc-4372-a567-0e02b2c3d479\")."
|
|
},
|
|
{
|
|
"name": "traceId",
|
|
"type": "varchar(64)",
|
|
"nullable": true,
|
|
"comment": "OpenTelemetry trace ID for the root Instance AI run."
|
|
},
|
|
{
|
|
"name": "spanId",
|
|
"type": "varchar(64)",
|
|
"nullable": true,
|
|
"comment": "OpenTelemetry span ID for the root Instance AI run."
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_0a5fc9690a84950ebf1416fb146",
|
|
"def": "CREATE UNIQUE INDEX \"PK_0a5fc9690a84950ebf1416fb146\" ON public.instance_ai_run_snapshots USING btree (\"threadId\", \"runId\")",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"columns": [
|
|
"threadId",
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_d926c16c2ad9728cb9a81790c0",
|
|
"def": "CREATE INDEX \"IDX_d926c16c2ad9728cb9a81790c0\" ON public.instance_ai_run_snapshots USING btree (\"threadId\", \"messageGroupId\")",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"columns": [
|
|
"threadId",
|
|
"messageGroupId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_d3a2bc880e7a8626802e5474ad",
|
|
"def": "CREATE INDEX \"IDX_d3a2bc880e7a8626802e5474ad\" ON public.instance_ai_run_snapshots USING btree (\"threadId\", \"createdAt\")",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"columns": [
|
|
"threadId",
|
|
"createdAt"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_run_snapshots_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_run_snapshots_runId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"runId\"",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_run_snapshots_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_run_snapshots_tree_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL tree",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tree"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_run_snapshots_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_2f63fa21d09d7918f347ddbdf70",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_0a5fc9690a84950ebf1416fb146",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"threadId\", \"runId\")",
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId",
|
|
"runId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_iteration_logs",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "taskKey",
|
|
"type": "varchar",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "entry",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_21c2b214b44bc6c34a6d3551c90",
|
|
"def": "CREATE UNIQUE INDEX \"PK_21c2b214b44bc6c34a6d3551c90\" ON public.instance_ai_iteration_logs USING btree (id)",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_02751202c9a2ad75f2d8e14f5e",
|
|
"def": "CREATE INDEX \"IDX_02751202c9a2ad75f2d8e14f5e\" ON public.instance_ai_iteration_logs USING btree (\"threadId\", \"taskKey\", \"createdAt\")",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"columns": [
|
|
"threadId",
|
|
"taskKey",
|
|
"createdAt"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_iteration_logs_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_iteration_logs_entry_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL entry",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"entry"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_iteration_logs_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_iteration_logs_taskKey_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"taskKey\"",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_iteration_logs_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_iteration_logs_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_8bfcc6c51fd3d69b1eae8aebd49",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_21c2b214b44bc6c34a6d3551c90",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.token_exchange_jti",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "jti",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "expiresAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_d8e8a6f737d530fdd2dd716e89c",
|
|
"def": "CREATE UNIQUE INDEX \"PK_d8e8a6f737d530fdd2dd716e89c\" ON public.token_exchange_jti USING btree (jti)",
|
|
"table": "public.token_exchange_jti",
|
|
"columns": [
|
|
"jti"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "token_exchange_jti_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.token_exchange_jti",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "token_exchange_jti_expiresAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"expiresAt\"",
|
|
"table": "public.token_exchange_jti",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expiresAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "token_exchange_jti_jti_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL jti",
|
|
"table": "public.token_exchange_jti",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"jti"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_d8e8a6f737d530fdd2dd716e89c",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (jti)",
|
|
"table": "public.token_exchange_jti",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"jti"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.trusted_key_source",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(32)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(32)",
|
|
"nullable": false,
|
|
"default": "'pending'::character varying"
|
|
},
|
|
{
|
|
"name": "lastError",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "lastRefreshedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_99e8908ce2c2cdccce487db7fc6",
|
|
"def": "CREATE UNIQUE INDEX \"PK_99e8908ce2c2cdccce487db7fc6\" ON public.trusted_key_source USING btree (id)",
|
|
"table": "public.trusted_key_source",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "trusted_key_source_config_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL config",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"config"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_source_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_source_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_source_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_source_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_source_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_99e8908ce2c2cdccce487db7fc6",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.trusted_key_source",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.trusted_key",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "sourceId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "kid",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_dc7d93798f3dbb6959f974c97e1",
|
|
"def": "CREATE UNIQUE INDEX \"PK_dc7d93798f3dbb6959f974c97e1\" ON public.trusted_key USING btree (\"sourceId\", kid)",
|
|
"table": "public.trusted_key",
|
|
"columns": [
|
|
"sourceId",
|
|
"kid"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "trusted_key_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.trusted_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.trusted_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_kid_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL kid",
|
|
"table": "public.trusted_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"kid"
|
|
]
|
|
},
|
|
{
|
|
"name": "trusted_key_sourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"sourceId\"",
|
|
"table": "public.trusted_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_8c2938d746943dd8f608d23c891",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"sourceId\") REFERENCES trusted_key_source(id) ON DELETE CASCADE",
|
|
"table": "public.trusted_key",
|
|
"referenced_table": "public.trusted_key_source",
|
|
"columns": [
|
|
"sourceId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_dc7d93798f3dbb6959f974c97e1",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"sourceId\", kid)",
|
|
"table": "public.trusted_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sourceId",
|
|
"kid"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.user_favorites",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resourceType",
|
|
"type": "varchar(64)",
|
|
"nullable": false
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_6c472a19a7423cfbbf6b7c75939",
|
|
"def": "CREATE UNIQUE INDEX \"PK_6c472a19a7423cfbbf6b7c75939\" ON public.user_favorites USING btree (id)",
|
|
"table": "public.user_favorites",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_cf6ae658ead9ffc124723413c65",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_cf6ae658ead9ffc124723413c65\" ON public.user_favorites USING btree (\"userId\", \"resourceId\", \"resourceType\")",
|
|
"table": "public.user_favorites",
|
|
"columns": [
|
|
"userId",
|
|
"resourceId",
|
|
"resourceType"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1dd5c393ad0517be3c31a7af83",
|
|
"def": "CREATE INDEX \"IDX_1dd5c393ad0517be3c31a7af83\" ON public.user_favorites USING btree (\"userId\")",
|
|
"table": "public.user_favorites",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1d11050a381548c42c32cc25c4",
|
|
"def": "CREATE INDEX \"IDX_1d11050a381548c42c32cc25c4\" ON public.user_favorites USING btree (\"resourceType\", \"resourceId\")",
|
|
"table": "public.user_favorites",
|
|
"columns": [
|
|
"resourceType",
|
|
"resourceId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "user_favorites_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_favorites_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_favorites_resourceType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceType\"",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceType"
|
|
]
|
|
},
|
|
{
|
|
"name": "user_favorites_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1dd5c393ad0517be3c31a7af836",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_6c472a19a7423cfbbf6b7c75939",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_cf6ae658ead9ffc124723413c65",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (\"userId\", \"resourceId\", \"resourceType\")",
|
|
"table": "public.user_favorites",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId",
|
|
"resourceId",
|
|
"resourceType"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.deployment_key",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(64)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "algorithm",
|
|
"type": "varchar(20)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_94bb7aeb5def5a0284a5fe9f9a0",
|
|
"def": "CREATE UNIQUE INDEX \"PK_94bb7aeb5def5a0284a5fe9f9a0\" ON public.deployment_key USING btree (id)",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_deployment_key_data_encryption_active",
|
|
"def": "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))",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_deployment_key_instance_id_active",
|
|
"def": "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))",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_deployment_key_signing_jwt_active",
|
|
"def": "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))",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_deployment_key_signing_hmac_active",
|
|
"def": "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))",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_deployment_key_signing_binary_data_active",
|
|
"def": "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))",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_deployment_key_jwe_private_key_active",
|
|
"def": "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))",
|
|
"table": "public.deployment_key",
|
|
"columns": [
|
|
"type",
|
|
"algorithm"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "deployment_key_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "deployment_key_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "deployment_key_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "deployment_key_type_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL type",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"type"
|
|
]
|
|
},
|
|
{
|
|
"name": "deployment_key_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "deployment_key_value_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL value",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"value"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_94bb7aeb5def5a0284a5fe9f9a0",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.deployment_key",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.ai_builder_temporary_workflow",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_85a87a1ba0f61999fe11dc56325",
|
|
"def": "CREATE UNIQUE INDEX \"PK_85a87a1ba0f61999fe11dc56325\" ON public.ai_builder_temporary_workflow USING btree (\"workflowId\")",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_39b07732e819fb561d74c38763",
|
|
"def": "CREATE INDEX \"IDX_39b07732e819fb561d74c38763\" ON public.ai_builder_temporary_workflow USING btree (\"threadId\")",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "ai_builder_temporary_workflow_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "ai_builder_temporary_workflow_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "ai_builder_temporary_workflow_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "ai_builder_temporary_workflow_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_85a87a1ba0f61999fe11dc56325",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_39b07732e819fb561d74c38763f",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_85a87a1ba0f61999fe11dc56325",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"workflowId\")",
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.evaluation_config",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"default": "'valid'::character varying"
|
|
},
|
|
{
|
|
"name": "invalidReason",
|
|
"type": "varchar(64)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "datasetSource",
|
|
"type": "varchar(32)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "datasetRef",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "startNodeName",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "endNodeName",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "metrics",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_59c14dccf8989df94070c2dcfda",
|
|
"def": "CREATE UNIQUE INDEX \"PK_59c14dccf8989df94070c2dcfda\" ON public.evaluation_config USING btree (id)",
|
|
"table": "public.evaluation_config",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_3c3c99a712e971835c52292e44c",
|
|
"def": "CREATE UNIQUE INDEX \"UQ_3c3c99a712e971835c52292e44c\" ON public.evaluation_config USING btree (\"workflowId\", name)",
|
|
"table": "public.evaluation_config",
|
|
"columns": [
|
|
"workflowId",
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_fd7542bb123074760285dc1bbf",
|
|
"def": "CREATE INDEX \"IDX_fd7542bb123074760285dc1bbf\" ON public.evaluation_config USING btree (\"workflowId\")",
|
|
"table": "public.evaluation_config",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "evaluation_config_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_datasetRef_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"datasetRef\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"datasetRef"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_datasetSource_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"datasetSource\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"datasetSource"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_endNodeName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"endNodeName\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"endNodeName"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_metrics_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL metrics",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"metrics"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_startNodeName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"startNodeName\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"startNodeName"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_config_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_fd7542bb123074760285dc1bbf3",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_59c14dccf8989df94070c2dcfda",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "UQ_3c3c99a712e971835c52292e44c",
|
|
"type": "UNIQUE",
|
|
"def": "UNIQUE (\"workflowId\", name)",
|
|
"table": "public.evaluation_config",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId",
|
|
"name"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.evaluation_collection",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "evaluationConfigId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdById",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "insightsCache",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_e720b6efc1e45b878ebb0b2ca30",
|
|
"def": "CREATE UNIQUE INDEX \"PK_e720b6efc1e45b878ebb0b2ca30\" ON public.evaluation_collection USING btree (id)",
|
|
"table": "public.evaluation_collection",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a48ce930c3bc7604894b8f0eaa",
|
|
"def": "CREATE INDEX \"IDX_a48ce930c3bc7604894b8f0eaa\" ON public.evaluation_collection USING btree (\"workflowId\")",
|
|
"table": "public.evaluation_collection",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_d634a0c93fd7de68a87eab951b",
|
|
"def": "CREATE INDEX \"IDX_d634a0c93fd7de68a87eab951b\" ON public.evaluation_collection USING btree (\"evaluationConfigId\")",
|
|
"table": "public.evaluation_collection",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "evaluation_collection_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_collection_evaluationConfigId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"evaluationConfigId\"",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_collection_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_collection_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_collection_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "evaluation_collection_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_f4561f38b5a22a4f090d5cd3eae",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"createdById\") REFERENCES \"user\"(id) ON DELETE SET NULL",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"createdById"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a48ce930c3bc7604894b8f0eaad",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "public.workflow_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_d634a0c93fd7de68a87eab951b2",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"evaluationConfigId\") REFERENCES evaluation_config(id) ON DELETE CASCADE",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "public.evaluation_config",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_e720b6efc1e45b878ebb0b2ca30",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.evaluation_collection",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "varchar(512)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "integrations",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'[]'::json"
|
|
},
|
|
{
|
|
"name": "schema",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "tools",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'{}'::json"
|
|
},
|
|
{
|
|
"name": "skills",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'{}'::json"
|
|
},
|
|
{
|
|
"name": "versionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "activeVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_9c653f28ae19c5884d5baf6a1d9",
|
|
"def": "CREATE UNIQUE INDEX \"PK_9c653f28ae19c5884d5baf6a1d9\" ON public.agents USING btree (id)",
|
|
"table": "public.agents",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a30d560207c4071d98aa03c179",
|
|
"def": "CREATE INDEX \"IDX_a30d560207c4071d98aa03c179\" ON public.agents USING btree (\"projectId\")",
|
|
"table": "public.agents",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_agents_projectId",
|
|
"def": "CREATE INDEX \"IDX_agents_projectId\" ON public.agents USING btree (\"projectId\")",
|
|
"table": "public.agents",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_integrations_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL integrations",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"integrations"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_skills_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL skills",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"skills"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_tools_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL tools",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tools"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a30d560207c4071d98aa03c179c",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.agents",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_9c653f28ae19c5884d5baf6a1d9",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_940597dfe9753375309ce6aeea0",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"activeVersionId\") REFERENCES agent_history(\"versionId\") ON DELETE SET NULL",
|
|
"table": "public.agents",
|
|
"referenced_table": "public.agent_history",
|
|
"columns": [
|
|
"activeVersionId"
|
|
],
|
|
"referenced_columns": [
|
|
"versionId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_checkpoints",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "runId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "state",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "expired",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"default": "false"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_50a27cbafa6806c9b162304b5fd",
|
|
"def": "CREATE UNIQUE INDEX \"PK_50a27cbafa6806c9b162304b5fd\" ON public.agent_checkpoints USING btree (\"runId\")",
|
|
"table": "public.agent_checkpoints",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_5e31c210f896d539964bf99fe3",
|
|
"def": "CREATE INDEX \"IDX_5e31c210f896d539964bf99fe3\" ON public.agent_checkpoints USING btree (\"agentId\")",
|
|
"table": "public.agent_checkpoints",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_checkpoints_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_checkpoints_expired_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL expired",
|
|
"table": "public.agent_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expired"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_checkpoints_runId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"runId\"",
|
|
"table": "public.agent_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_checkpoints_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_5e31c210f896d539964bf99fe32",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_checkpoints",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_50a27cbafa6806c9b162304b5fd",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"runId\")",
|
|
"table": "public.agent_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_resources",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "metadata",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_fa6b20b2d31a9991529dbf8ef7d",
|
|
"def": "CREATE UNIQUE INDEX \"PK_fa6b20b2d31a9991529dbf8ef7d\" ON public.agents_resources USING btree (id)",
|
|
"table": "public.agents_resources",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_resources_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_resources_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_resources_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_fa6b20b2d31a9991529dbf8ef7d",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents_resources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_threads",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "metadata",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "IDX_54fa1b94f34a409beafae567a4",
|
|
"def": "CREATE INDEX \"IDX_54fa1b94f34a409beafae567a4\" ON public.agents_threads USING btree (\"resourceId\")",
|
|
"table": "public.agents_threads",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_4a3feb0a13ffe315c009cce64e5",
|
|
"def": "CREATE UNIQUE INDEX \"PK_4a3feb0a13ffe315c009cce64e5\" ON public.agents_threads USING btree (id)",
|
|
"table": "public.agents_threads",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_threads_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_threads_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_threads_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.agents_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_threads_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_4a3feb0a13ffe315c009cce64e5",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_messages",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "role",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "content",
|
|
"type": "json",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_81020dc608dfb0af1ede386d907",
|
|
"def": "CREATE UNIQUE INDEX \"PK_81020dc608dfb0af1ede386d907\" ON public.agents_messages USING btree (id)",
|
|
"table": "public.agents_messages",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_fc7bf858660bfafd19181e8e35",
|
|
"def": "CREATE INDEX \"IDX_fc7bf858660bfafd19181e8e35\" ON public.agents_messages USING btree (\"threadId\", \"createdAt\")",
|
|
"table": "public.agents_messages",
|
|
"columns": [
|
|
"threadId",
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_agents_messages_threadId_createdAt",
|
|
"def": "CREATE INDEX \"IDX_agents_messages_threadId_createdAt\" ON public.agents_messages USING btree (\"threadId\", \"createdAt\")",
|
|
"table": "public.agents_messages",
|
|
"columns": [
|
|
"threadId",
|
|
"createdAt"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_messages_content_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL content",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"content"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_messages_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_messages_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_messages_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_messages_role_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL role",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"role"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_messages_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_messages_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_81020dc608dfb0af1ede386d907",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_0a8057a61afabd2999608ffd0d9",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES agents_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agents_messages",
|
|
"referenced_table": "public.agents_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_execution_threads",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "agentName",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "projectId",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "sessionNumber",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "totalPromptTokens",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "totalCompletionTokens",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "totalCost",
|
|
"type": "double precision",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "totalDuration",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "emoji",
|
|
"type": "varchar(8)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "taskId",
|
|
"type": "varchar(32)",
|
|
"nullable": true,
|
|
"comment": "Published task ID that triggered this session; not an FK because published runs can outlive draft task definition rows"
|
|
},
|
|
{
|
|
"name": "taskVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "Published agent_history version that supplied the task snapshot"
|
|
},
|
|
{
|
|
"name": "parentThreadId",
|
|
"type": "varchar(128)",
|
|
"nullable": true,
|
|
"comment": "Parent session thread id that delegated this subagent run."
|
|
},
|
|
{
|
|
"name": "parentAgentId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "Saved agent id of the parent that delegated this subagent run."
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "IDX_0468a9dc35597314e641d4722a",
|
|
"def": "CREATE INDEX \"IDX_0468a9dc35597314e641d4722a\" ON public.agent_execution_threads USING btree (\"agentId\")",
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_0e2f8bf92a7a9c88b89670f701",
|
|
"def": "CREATE INDEX \"IDX_0e2f8bf92a7a9c88b89670f701\" ON public.agent_execution_threads USING btree (\"projectId\")",
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_agent_execution_threads_taskVersionId",
|
|
"def": "CREATE INDEX \"IDX_agent_execution_threads_taskVersionId\" ON public.agent_execution_threads USING btree (\"taskVersionId\")",
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"taskVersionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_22373dbf6ba6929d8ac50093309",
|
|
"def": "CREATE UNIQUE INDEX \"PK_22373dbf6ba6929d8ac50093309\" ON public.agent_execution_threads USING btree (id)",
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_execution_threads_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_agentName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentName\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentName"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_projectId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"projectId\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"projectId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_sessionNumber_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"sessionNumber\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"sessionNumber"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_totalCompletionTokens_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"totalCompletionTokens\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"totalCompletionTokens"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_totalCost_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"totalCost\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"totalCost"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_totalDuration_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"totalDuration\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"totalDuration"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_totalPromptTokens_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"totalPromptTokens\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"totalPromptTokens"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threads_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_0e2f8bf92a7a9c88b89670f701c",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "public.project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_0468a9dc35597314e641d4722aa",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_f00b52d74fe11838e1fe086deea",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"taskVersionId\") REFERENCES agent_history(\"versionId\") ON DELETE SET NULL",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "public.agent_history",
|
|
"columns": [
|
|
"taskVersionId"
|
|
],
|
|
"referenced_columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_22373dbf6ba6929d8ac50093309",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agent_execution_threads",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_execution",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "startedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "stoppedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "userMessage",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "assistantResponse",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "model",
|
|
"type": "varchar(255)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "promptTokens",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "completionTokens",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "totalTokens",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "cost",
|
|
"type": "double precision",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "toolCalls",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "timeline",
|
|
"type": "json",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "error",
|
|
"type": "text",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "hitlStatus",
|
|
"type": "varchar(16)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "source",
|
|
"type": "varchar(32)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_ba438acc8532addc12d1ef17049",
|
|
"def": "CREATE UNIQUE INDEX \"PK_ba438acc8532addc12d1ef17049\" ON public.agent_execution USING btree (id)",
|
|
"table": "public.agent_execution",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_63d3c3a68b9cebf05f967f0b1c",
|
|
"def": "CREATE INDEX \"IDX_63d3c3a68b9cebf05f967f0b1c\" ON public.agent_execution USING btree (\"threadId\", \"createdAt\")",
|
|
"table": "public.agent_execution",
|
|
"columns": [
|
|
"threadId",
|
|
"createdAt"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_agent_execution_hitlStatus",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((\"hitlStatus\")::text = ANY ((ARRAY['suspended'::character varying, 'resumed'::character varying])::text[])))",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"hitlStatus"
|
|
]
|
|
},
|
|
{
|
|
"name": "CHK_agent_execution_status",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((status)::text = ANY ((ARRAY['success'::character varying, 'error'::character varying])::text[])))",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_assistantResponse_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"assistantResponse\"",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"assistantResponse"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_duration_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL duration",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"duration"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_execution_userMessage_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userMessage\"",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userMessage"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_ba438acc8532addc12d1ef17049",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_add2432fb6034cc18b6af299dce",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES agent_execution_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agent_execution",
|
|
"referenced_table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_checkpoints",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "Opaque checkpoint key from the agent runtime."
|
|
},
|
|
{
|
|
"name": "runId",
|
|
"type": "varchar(255)",
|
|
"nullable": true,
|
|
"comment": "Run ID parsed from the checkpoint key when available."
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "Instance AI thread that owns the checkpoint."
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": true,
|
|
"comment": "Resource ID recorded by the agent runtime."
|
|
},
|
|
{
|
|
"name": "state",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Serializable agent state snapshot stored as JSON."
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "expiredAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true,
|
|
"comment": "Soft-delete timestamp: null means live; non-null marks the row as a tombstone."
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_5315a45f0846d1f9d128c18a2ed",
|
|
"def": "CREATE UNIQUE INDEX \"PK_5315a45f0846d1f9d128c18a2ed\" ON public.instance_ai_checkpoints USING btree (key)",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_768189b506cc26c4fe878b87cb",
|
|
"def": "CREATE INDEX \"IDX_768189b506cc26c4fe878b87cb\" ON public.instance_ai_checkpoints USING btree (\"runId\")",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_2b23f3f24a70bebb990203b011",
|
|
"def": "CREATE INDEX \"IDX_2b23f3f24a70bebb990203b011\" ON public.instance_ai_checkpoints USING btree (\"threadId\")",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_be9d0eca0b19fb93d4eb74b327",
|
|
"def": "CREATE INDEX \"IDX_be9d0eca0b19fb93d4eb74b327\" ON public.instance_ai_checkpoints USING btree (\"resourceId\")",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_checkpoints_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_checkpoints_key_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL key",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_checkpoints_state_tombstone_check",
|
|
"type": "CHECK",
|
|
"def": "CHECK ((((\"expiredAt\" IS NOT NULL) AND (state IS NULL)) OR (\"expiredAt\" IS NULL)))",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"expiredAt",
|
|
"state"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_checkpoints_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_checkpoints_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_2b23f3f24a70bebb990203b011e",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_5315a45f0846d1f9d128c18a2ed",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (key)",
|
|
"table": "public.instance_ai_checkpoints",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_observations",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Application-generated n8n string ID, not a database UUID"
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this observation row"
|
|
},
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "agents_threads.id source stream for this observation log"
|
|
},
|
|
{
|
|
"name": "marker",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "text",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "parentId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "tokenCount",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "supersededBy",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_9ad319654d12c2649f7caf27135",
|
|
"def": "CREATE UNIQUE INDEX \"PK_9ad319654d12c2649f7caf27135\" ON public.agents_observations USING btree (id)",
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_07cb1e4a302629c5fa5d74d2bb",
|
|
"def": "CREATE INDEX \"IDX_07cb1e4a302629c5fa5d74d2bb\" ON public.agents_observations USING btree (\"agentId\", \"observationScopeId\", status)",
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId",
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_4cfd8a70ebb0a5b0cf047dca3c",
|
|
"def": "CREATE INDEX \"IDX_4cfd8a70ebb0a5b0cf047dca3c\" ON public.agents_observations USING btree (\"observationScopeId\")",
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_501e2d1701a10e24fb69ab5fc5",
|
|
"def": "CREATE INDEX \"IDX_501e2d1701a10e24fb69ab5fc5\" ON public.agents_observations USING btree (\"parentId\")",
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"parentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_127ee1078ffa952bb37b511efa",
|
|
"def": "CREATE INDEX \"IDX_127ee1078ffa952bb37b511efa\" ON public.agents_observations USING btree (\"supersededBy\")",
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"supersededBy"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_agents_observations_marker",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((marker)::text = ANY ((ARRAY['critical'::character varying, 'important'::character varying, 'info'::character varying, 'completion'::character varying])::text[])))",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"marker"
|
|
]
|
|
},
|
|
{
|
|
"name": "CHK_agents_observations_status",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[])))",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_marker_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL marker",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"marker"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_text_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL text",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"text"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_tokenCount_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"tokenCount\"",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tokenCount"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observations_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_d206432be97b7ed88d187479b1b",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_127ee1078ffa952bb37b511efad",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"supersededBy\") REFERENCES agents_observations(id)",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "public.agents_observations",
|
|
"columns": [
|
|
"supersededBy"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_501e2d1701a10e24fb69ab5fc5f",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"parentId\") REFERENCES agents_observations(id)",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "public.agents_observations",
|
|
"columns": [
|
|
"parentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_9ad319654d12c2649f7caf27135",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_4cfd8a70ebb0a5b0cf047dca3cf",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agents_observations",
|
|
"referenced_table": "public.agents_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_observation_cursors",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this cursor"
|
|
},
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "agents_threads.id source stream checkpointed by this cursor"
|
|
},
|
|
{
|
|
"name": "lastObservedMessageId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "lastObservedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_eb777ac57ab872d38f8ebd19317",
|
|
"def": "CREATE UNIQUE INDEX \"PK_eb777ac57ab872d38f8ebd19317\" ON public.agents_observation_cursors USING btree (\"agentId\", \"observationScopeId\")",
|
|
"table": "public.agents_observation_cursors",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_87aa187d27ea67eafd16490515",
|
|
"def": "CREATE INDEX \"IDX_87aa187d27ea67eafd16490515\" ON public.agents_observation_cursors USING btree (\"observationScopeId\")",
|
|
"table": "public.agents_observation_cursors",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_observation_cursors_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_cursors_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_cursors_lastObservedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastObservedAt\"",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastObservedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_cursors_lastObservedMessageId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastObservedMessageId\"",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastObservedMessageId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_cursors_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_cursors_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_64e92819f4b413661ed6e2c3c3d",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_eb777ac57ab872d38f8ebd19317",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"observationScopeId\")",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_87aa187d27ea67eafd164905154",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agents_observation_cursors",
|
|
"referenced_table": "public.agents_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_observation_locks",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this lock"
|
|
},
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "agents_threads.id source stream locked for observation tasks"
|
|
},
|
|
{
|
|
"name": "taskKind",
|
|
"type": "varchar(20)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "holderId",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Ephemeral background-task lock owner token, not a user ID"
|
|
},
|
|
{
|
|
"name": "heldUntil",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_7e2e315162ac3d80587e15ac2c3",
|
|
"def": "CREATE UNIQUE INDEX \"PK_7e2e315162ac3d80587e15ac2c3\" ON public.agents_observation_locks USING btree (\"agentId\", \"observationScopeId\", \"taskKind\")",
|
|
"table": "public.agents_observation_locks",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId",
|
|
"taskKind"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_6b55089892e447c2f82e5ec60e",
|
|
"def": "CREATE INDEX \"IDX_6b55089892e447c2f82e5ec60e\" ON public.agents_observation_locks USING btree (\"observationScopeId\")",
|
|
"table": "public.agents_observation_locks",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_agents_observation_locks_taskKind",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((\"taskKind\")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[])))",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskKind"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_heldUntil_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"heldUntil\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"heldUntil"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_holderId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"holderId\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"holderId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_taskKind_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"taskKind\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskKind"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_observation_locks_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_093e44ae20f2518e97d83a95433",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_7e2e315162ac3d80587e15ac2c3",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"observationScopeId\", \"taskKind\")",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId",
|
|
"taskKind"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_6b55089892e447c2f82e5ec60ed",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agents_observation_locks",
|
|
"referenced_table": "public.agents_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_memory_entries",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this episodic memory entry"
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "agents_resources.id partition used for episodic recall scope"
|
|
},
|
|
{
|
|
"name": "content",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "contentHash",
|
|
"type": "varchar(64)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "supersededBy",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "Self-reference to replacement memory entry"
|
|
},
|
|
{
|
|
"name": "embeddingModel",
|
|
"type": "varchar(128)",
|
|
"nullable": true,
|
|
"comment": "Embedding model used to produce embedding"
|
|
},
|
|
{
|
|
"name": "embedding",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Embedding vector for episodic recall"
|
|
},
|
|
{
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Optional system metadata for ranking and debugging"
|
|
},
|
|
{
|
|
"name": "lastSeenAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"comment": "Last time equivalent content was observed; updatedAt tracks row mutation time"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_bfbc45dc88f66fae4e4b4a15fec",
|
|
"def": "CREATE UNIQUE INDEX \"PK_bfbc45dc88f66fae4e4b4a15fec\" ON public.agents_memory_entries USING btree (id)",
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_aff2807b31eccbafe59d0474f0",
|
|
"def": "CREATE INDEX \"IDX_aff2807b31eccbafe59d0474f0\" ON public.agents_memory_entries USING btree (\"agentId\", \"resourceId\", status, \"createdAt\", id)",
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"agentId",
|
|
"resourceId",
|
|
"status",
|
|
"createdAt",
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a03e04e94bea8439dd166d4b52",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_a03e04e94bea8439dd166d4b52\" ON public.agents_memory_entries USING btree (\"agentId\", \"resourceId\", \"contentHash\")",
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"agentId",
|
|
"resourceId",
|
|
"contentHash"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_1443a75e59adbfb796071d6639",
|
|
"def": "CREATE INDEX \"IDX_1443a75e59adbfb796071d6639\" ON public.agents_memory_entries USING btree (\"resourceId\")",
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_0edf1226b77ddc525eae493807",
|
|
"def": "CREATE INDEX \"IDX_0edf1226b77ddc525eae493807\" ON public.agents_memory_entries USING btree (\"supersededBy\")",
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"supersededBy"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_agents_memory_entries_status",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[])))",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_contentHash_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"contentHash\"",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"contentHash"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_content_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL content",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"content"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_lastSeenAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastSeenAt\"",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastSeenAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entries_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_28e981fb675e9b44ce02f0ec1dd",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1443a75e59adbfb796071d66393",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"resourceId\") REFERENCES agents_resources(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "public.agents_resources",
|
|
"columns": [
|
|
"resourceId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_0edf1226b77ddc525eae4938079",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"supersededBy\") REFERENCES agents_memory_entries(id)",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"supersededBy"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_bfbc45dc88f66fae4e4b4a15fec",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents_memory_entries",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_memory_entry_locks",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this lock"
|
|
},
|
|
{
|
|
"name": "resourceId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "agents_resources.id partition locked for episodic indexing"
|
|
},
|
|
{
|
|
"name": "holderId",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Ephemeral background-task lock owner token"
|
|
},
|
|
{
|
|
"name": "heldUntil",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_a8e0f570d04a174292bea104ae6",
|
|
"def": "CREATE UNIQUE INDEX \"PK_a8e0f570d04a174292bea104ae6\" ON public.agents_memory_entry_locks USING btree (\"agentId\", \"resourceId\")",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"columns": [
|
|
"agentId",
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_9594c0983cfee1c8ff49b05848",
|
|
"def": "CREATE INDEX \"IDX_9594c0983cfee1c8ff49b05848\" ON public.agents_memory_entry_locks USING btree (\"resourceId\")",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_memory_entry_locks_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_locks_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_locks_heldUntil_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"heldUntil\"",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"heldUntil"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_locks_holderId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"holderId\"",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"holderId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_locks_resourceId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"resourceId\"",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"resourceId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_locks_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_0ccf6d9ea6f44fa1c264fc2f795",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_9594c0983cfee1c8ff49b05848b",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"resourceId\") REFERENCES agents_resources(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "public.agents_resources",
|
|
"columns": [
|
|
"resourceId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_a8e0f570d04a174292bea104ae6",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"resourceId\")",
|
|
"table": "public.agents_memory_entry_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"resourceId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_memory_entry_sources",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns the linked episodic memory entry source"
|
|
},
|
|
{
|
|
"name": "memoryEntryId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Episodic memory entry linked to this source evidence"
|
|
},
|
|
{
|
|
"name": "observationId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Observation-log row used as source evidence"
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "Source conversation thread that produced the linked observation"
|
|
},
|
|
{
|
|
"name": "evidenceHash",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Bounded hash used to deduplicate exact evidence links"
|
|
},
|
|
{
|
|
"name": "evidenceText",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"comment": "Exact source evidence text from the observation, not recall scope"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_278f05e98e74baaaa93f52b4bab",
|
|
"def": "CREATE UNIQUE INDEX \"PK_278f05e98e74baaaa93f52b4bab\" ON public.agents_memory_entry_sources USING btree (id)",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a353ac251315ef0af6ad3c9f0a",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_a353ac251315ef0af6ad3c9f0a\" ON public.agents_memory_entry_sources USING btree (\"memoryEntryId\", \"observationId\", \"evidenceHash\")",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"memoryEntryId",
|
|
"observationId",
|
|
"evidenceHash"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_cb7c15d22fd068a0806aa57fc0",
|
|
"def": "CREATE INDEX \"IDX_cb7c15d22fd068a0806aa57fc0\" ON public.agents_memory_entry_sources USING btree (\"observationId\")",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"observationId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_f9573af4ed653f13b0ba1f7b12",
|
|
"def": "CREATE INDEX \"IDX_f9573af4ed653f13b0ba1f7b12\" ON public.agents_memory_entry_sources USING btree (\"agentId\", \"threadId\")",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"agentId",
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_451d387a182fa8dd8002dfc3a7",
|
|
"def": "CREATE INDEX \"IDX_451d387a182fa8dd8002dfc3a7\" ON public.agents_memory_entry_sources USING btree (\"threadId\")",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_memory_entry_sources_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_evidenceHash_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"evidenceHash\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"evidenceHash"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_evidenceText_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"evidenceText\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"evidenceText"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_memoryEntryId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"memoryEntryId\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"memoryEntryId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_observationId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationId\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_sources_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_c38e8a57a36b880e39a52ada2e8",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_cb7c15d22fd068a0806aa57fc03",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationId\") REFERENCES agents_observations(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "public.agents_observations",
|
|
"columns": [
|
|
"observationId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_4706f6223313959b7437a2b48df",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"memoryEntryId\") REFERENCES agents_memory_entries(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"memoryEntryId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_278f05e98e74baaaa93f52b4bab",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_451d387a182fa8dd8002dfc3a77",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES agents_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_sources",
|
|
"referenced_table": "public.agents_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agents_memory_entry_cursors",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this cursor"
|
|
},
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "agents_threads.id source stream indexed into episodic memory"
|
|
},
|
|
{
|
|
"name": "lastIndexedObservationId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Last observation-log row indexed into episodic memory"
|
|
},
|
|
{
|
|
"name": "lastIndexedObservationCreatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"comment": "Creation timestamp for the last indexed observation-log row"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_b31a1d5c009a27f4cc5ef8f102a",
|
|
"def": "CREATE UNIQUE INDEX \"PK_b31a1d5c009a27f4cc5ef8f102a\" ON public.agents_memory_entry_cursors USING btree (\"agentId\", \"observationScopeId\")",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_069e791e428391a5569e7a96b2",
|
|
"def": "CREATE INDEX \"IDX_069e791e428391a5569e7a96b2\" ON public.agents_memory_entry_cursors USING btree (\"observationScopeId\")",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agents_memory_entry_cursors_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_cursors_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_cursors_lastIndexedObservationCrea_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastIndexedObservationCreatedAt\"",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastIndexedObservationCreatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_cursors_lastIndexedObservationId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastIndexedObservationId\"",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastIndexedObservationId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_cursors_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agents_memory_entry_cursors_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_746780fd115e5e4352457a3c617",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_b31a1d5c009a27f4cc5ef8f102a",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"observationScopeId\")",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_069e791e428391a5569e7a96b20",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE",
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"referenced_table": "public.agents_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_history",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "versionId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "schema",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Frozen snapshot of the published AgentJsonConfig"
|
|
},
|
|
{
|
|
"name": "tools",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Frozen map of `toolId → { code, descriptor }` at publish time"
|
|
},
|
|
{
|
|
"name": "skills",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Frozen map of `skillId → AgentSkill` at publish time"
|
|
},
|
|
{
|
|
"name": "publishedById",
|
|
"type": "uuid",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "author",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_65ffcfe7a8e112fb826311fb092",
|
|
"def": "CREATE UNIQUE INDEX \"PK_65ffcfe7a8e112fb826311fb092\" ON public.agent_history USING btree (\"versionId\")",
|
|
"table": "public.agent_history",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_87cd5a8da20304b089ea2f83fe",
|
|
"def": "CREATE INDEX \"IDX_87cd5a8da20304b089ea2f83fe\" ON public.agent_history USING btree (\"agentId\")",
|
|
"table": "public.agent_history",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_history_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_history_author_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL author",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"author"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_history_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_history_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_history_versionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"versionId\"",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_8771675f44c58fb40e0feb9ee35",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"publishedById\") REFERENCES \"user\"(id) ON DELETE SET NULL",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"publishedById"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_87cd5a8da20304b089ea2f83fec",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_65ffcfe7a8e112fb826311fb092",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"versionId\")",
|
|
"table": "public.agent_history",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_observations",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Application-generated n8n string ID, not a database UUID"
|
|
},
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "instance_ai_threads.id source stream for this observation log"
|
|
},
|
|
{
|
|
"name": "marker",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "text",
|
|
"type": "text",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "parentId",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "tokenCount",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(16)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "supersededBy",
|
|
"type": "varchar(36)",
|
|
"nullable": true
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_4d9b514cdf0f0b577650caf2ac2",
|
|
"def": "CREATE UNIQUE INDEX \"PK_4d9b514cdf0f0b577650caf2ac2\" ON public.instance_ai_observations USING btree (id)",
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_0d5db648188d338df7fb2a8064",
|
|
"def": "CREATE INDEX \"IDX_0d5db648188d338df7fb2a8064\" ON public.instance_ai_observations USING btree (\"observationScopeId\", status, \"createdAt\", id)",
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"observationScopeId",
|
|
"status",
|
|
"createdAt",
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_daef2195a4a846eb70eed15e03",
|
|
"def": "CREATE INDEX \"IDX_daef2195a4a846eb70eed15e03\" ON public.instance_ai_observations USING btree (\"parentId\")",
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"parentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_a80e0ee839a2f10ba4b86e1999",
|
|
"def": "CREATE INDEX \"IDX_a80e0ee839a2f10ba4b86e1999\" ON public.instance_ai_observations USING btree (\"supersededBy\")",
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"supersededBy"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_instance_ai_observations_marker",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((marker)::text = ANY ((ARRAY['critical'::character varying, 'important'::character varying, 'info'::character varying, 'completion'::character varying])::text[])))",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"marker"
|
|
]
|
|
},
|
|
{
|
|
"name": "CHK_instance_ai_observations_status",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[])))",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_marker_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL marker",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"marker"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_text_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL text",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"text"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_tokenCount_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"tokenCount\"",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"tokenCount"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observations_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_d54fc84a6c8ac91b5e0db0378a4",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_a80e0ee839a2f10ba4b86e19998",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"supersededBy\") REFERENCES instance_ai_observations(id)",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"supersededBy"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_daef2195a4a846eb70eed15e039",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"parentId\") REFERENCES instance_ai_observations(id)",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"parentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_4d9b514cdf0f0b577650caf2ac2",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_observations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_observation_cursors",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "instance_ai_threads.id source stream checkpointed by this cursor"
|
|
},
|
|
{
|
|
"name": "lastObservedMessageId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "lastObservedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_5b6319b2e9a37c1064a72428f9a",
|
|
"def": "CREATE UNIQUE INDEX \"PK_5b6319b2e9a37c1064a72428f9a\" ON public.instance_ai_observation_cursors USING btree (\"observationScopeId\")",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_observation_cursors_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_cursors_lastObservedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastObservedAt\"",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastObservedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_cursors_lastObservedMessageId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"lastObservedMessageId\"",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"lastObservedMessageId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_cursors_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_cursors_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_5b6319b2e9a37c1064a72428f9a",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_5b6319b2e9a37c1064a72428f9a",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"observationScopeId\")",
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_observation_locks",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "observationScopeId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "instance_ai_threads.id source stream locked for observation tasks"
|
|
},
|
|
{
|
|
"name": "taskKind",
|
|
"type": "varchar(20)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "holderId",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Ephemeral background-task lock owner token, not a user ID"
|
|
},
|
|
{
|
|
"name": "heldUntil",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_fc491dd378b9448655c3c683f85",
|
|
"def": "CREATE UNIQUE INDEX \"PK_fc491dd378b9448655c3c683f85\" ON public.instance_ai_observation_locks USING btree (\"observationScopeId\", \"taskKind\")",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"columns": [
|
|
"observationScopeId",
|
|
"taskKind"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_instance_ai_observation_locks_taskKind",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((\"taskKind\")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[])))",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskKind"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_locks_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_locks_heldUntil_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"heldUntil\"",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"heldUntil"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_locks_holderId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"holderId\"",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"holderId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_locks_observationScopeId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"observationScopeId\"",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_locks_taskKind_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"taskKind\"",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskKind"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_observation_locks_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_103e2e5f454860b28ea05a82c74",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_fc491dd378b9448655c3c683f85",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"observationScopeId\", \"taskKind\")",
|
|
"table": "public.instance_ai_observation_locks",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"observationScopeId",
|
|
"taskKind"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_pending_confirmations",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "requestId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "HITL confirmation request identifier."
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "Instance AI thread that owns the confirmation."
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "User who is expected to confirm or cancel."
|
|
},
|
|
{
|
|
"name": "kind",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"comment": "'suspended' (resumable from checkpoint) or 'inline' (orchestrator-held Promise)."
|
|
},
|
|
{
|
|
"name": "runId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "External run ID; reused on resume for SSE correlation."
|
|
},
|
|
{
|
|
"name": "toolCallId",
|
|
"type": "varchar(64)",
|
|
"nullable": true,
|
|
"comment": "Suspended tool call awaiting confirmation."
|
|
},
|
|
{
|
|
"name": "messageGroupId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "SSE event correlation group."
|
|
},
|
|
{
|
|
"name": "checkpointKey",
|
|
"type": "varchar(255)",
|
|
"nullable": true,
|
|
"comment": "FK to instance_ai_checkpoints.key; also the SDK runId used to resume."
|
|
},
|
|
{
|
|
"name": "checkpointTaskId",
|
|
"type": "varchar(36)",
|
|
"nullable": true,
|
|
"comment": "Set when the suspended run was a planned-task checkpoint follow-up."
|
|
},
|
|
{
|
|
"name": "expiresAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": true,
|
|
"comment": "TTL for the leader-only sweep; null disables auto-expiry."
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_25c38179c8d45095b168adfff80",
|
|
"def": "CREATE UNIQUE INDEX \"PK_25c38179c8d45095b168adfff80\" ON public.instance_ai_pending_confirmations USING btree (\"requestId\")",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"requestId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_ba67ee8dc311830a2eea89b6e9",
|
|
"def": "CREATE INDEX \"IDX_ba67ee8dc311830a2eea89b6e9\" ON public.instance_ai_pending_confirmations USING btree (\"threadId\")",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_df5fd25c8bbfd2b042602600d8",
|
|
"def": "CREATE INDEX \"IDX_df5fd25c8bbfd2b042602600d8\" ON public.instance_ai_pending_confirmations USING btree (\"userId\")",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_0babdf6e3b897a86fe4678355e",
|
|
"def": "CREATE INDEX \"IDX_0babdf6e3b897a86fe4678355e\" ON public.instance_ai_pending_confirmations USING btree (\"checkpointKey\")",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"checkpointKey"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_d7a4aba7440449865e2b924377",
|
|
"def": "CREATE INDEX \"IDX_d7a4aba7440449865e2b924377\" ON public.instance_ai_pending_confirmations USING btree (\"expiresAt\")",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"expiresAt"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_instance_ai_pending_confirmations_kind",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((kind)::text = ANY ((ARRAY['suspended'::character varying, 'inline'::character varying])::text[])))",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"kind"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_kind_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL kind",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"kind"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_requestId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"requestId\"",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"requestId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_runId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"runId\"",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"runId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_pending_confirmations_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_df5fd25c8bbfd2b042602600d8e",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_ba67ee8dc311830a2eea89b6e96",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_0babdf6e3b897a86fe4678355eb",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"checkpointKey\") REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "public.instance_ai_checkpoints",
|
|
"columns": [
|
|
"checkpointKey"
|
|
],
|
|
"referenced_columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_25c38179c8d45095b168adfff80",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"requestId\")",
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"requestId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.mcp_registry_server",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "slug",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(50)",
|
|
"nullable": false,
|
|
"comment": "Server status in the MCP registry. Deprecated servers are not surfaced to users."
|
|
},
|
|
{
|
|
"name": "version",
|
|
"type": "varchar(50)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "registryUpdatedAt",
|
|
"type": "timestamp(3) without time zone",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "json",
|
|
"nullable": false,
|
|
"default": "'{}'::json",
|
|
"comment": "JSON object containing server metadata (icons, remotes, tools, etc.)"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_12fd89a1fb8489513b0a91f5d31",
|
|
"def": "CREATE UNIQUE INDEX \"PK_12fd89a1fb8489513b0a91f5d31\" ON public.mcp_registry_server USING btree (slug)",
|
|
"table": "public.mcp_registry_server",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_tmp_mcp_registry_server_status",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'deprecated'::character varying])::text[])))",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_data_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL data",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_registryUpdatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"registryUpdatedAt\"",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"registryUpdatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_slug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL slug",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "tmp_mcp_registry_server_version_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL version",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"version"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_12fd89a1fb8489513b0a91f5d31",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (slug)",
|
|
"table": "public.mcp_registry_server",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"slug"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_files",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(16)",
|
|
"nullable": false,
|
|
"comment": "Application-generated n8n nano ID"
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this uploaded file"
|
|
},
|
|
{
|
|
"name": "binaryDataId",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"comment": "Opaque BinaryDataService reference (mode-prefixed, e.g. \"filesystem-v2:\u003cuuid\u003e\"); not an FK to binary_data, which only has rows in DB storage mode"
|
|
},
|
|
{
|
|
"name": "fileName",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "mimeType",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "fileSizeBytes",
|
|
"type": "integer",
|
|
"nullable": false,
|
|
"comment": "Uploaded file size in bytes"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_692920e59217af7d124cd95106f",
|
|
"def": "CREATE UNIQUE INDEX \"PK_692920e59217af7d124cd95106f\" ON public.agent_files USING btree (id)",
|
|
"table": "public.agent_files",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_45dafc48fe2ce95eac30fc8ffd",
|
|
"def": "CREATE INDEX \"IDX_45dafc48fe2ce95eac30fc8ffd\" ON public.agent_files USING btree (\"agentId\", \"createdAt\")",
|
|
"table": "public.agent_files",
|
|
"columns": [
|
|
"agentId",
|
|
"createdAt"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_files_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_binaryDataId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"binaryDataId\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"binaryDataId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_fileName_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"fileName\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"fileName"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_fileSizeBytes_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"fileSizeBytes\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"fileSizeBytes"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_mimeType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"mimeType\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"mimeType"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_files_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_aca4514cb500494b64356c2e164",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_692920e59217af7d124cd95106f",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agent_files",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_task_definition",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "varchar(32)",
|
|
"nullable": false,
|
|
"comment": "Application-generated task ID referenced from agent JSON config"
|
|
},
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Owning agent; task definitions are deleted when the agent is deleted"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "objective",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"comment": "User-authored instruction sent to the agent when this task runs"
|
|
},
|
|
{
|
|
"name": "cronExpression",
|
|
"type": "varchar(128)",
|
|
"nullable": false,
|
|
"comment": "Cron schedule evaluated using the instance timezone"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_1756c11c637903e97629a7a784a",
|
|
"def": "CREATE UNIQUE INDEX \"PK_1756c11c637903e97629a7a784a\" ON public.agent_task_definition USING btree (id)",
|
|
"table": "public.agent_task_definition",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_f45d0535a2ed59b6c2dd6da98a",
|
|
"def": "CREATE INDEX \"IDX_f45d0535a2ed59b6c2dd6da98a\" ON public.agent_task_definition USING btree (\"agentId\")",
|
|
"table": "public.agent_task_definition",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_task_definition_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_definition_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_definition_cronExpression_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"cronExpression\"",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"cronExpression"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_definition_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_definition_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_definition_objective_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL objective",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"objective"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_definition_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_f45d0535a2ed59b6c2dd6da98a0",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_1756c11c637903e97629a7a784a",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.agent_task_definition",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_task_snapshot",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "versionId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Published agent_history version this task snapshot belongs to"
|
|
},
|
|
{
|
|
"name": "taskId",
|
|
"type": "varchar(32)",
|
|
"nullable": false,
|
|
"comment": "Stable task ID referenced from the published agent JSON config"
|
|
},
|
|
{
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"nullable": false,
|
|
"comment": "Published enabled state for this task at publish time"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "varchar(128)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "objective",
|
|
"type": "text",
|
|
"nullable": false,
|
|
"comment": "User-authored instruction sent to the agent when this task runs"
|
|
},
|
|
{
|
|
"name": "cronExpression",
|
|
"type": "varchar(128)",
|
|
"nullable": false,
|
|
"comment": "Cron schedule evaluated using the instance timezone"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_2142a8bcda2360c3c5e34f82640",
|
|
"def": "CREATE UNIQUE INDEX \"PK_2142a8bcda2360c3c5e34f82640\" ON public.agent_task_snapshot USING btree (\"versionId\", \"taskId\")",
|
|
"table": "public.agent_task_snapshot",
|
|
"columns": [
|
|
"versionId",
|
|
"taskId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_task_snapshot_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_cronExpression_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"cronExpression\"",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"cronExpression"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_enabled_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL enabled",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"enabled"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_name_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL name",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_objective_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL objective",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"objective"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_taskId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"taskId\"",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_snapshot_versionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"versionId\"",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1acedce6690392ef1611cca8b88",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"versionId\") REFERENCES agent_history(\"versionId\") ON DELETE CASCADE",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "public.agent_history",
|
|
"columns": [
|
|
"versionId"
|
|
],
|
|
"referenced_columns": [
|
|
"versionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_2142a8bcda2360c3c5e34f82640",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"versionId\", \"taskId\")",
|
|
"table": "public.agent_task_snapshot",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"versionId",
|
|
"taskId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_task_run_lock",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Published agent whose scheduled task run is locked"
|
|
},
|
|
{
|
|
"name": "taskId",
|
|
"type": "varchar(32)",
|
|
"nullable": false,
|
|
"comment": "Published task ID whose scheduled run is locked"
|
|
},
|
|
{
|
|
"name": "holderId",
|
|
"type": "uuid",
|
|
"nullable": false,
|
|
"comment": "Ephemeral lock owner token generated by the running main"
|
|
},
|
|
{
|
|
"name": "heldUntil",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"comment": "Time after which another main can claim this task run lock"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_f593adaf7230e964d3c25deda64",
|
|
"def": "CREATE UNIQUE INDEX \"PK_f593adaf7230e964d3c25deda64\" ON public.agent_task_run_lock USING btree (\"agentId\", \"taskId\")",
|
|
"table": "public.agent_task_run_lock",
|
|
"columns": [
|
|
"agentId",
|
|
"taskId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "agent_task_run_lock_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_run_lock_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_run_lock_heldUntil_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"heldUntil\"",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"heldUntil"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_run_lock_holderId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"holderId\"",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"holderId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_run_lock_taskId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"taskId\"",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"taskId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_task_run_lock_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_b57a2862ae869aab24e54cefd48",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_f593adaf7230e964d3c25deda64",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"taskId\")",
|
|
"table": "public.agent_task_run_lock",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"taskId"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.instance_ai_mcp_registry_connections",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "credentialId",
|
|
"type": "varchar(36)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "serverSlug",
|
|
"type": "varchar(255)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "toolFilter",
|
|
"type": "json",
|
|
"nullable": true,
|
|
"comment": "Optional MCP tool filter per registry connection: { mode: \"allow\" | \"exclude\", tools: string[] }"
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"type": "uuid",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_e34e4d15d78eabbe8217e33ef03",
|
|
"def": "CREATE UNIQUE INDEX \"PK_e34e4d15d78eabbe8217e33ef03\" ON public.instance_ai_mcp_registry_connections USING btree (id)",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_16db3adb7b19df1ee55ff06b27",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_16db3adb7b19df1ee55ff06b27\" ON public.instance_ai_mcp_registry_connections USING btree (\"userId\", \"serverSlug\", \"credentialId\")",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"columns": [
|
|
"userId",
|
|
"serverSlug",
|
|
"credentialId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "instance_ai_mcp_registry_connections_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_mcp_registry_connections_credentialId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"credentialId\"",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialId"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_mcp_registry_connections_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_mcp_registry_connections_serverSlug_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"serverSlug\"",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"serverSlug"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_mcp_registry_connections_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "instance_ai_mcp_registry_connections_userId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"userId\"",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"userId"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_8b42c08a531d76410980c639a5b",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "public.user",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1e826120e7e53ebc4681f026de8",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "public.credentials_entity",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_1d25707354d2012da256eb2ec0a",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"serverSlug\") REFERENCES mcp_registry_server(slug) ON DELETE CASCADE",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "public.mcp_registry_server",
|
|
"columns": [
|
|
"serverSlug"
|
|
],
|
|
"referenced_columns": [
|
|
"slug"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_e34e4d15d78eabbe8217e33ef03",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.workflow_publication_outbox",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"type": "integer",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "workflowId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "References workflow_entity.id."
|
|
},
|
|
{
|
|
"name": "publishedVersionId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "References workflow_history.versionId."
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "varchar(20)",
|
|
"nullable": false
|
|
},
|
|
{
|
|
"name": "errorMessage",
|
|
"type": "text",
|
|
"nullable": true,
|
|
"comment": "Error details for surfacing failed publications to the user."
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_b3e2eeee36a4bd044d56468d311",
|
|
"def": "CREATE UNIQUE INDEX \"PK_b3e2eeee36a4bd044d56468d311\" ON public.workflow_publication_outbox USING btree (id)",
|
|
"table": "public.workflow_publication_outbox",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "IDX_workflow_publication_outbox_active_workflow_status",
|
|
"def": "CREATE UNIQUE INDEX \"IDX_workflow_publication_outbox_active_workflow_status\" ON public.workflow_publication_outbox USING btree (\"workflowId\", status) WHERE ((status)::text = ANY ((ARRAY['pending'::character varying, 'in_progress'::character varying])::text[]))",
|
|
"table": "public.workflow_publication_outbox",
|
|
"columns": [
|
|
"workflowId",
|
|
"status"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_workflow_publication_outbox_status",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((status)::text = ANY ((ARRAY['pending'::character varying, 'in_progress'::character varying, 'completed'::character varying, 'partial_success'::character varying, 'failed'::character varying])::text[])))",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publication_outbox_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publication_outbox_id_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL id",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publication_outbox_publishedVersionId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"publishedVersionId\"",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"publishedVersionId"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publication_outbox_status_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL status",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"status"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publication_outbox_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "workflow_publication_outbox_workflowId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"workflowId\"",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"workflowId"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_b3e2eeee36a4bd044d56468d311",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (id)",
|
|
"table": "public.workflow_publication_outbox",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "public.agent_chat_subscriptions",
|
|
"type": "BASE TABLE",
|
|
"columns": [
|
|
{
|
|
"name": "agentId",
|
|
"type": "varchar(36)",
|
|
"nullable": false,
|
|
"comment": "Agent that owns this subscription"
|
|
},
|
|
{
|
|
"name": "integrationType",
|
|
"type": "varchar(64)",
|
|
"nullable": false,
|
|
"comment": "Chat integration platform for this subscription"
|
|
},
|
|
{
|
|
"name": "credentialId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "Credential connection that owns this subscription"
|
|
},
|
|
{
|
|
"name": "threadId",
|
|
"type": "varchar(255)",
|
|
"nullable": false,
|
|
"comment": "Platform thread ID the agent is subscribed to"
|
|
},
|
|
{
|
|
"name": "createdAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
},
|
|
{
|
|
"name": "updatedAt",
|
|
"type": "timestamp(3) with time zone",
|
|
"nullable": false,
|
|
"default": "CURRENT_TIMESTAMP(3)"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "PK_76598cf91038bee1f3ac94c94bc",
|
|
"def": "CREATE UNIQUE INDEX \"PK_76598cf91038bee1f3ac94c94bc\" ON public.agent_chat_subscriptions USING btree (\"agentId\", \"integrationType\", \"credentialId\", \"threadId\")",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"columns": [
|
|
"agentId",
|
|
"integrationType",
|
|
"credentialId",
|
|
"threadId"
|
|
]
|
|
}
|
|
],
|
|
"constraints": [
|
|
{
|
|
"name": "CHK_agent_chat_subscriptions_integrationType",
|
|
"type": "CHECK",
|
|
"def": "CHECK (((\"integrationType\")::text = ANY ((ARRAY['telegram'::character varying, 'slack'::character varying, 'linear'::character varying])::text[])))",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"integrationType"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_chat_subscriptions_agentId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"agentId\"",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_chat_subscriptions_createdAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"createdAt\"",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"createdAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_chat_subscriptions_credentialId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"credentialId\"",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"credentialId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_chat_subscriptions_integrationType_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"integrationType\"",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"integrationType"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_chat_subscriptions_threadId_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"threadId\"",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"threadId"
|
|
]
|
|
},
|
|
{
|
|
"name": "agent_chat_subscriptions_updatedAt_not_null",
|
|
"type": "n",
|
|
"def": "NOT NULL \"updatedAt\"",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"updatedAt"
|
|
]
|
|
},
|
|
{
|
|
"name": "FK_e79153bd179c011e779d5016796",
|
|
"type": "FOREIGN KEY",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "public.agents",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"referenced_columns": [
|
|
"id"
|
|
]
|
|
},
|
|
{
|
|
"name": "PK_76598cf91038bee1f3ac94c94bc",
|
|
"type": "PRIMARY KEY",
|
|
"def": "PRIMARY KEY (\"agentId\", \"integrationType\", \"credentialId\", \"threadId\")",
|
|
"table": "public.agent_chat_subscriptions",
|
|
"referenced_table": "",
|
|
"columns": [
|
|
"agentId",
|
|
"integrationType",
|
|
"credentialId",
|
|
"threadId"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"relations": [
|
|
{
|
|
"table": "public.credentials_entity",
|
|
"columns": [
|
|
"resolverId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.dynamic_credential_resolver",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"resolverId\") REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.execution_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_entity",
|
|
"columns": [
|
|
"activeVersionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_history",
|
|
"parent_columns": [
|
|
"versionId"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"activeVersionId\") REFERENCES workflow_history(\"versionId\") ON DELETE RESTRICT"
|
|
},
|
|
{
|
|
"table": "public.workflow_entity",
|
|
"columns": [
|
|
"parentFolderId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.folder",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"parentFolderId\") REFERENCES folder(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.webhook_entity",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflows_tags",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflows_tags",
|
|
"columns": [
|
|
"tagId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.tag_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"tagId\") REFERENCES tag_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.user",
|
|
"columns": [
|
|
"roleSlug"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.role",
|
|
"parent_columns": [
|
|
"slug"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"roleSlug\") REFERENCES role(slug)"
|
|
},
|
|
{
|
|
"table": "public.installed_nodes",
|
|
"columns": [
|
|
"package"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.installed_packages",
|
|
"parent_columns": [
|
|
"packageName"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (package) REFERENCES installed_packages(\"packageName\") ON UPDATE CASCADE ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.auth_identity",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id)"
|
|
},
|
|
{
|
|
"table": "public.variables",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.execution_data",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"cardinality": "zero_or_one",
|
|
"parent_table": "public.execution_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_history",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.project",
|
|
"columns": [
|
|
"creatorId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"creatorId\") REFERENCES \"user\"(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.project_relation",
|
|
"columns": [
|
|
"role"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.role",
|
|
"parent_columns": [
|
|
"slug"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (role) REFERENCES role(slug)"
|
|
},
|
|
{
|
|
"table": "public.shared_credentials",
|
|
"columns": [
|
|
"credentialsId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"credentialsId\") REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.shared_credentials",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.shared_workflow",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.shared_workflow",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.execution_metadata",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.execution_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.execution_annotations",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.execution_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.execution_annotation_tags",
|
|
"columns": [
|
|
"annotationId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.execution_annotations",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"annotationId\") REFERENCES execution_annotations(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.execution_annotation_tags",
|
|
"columns": [
|
|
"tagId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.annotation_tag_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"tagId\") REFERENCES annotation_tag_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.user_api_keys",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.processed_data",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.folder",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.folder",
|
|
"columns": [
|
|
"parentFolderId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.folder",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"parentFolderId\") REFERENCES folder(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.folder_tag",
|
|
"columns": [
|
|
"tagId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.tag_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"tagId\") REFERENCES tag_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.folder_tag",
|
|
"columns": [
|
|
"folderId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.folder",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"folderId\") REFERENCES folder(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.insights_metadata",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.insights_metadata",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.insights_raw",
|
|
"columns": [
|
|
"metaId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.insights_metadata",
|
|
"parent_columns": [
|
|
"metaId"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"metaId\") REFERENCES insights_metadata(\"metaId\") ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.insights_by_period",
|
|
"columns": [
|
|
"metaId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.insights_metadata",
|
|
"parent_columns": [
|
|
"metaId"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"metaId\") REFERENCES insights_metadata(\"metaId\") ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.evaluation_config",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"evaluationConfigId\") REFERENCES evaluation_config(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.test_run",
|
|
"columns": [
|
|
"collectionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.evaluation_collection",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"collectionId\") REFERENCES evaluation_collection(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.test_case_execution",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.execution_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.test_case_execution",
|
|
"columns": [
|
|
"testRunId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.test_run",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"testRunId\") REFERENCES test_run(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.role_scope",
|
|
"columns": [
|
|
"scopeSlug"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.scope",
|
|
"parent_columns": [
|
|
"slug"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"scopeSlug\") REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.role_scope",
|
|
"columns": [
|
|
"roleSlug"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.role",
|
|
"parent_columns": [
|
|
"slug"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"roleSlug\") REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.data_table",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.data_table_column",
|
|
"columns": [
|
|
"dataTableId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.data_table",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"dataTableId\") REFERENCES data_table(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"ownerId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"ownerId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_sessions",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"executionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.execution_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"executionId\") REFERENCES execution_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"sessionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_sessions",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"sessionId\") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"revisionOfMessageId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_messages",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"revisionOfMessageId\") REFERENCES chat_hub_messages(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"retryOfMessageId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_messages",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"retryOfMessageId\") REFERENCES chat_hub_messages(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"previousMessageId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_messages",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"previousMessageId\") REFERENCES chat_hub_messages(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_messages",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES chat_hub_agents(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_agents",
|
|
"columns": [
|
|
"ownerId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"ownerId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_agents",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.oauth_authorization_codes",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_authorization_codes",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.oauth_clients",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_access_tokens",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_access_tokens",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.oauth_clients",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_refresh_tokens",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_refresh_tokens",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.oauth_clients",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_user_consents",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.oauth_user_consents",
|
|
"columns": [
|
|
"clientId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.oauth_clients",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"clientId\") REFERENCES oauth_clients(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_dependency",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_publish_history",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.workflow_publish_history",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_publish_history",
|
|
"columns": [
|
|
"versionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_history",
|
|
"parent_columns": [
|
|
"versionId"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"versionId\") REFERENCES workflow_history(\"versionId\") ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.dynamic_credential_user_entry",
|
|
"columns": [
|
|
"resolverId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.dynamic_credential_resolver",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"resolverId\") REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.project_secrets_provider_access",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.project_secrets_provider_access",
|
|
"columns": [
|
|
"secretsProviderConnectionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.secrets_provider_connection",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"secretsProviderConnectionId\") REFERENCES secrets_provider_connection(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_published_version",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_one",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE RESTRICT"
|
|
},
|
|
{
|
|
"table": "public.workflow_published_version",
|
|
"columns": [
|
|
"publishedVersionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_history",
|
|
"parent_columns": [
|
|
"versionId"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"publishedVersionId\") REFERENCES workflow_history(\"versionId\") ON DELETE RESTRICT"
|
|
},
|
|
{
|
|
"table": "public.dynamic_credential_entry",
|
|
"columns": [
|
|
"credential_id"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.dynamic_credential_entry",
|
|
"columns": [
|
|
"resolver_id"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.dynamic_credential_resolver",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_tools",
|
|
"columns": [
|
|
"ownerId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"ownerId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_session_tools",
|
|
"columns": [
|
|
"sessionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_sessions",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"sessionId\") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_session_tools",
|
|
"columns": [
|
|
"toolId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_tools",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"toolId\") REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_agent_tools",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES chat_hub_agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.chat_hub_agent_tools",
|
|
"columns": [
|
|
"toolId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.chat_hub_tools",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"toolId\") REFERENCES chat_hub_tools(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_builder_session",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.workflow_builder_session",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.role_mapping_rule",
|
|
"columns": [
|
|
"role"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.role",
|
|
"parent_columns": [
|
|
"slug"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.role_mapping_rule_project",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.role_mapping_rule_project",
|
|
"columns": [
|
|
"roleMappingRuleId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.role_mapping_rule",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"roleMappingRuleId\") REFERENCES role_mapping_rule(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.credential_dependency",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_threads",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_messages",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_observational_memory",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_run_snapshots",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_iteration_logs",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.trusted_key",
|
|
"columns": [
|
|
"sourceId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.trusted_key_source",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"sourceId\") REFERENCES trusted_key_source(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.user_favorites",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_one",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.ai_builder_temporary_workflow",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.evaluation_config",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.evaluation_collection",
|
|
"columns": [
|
|
"createdById"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"createdById\") REFERENCES \"user\"(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.evaluation_collection",
|
|
"columns": [
|
|
"workflowId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.workflow_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"workflowId\") REFERENCES workflow_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.evaluation_collection",
|
|
"columns": [
|
|
"evaluationConfigId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.evaluation_config",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"evaluationConfigId\") REFERENCES evaluation_config(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents",
|
|
"columns": [
|
|
"activeVersionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agent_history",
|
|
"parent_columns": [
|
|
"versionId"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"activeVersionId\") REFERENCES agent_history(\"versionId\") ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.agent_checkpoints",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_messages",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES agents_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"projectId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.project",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"projectId\") REFERENCES project(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_execution_threads",
|
|
"columns": [
|
|
"taskVersionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agent_history",
|
|
"parent_columns": [
|
|
"versionId"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"taskVersionId\") REFERENCES agent_history(\"versionId\") ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.agent_execution",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agent_execution_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_checkpoints",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"supersededBy"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_observations",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"supersededBy\") REFERENCES agents_observations(id)"
|
|
},
|
|
{
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"parentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_observations",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"parentId\") REFERENCES agents_observations(id)"
|
|
},
|
|
{
|
|
"table": "public.agents_observations",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_observation_cursors",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_observation_cursors",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_observation_locks",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_observation_locks",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"resourceId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_resources",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"resourceId\") REFERENCES agents_resources(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entries",
|
|
"columns": [
|
|
"supersededBy"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_memory_entries",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"supersededBy\") REFERENCES agents_memory_entries(id)"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_locks",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_locks",
|
|
"columns": [
|
|
"resourceId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_resources",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"resourceId\") REFERENCES agents_resources(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"observationId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_observations",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationId\") REFERENCES agents_observations(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"memoryEntryId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_memory_entries",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"memoryEntryId\") REFERENCES agents_memory_entries(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_sources",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES agents_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agents_memory_entry_cursors",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES agents_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_history",
|
|
"columns": [
|
|
"publishedById"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"publishedById\") REFERENCES \"user\"(id) ON DELETE SET NULL"
|
|
},
|
|
{
|
|
"table": "public.agent_history",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"supersededBy"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_observations",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"supersededBy\") REFERENCES instance_ai_observations(id)"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_observations",
|
|
"columns": [
|
|
"parentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_observations",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"parentId\") REFERENCES instance_ai_observations(id)"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_observation_cursors",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_one",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_observation_locks",
|
|
"columns": [
|
|
"observationScopeId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"observationScopeId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"threadId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_threads",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"threadId\") REFERENCES instance_ai_threads(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_pending_confirmations",
|
|
"columns": [
|
|
"checkpointKey"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.instance_ai_checkpoints",
|
|
"parent_columns": [
|
|
"key"
|
|
],
|
|
"parent_cardinality": "zero_or_one",
|
|
"def": "FOREIGN KEY (\"checkpointKey\") REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_files",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_task_definition",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_task_snapshot",
|
|
"columns": [
|
|
"versionId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agent_history",
|
|
"parent_columns": [
|
|
"versionId"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"versionId\") REFERENCES agent_history(\"versionId\") ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_task_run_lock",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.user",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"userId\") REFERENCES \"user\"(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"columns": [
|
|
"credentialId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.credentials_entity",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"credentialId\") REFERENCES credentials_entity(id) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.instance_ai_mcp_registry_connections",
|
|
"columns": [
|
|
"serverSlug"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.mcp_registry_server",
|
|
"parent_columns": [
|
|
"slug"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"serverSlug\") REFERENCES mcp_registry_server(slug) ON DELETE CASCADE"
|
|
},
|
|
{
|
|
"table": "public.agent_chat_subscriptions",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"cardinality": "zero_or_more",
|
|
"parent_table": "public.agents",
|
|
"parent_columns": [
|
|
"id"
|
|
],
|
|
"parent_cardinality": "exactly_one",
|
|
"def": "FOREIGN KEY (\"agentId\") REFERENCES agents(id) ON DELETE CASCADE"
|
|
}
|
|
],
|
|
"functions": [
|
|
{
|
|
"name": "public.uuid_nil",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_ns_dns",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_ns_url",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_ns_oid",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_ns_x500",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_generate_v1",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_generate_v1mc",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_generate_v3",
|
|
"return_type": "uuid",
|
|
"arguments": "namespace uuid, name text",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_generate_v4",
|
|
"return_type": "uuid",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.uuid_generate_v5",
|
|
"return_type": "uuid",
|
|
"arguments": "namespace uuid, name text",
|
|
"type": "FUNCTION"
|
|
},
|
|
{
|
|
"name": "public.increment_workflow_version",
|
|
"return_type": "trigger",
|
|
"arguments": "",
|
|
"type": "FUNCTION"
|
|
}
|
|
],
|
|
"driver": {
|
|
"name": "postgres",
|
|
"database_version": "PostgreSQL 18.3 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 15.2.0) 15.2.0, 64-bit",
|
|
"meta": {
|
|
"current_schema": "public",
|
|
"search_paths": [
|
|
"public"
|
|
],
|
|
"dict": {
|
|
"Functions": "Stored procedures and functions"
|
|
}
|
|
}
|
|
}
|
|
}
|