From 711f8abc57eff0100a776a4eee160315643345c5 Mon Sep 17 00:00:00 2001 From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com> Date: Tue, 16 Jun 2026 14:35:33 +0300 Subject: [PATCH] chore(core): Make DB schema docs generation deterministic (#32373) --- .tbls.postgres.yml | 5 +- .tbls.sqlite.yml | 5 +- docs/generated/postgres-schema/README.md | 2228 +- .../public.agent_chat_subscriptions.md | 38 +- .../public.agent_checkpoints.md | 40 +- .../postgres-schema/public.agent_execution.md | 76 +- .../public.agent_execution_threads.md | 132 +- .../postgres-schema/public.agent_files.md | 44 +- .../postgres-schema/public.agent_history.md | 116 +- .../public.agent_task_definition.md | 40 +- .../public.agent_task_run_lock.md | 38 +- .../public.agent_task_snapshot.md | 30 +- .../postgres-schema/public.agents.md | 300 +- .../public.agents_memory_entries.md | 92 +- .../public.agents_memory_entry_cursors.md | 46 +- .../public.agents_memory_entry_locks.md | 44 +- .../public.agents_memory_entry_sources.md | 80 +- .../postgres-schema/public.agents_messages.md | 32 +- .../public.agents_observation_cursors.md | 46 +- .../public.agents_observation_locks.md | 46 +- .../public.agents_observations.md | 86 +- .../public.agents_resources.md | 26 +- .../postgres-schema/public.agents_threads.md | 126 +- .../public.ai_builder_temporary_workflow.md | 62 +- .../public.annotation_tag_entity.md | 8 +- .../postgres-schema/public.auth_identity.md | 28 +- .../public.auth_provider_sync_history.md | 26 +- .../postgres-schema/public.binary_data.md | 24 +- .../public.chat_hub_agent_tools.md | 36 +- .../postgres-schema/public.chat_hub_agents.md | 152 +- .../public.chat_hub_messages.md | 188 +- .../public.chat_hub_session_tools.md | 38 +- .../public.chat_hub_sessions.md | 184 +- .../postgres-schema/public.chat_hub_tools.md | 58 +- .../public.credential_dependency.md | 32 +- .../public.credentials_entity.md | 136 +- .../postgres-schema/public.data_table.md | 26 +- .../public.data_table_column.md | 20 +- .../postgres-schema/public.deployment_key.md | 26 +- .../public.dynamic_credential_entry.md | 38 +- .../public.dynamic_credential_resolver.md | 48 +- .../public.dynamic_credential_user_entry.md | 74 +- .../public.evaluation_collection.md | 162 +- .../public.evaluation_config.md | 122 +- .../public.event_destinations.md | 10 +- .../public.execution_annotation_tags.md | 18 +- .../public.execution_annotations.md | 48 +- .../postgres-schema/public.execution_data.md | 22 +- .../public.execution_entity.md | 152 +- .../public.execution_metadata.md | 26 +- .../postgres-schema/public.folder.md | 70 +- .../postgres-schema/public.folder_tag.md | 12 +- .../public.insights_by_period.md | 18 +- .../public.insights_metadata.md | 92 +- .../postgres-schema/public.insights_raw.md | 14 +- .../postgres-schema/public.installed_nodes.md | 18 +- .../public.installed_packages.md | 18 +- .../public.instance_ai_checkpoints.md | 54 +- .../public.instance_ai_iteration_logs.md | 28 +- ...ic.instance_ai_mcp_registry_connections.md | 58 +- .../public.instance_ai_messages.md | 32 +- .../public.instance_ai_observation_cursors.md | 22 +- .../public.instance_ai_observation_locks.md | 22 +- ...public.instance_ai_observational_memory.md | 108 +- .../public.instance_ai_observations.md | 34 +- ...ublic.instance_ai_pending_confirmations.md | 90 +- .../public.instance_ai_resources.md | 14 +- .../public.instance_ai_run_snapshots.md | 42 +- .../public.instance_ai_threads.md | 230 +- .../public.instance_ai_workflow_snapshots.md | 24 +- .../public.instance_version_history.md | 6 +- .../public.invalid_auth_token.md | 6 +- .../public.mcp_registry_server.md | 24 +- .../public.oauth_access_tokens.md | 36 +- .../public.oauth_authorization_codes.md | 60 +- .../postgres-schema/public.oauth_clients.md | 66 +- .../public.oauth_refresh_tokens.md | 48 +- .../public.oauth_user_consents.md | 58 +- .../postgres-schema/public.processed_data.md | 36 +- .../postgres-schema/public.project.md | 226 +- .../public.project_relation.md | 80 +- .../public.project_secrets_provider_access.md | 46 +- docs/generated/postgres-schema/public.role.md | 76 +- .../public.role_mapping_rule.md | 32 +- .../public.role_mapping_rule_project.md | 40 +- .../postgres-schema/public.role_scope.md | 22 +- .../generated/postgres-schema/public.scope.md | 10 +- .../public.secrets_provider_connection.md | 22 +- .../postgres-schema/public.settings.md | 6 +- .../public.shared_credentials.md | 30 +- .../postgres-schema/public.shared_workflow.md | 72 +- .../postgres-schema/public.tag_entity.md | 20 +- .../public.test_case_execution.md | 98 +- .../postgres-schema/public.test_run.md | 174 +- .../public.token_exchange_jti.md | 10 +- .../postgres-schema/public.trusted_key.md | 24 +- .../public.trusted_key_source.md | 24 +- docs/generated/postgres-schema/public.user.md | 426 +- .../postgres-schema/public.user_api_keys.md | 50 +- .../postgres-schema/public.user_favorites.md | 32 +- .../postgres-schema/public.variables.md | 24 +- .../postgres-schema/public.webhook_entity.md | 40 +- .../public.workflow_builder_session.md | 90 +- .../public.workflow_dependency.md | 60 +- .../postgres-schema/public.workflow_entity.md | 380 +- .../public.workflow_history.md | 84 +- .../public.workflow_publication_outbox.md | 16 +- .../public.workflow_publish_history.md | 118 +- .../public.workflow_published_version.md | 72 +- .../public.workflow_statistics.md | 12 +- .../postgres-schema/public.workflows_tags.md | 62 +- docs/generated/postgres-schema/schema.json | 19049 ---------------- docs/generated/sqlite-schema/README.md | 2278 +- .../sqlite-schema/agent_chat_subscriptions.md | 46 +- .../sqlite-schema/agent_checkpoints.md | 36 +- .../sqlite-schema/agent_execution.md | 76 +- .../sqlite-schema/agent_execution_threads.md | 128 +- docs/generated/sqlite-schema/agent_files.md | 40 +- docs/generated/sqlite-schema/agent_history.md | 112 +- .../sqlite-schema/agent_task_definition.md | 36 +- .../sqlite-schema/agent_task_run_lock.md | 38 +- .../sqlite-schema/agent_task_snapshot.md | 30 +- docs/generated/sqlite-schema/agents.md | 302 +- .../sqlite-schema/agents_memory_entries.md | 80 +- .../agents_memory_entry_cursors.md | 42 +- .../agents_memory_entry_locks.md | 40 +- .../agents_memory_entry_sources.md | 72 +- .../sqlite-schema/agents_messages.md | 26 +- .../agents_observation_cursors.md | 42 +- .../sqlite-schema/agents_observation_locks.md | 46 +- .../sqlite-schema/agents_observations.md | 84 +- .../sqlite-schema/agents_resources.md | 24 +- .../generated/sqlite-schema/agents_threads.md | 124 +- .../ai_builder_temporary_workflow.md | 62 +- .../sqlite-schema/annotation_tag_entity.md | 4 +- docs/generated/sqlite-schema/auth_identity.md | 28 +- .../auth_provider_sync_history.md | 24 +- docs/generated/sqlite-schema/binary_data.md | 22 +- .../sqlite-schema/chat_hub_agent_tools.md | 36 +- .../sqlite-schema/chat_hub_agents.md | 140 +- .../sqlite-schema/chat_hub_messages.md | 172 +- .../sqlite-schema/chat_hub_session_tools.md | 36 +- .../sqlite-schema/chat_hub_sessions.md | 180 +- .../generated/sqlite-schema/chat_hub_tools.md | 54 +- .../sqlite-schema/credential_dependency.md | 34 +- .../sqlite-schema/credentials_entity.md | 130 +- docs/generated/sqlite-schema/data_table.md | 26 +- .../sqlite-schema/data_table_column.md | 20 +- .../generated/sqlite-schema/deployment_key.md | 20 +- .../sqlite-schema/dynamic_credential_entry.md | 40 +- .../dynamic_credential_resolver.md | 46 +- .../dynamic_credential_user_entry.md | 70 +- .../sqlite-schema/evaluation_collection.md | 156 +- .../sqlite-schema/evaluation_config.md | 116 +- .../sqlite-schema/event_destinations.md | 8 +- .../execution_annotation_tags.md | 16 +- .../sqlite-schema/execution_annotations.md | 44 +- .../generated/sqlite-schema/execution_data.md | 22 +- .../sqlite-schema/execution_entity.md | 152 +- .../sqlite-schema/execution_metadata.md | 22 +- docs/generated/sqlite-schema/folder.md | 48 +- docs/generated/sqlite-schema/folder_tag.md | 8 +- .../sqlite-schema/insights_by_period.md | 14 +- .../sqlite-schema/insights_metadata.md | 86 +- docs/generated/sqlite-schema/insights_raw.md | 10 +- .../sqlite-schema/installed_nodes.md | 16 +- .../sqlite-schema/installed_packages.md | 16 +- .../sqlite-schema/instance_ai_checkpoints.md | 58 +- .../instance_ai_iteration_logs.md | 28 +- .../instance_ai_mcp_registry_connections.md | 52 +- .../sqlite-schema/instance_ai_messages.md | 34 +- .../instance_ai_observation_cursors.md | 24 +- .../instance_ai_observation_locks.md | 30 +- .../instance_ai_observational_memory.md | 110 +- .../sqlite-schema/instance_ai_observations.md | 34 +- .../instance_ai_pending_confirmations.md | 88 +- .../sqlite-schema/instance_ai_resources.md | 12 +- .../instance_ai_run_snapshots.md | 42 +- .../sqlite-schema/instance_ai_threads.md | 228 +- .../instance_ai_workflow_snapshots.md | 22 +- .../sqlite-schema/instance_version_history.md | 4 +- .../sqlite-schema/invalid_auth_token.md | 6 +- .../sqlite-schema/mcp_registry_server.md | 24 +- .../sqlite-schema/oauth_access_tokens.md | 32 +- .../oauth_authorization_codes.md | 56 +- docs/generated/sqlite-schema/oauth_clients.md | 72 +- .../sqlite-schema/oauth_refresh_tokens.md | 44 +- .../sqlite-schema/oauth_user_consents.md | 52 +- .../generated/sqlite-schema/processed_data.md | 40 +- docs/generated/sqlite-schema/project.md | 220 +- .../sqlite-schema/project_relation.md | 78 +- .../project_secrets_provider_access.md | 46 +- docs/generated/sqlite-schema/role.md | 72 +- .../sqlite-schema/role_mapping_rule.md | 30 +- .../role_mapping_rule_project.md | 38 +- docs/generated/sqlite-schema/role_scope.md | 18 +- docs/generated/sqlite-schema/schema.json | 13672 ----------- docs/generated/sqlite-schema/scope.md | 8 +- .../secrets_provider_connection.md | 18 +- docs/generated/sqlite-schema/settings.md | 4 +- .../sqlite-schema/shared_credentials.md | 30 +- .../sqlite-schema/shared_workflow.md | 68 +- docs/generated/sqlite-schema/tag_entity.md | 16 +- .../sqlite-schema/test_case_execution.md | 104 +- docs/generated/sqlite-schema/test_run.md | 170 +- .../sqlite-schema/token_exchange_jti.md | 8 +- docs/generated/sqlite-schema/trusted_key.md | 24 +- .../sqlite-schema/trusted_key_source.md | 22 +- docs/generated/sqlite-schema/user.md | 402 +- docs/generated/sqlite-schema/user_api_keys.md | 52 +- .../generated/sqlite-schema/user_favorites.md | 24 +- docs/generated/sqlite-schema/variables.md | 18 +- .../generated/sqlite-schema/webhook_entity.md | 14 +- .../sqlite-schema/workflow_builder_session.md | 88 +- .../sqlite-schema/workflow_dependency.md | 62 +- .../sqlite-schema/workflow_entity.md | 388 +- .../sqlite-schema/workflow_history.md | 100 +- .../workflow_publication_outbox.md | 14 +- .../sqlite-schema/workflow_publish_history.md | 112 +- .../workflow_published_version.md | 70 +- .../sqlite-schema/workflow_statistics.md | 8 +- .../generated/sqlite-schema/workflows_tags.md | 58 +- 222 files changed, 9180 insertions(+), 41895 deletions(-) delete mode 100644 docs/generated/postgres-schema/schema.json delete mode 100644 docs/generated/sqlite-schema/schema.json diff --git a/.tbls.postgres.yml b/.tbls.postgres.yml index be771c158f2..c28046997c5 100644 --- a/.tbls.postgres.yml +++ b/.tbls.postgres.yml @@ -5,11 +5,14 @@ desc: Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by h dsn: ${TBLS_DSN} docPath: docs/generated/postgres-schema +# Skip the machine-readable schema.json dump; only the Markdown docs are committed. +disableOutputSchema: true + er: format: mermaid format: - sortTablesByName: true + sort: true # The migrations bookkeeping table is operational noise, not part of the schema. exclude: diff --git a/.tbls.sqlite.yml b/.tbls.sqlite.yml index b5d764905eb..8cacced947c 100644 --- a/.tbls.sqlite.yml +++ b/.tbls.sqlite.yml @@ -5,11 +5,14 @@ desc: Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand. dsn: ${TBLS_DSN} docPath: docs/generated/sqlite-schema +# Skip the machine-readable schema.json dump; only the Markdown docs are committed. +disableOutputSchema: true + er: format: mermaid format: - sortTablesByName: true + sort: true # The migrations bookkeeping table is operational noise, not part of the schema. exclude: diff --git a/docs/generated/postgres-schema/README.md b/docs/generated/postgres-schema/README.md index f251ea11f23..9429468078f 100644 --- a/docs/generated/postgres-schema/README.md +++ b/docs/generated/postgres-schema/README.md @@ -8,184 +8,177 @@ Auto-generated from the PostgreSQL migrations in @n8n/db. Do not edit by hand. | Name | Columns | Comment | Type | | ---- | ------- | ------- | ---- | -| [public.credentials_entity](public.credentials_entity.md) | 11 | | BASE TABLE | -| [public.execution_entity](public.execution_entity.md) | 17 | | BASE TABLE | -| [public.workflow_entity](public.workflow_entity.md) | 20 | | BASE TABLE | -| [public.webhook_entity](public.webhook_entity.md) | 6 | | BASE TABLE | -| [public.tag_entity](public.tag_entity.md) | 4 | | BASE TABLE | -| [public.workflows_tags](public.workflows_tags.md) | 2 | | BASE TABLE | -| [public.user](public.user.md) | 15 | | BASE TABLE | -| [public.settings](public.settings.md) | 3 | | BASE TABLE | -| [public.installed_packages](public.installed_packages.md) | 6 | | BASE TABLE | -| [public.installed_nodes](public.installed_nodes.md) | 4 | | BASE TABLE | -| [public.workflow_statistics](public.workflow_statistics.md) | 7 | | BASE TABLE | -| [public.event_destinations](public.event_destinations.md) | 4 | | BASE TABLE | -| [public.auth_identity](public.auth_identity.md) | 5 | | BASE TABLE | -| [public.auth_provider_sync_history](public.auth_provider_sync_history.md) | 11 | | BASE TABLE | -| [public.variables](public.variables.md) | 5 | | BASE TABLE | -| [public.execution_data](public.execution_data.md) | 4 | | BASE TABLE | -| [public.workflow_history](public.workflow_history.md) | 11 | | BASE TABLE | -| [public.project](public.project.md) | 9 | | BASE TABLE | -| [public.project_relation](public.project_relation.md) | 5 | | BASE TABLE | -| [public.shared_credentials](public.shared_credentials.md) | 5 | | BASE TABLE | -| [public.shared_workflow](public.shared_workflow.md) | 5 | | BASE TABLE | -| [public.execution_metadata](public.execution_metadata.md) | 4 | | BASE TABLE | -| [public.invalid_auth_token](public.invalid_auth_token.md) | 2 | | BASE TABLE | -| [public.execution_annotations](public.execution_annotations.md) | 6 | | BASE TABLE | -| [public.annotation_tag_entity](public.annotation_tag_entity.md) | 4 | | BASE TABLE | -| [public.execution_annotation_tags](public.execution_annotation_tags.md) | 2 | | BASE TABLE | -| [public.user_api_keys](public.user_api_keys.md) | 9 | | BASE TABLE | -| [public.processed_data](public.processed_data.md) | 5 | | BASE TABLE | -| [public.folder](public.folder.md) | 6 | | BASE TABLE | -| [public.folder_tag](public.folder_tag.md) | 2 | | BASE TABLE | -| [public.insights_metadata](public.insights_metadata.md) | 5 | | BASE TABLE | -| [public.insights_raw](public.insights_raw.md) | 5 | | BASE TABLE | -| [public.insights_by_period](public.insights_by_period.md) | 6 | | BASE TABLE | -| [public.test_run](public.test_run.md) | 16 | | BASE TABLE | -| [public.test_case_execution](public.test_case_execution.md) | 14 | | BASE TABLE | -| [public.scope](public.scope.md) | 3 | | BASE TABLE | -| [public.role](public.role.md) | 7 | | BASE TABLE | -| [public.role_scope](public.role_scope.md) | 2 | | BASE TABLE | -| [public.data_table](public.data_table.md) | 5 | | BASE TABLE | -| [public.data_table_column](public.data_table_column.md) | 7 | | BASE TABLE | -| [public.chat_hub_sessions](public.chat_hub_sessions.md) | 13 | | BASE TABLE | -| [public.chat_hub_messages](public.chat_hub_messages.md) | 17 | | BASE TABLE | -| [public.chat_hub_agents](public.chat_hub_agents.md) | 13 | | BASE TABLE | -| [public.oauth_clients](public.oauth_clients.md) | 9 | | BASE TABLE | -| [public.oauth_authorization_codes](public.oauth_authorization_codes.md) | 13 | | BASE TABLE | -| [public.oauth_access_tokens](public.oauth_access_tokens.md) | 3 | | BASE TABLE | -| [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) | 7 | | BASE TABLE | -| [public.oauth_user_consents](public.oauth_user_consents.md) | 4 | | BASE TABLE | -| [public.workflow_dependency](public.workflow_dependency.md) | 9 | | BASE TABLE | -| [public.binary_data](public.binary_data.md) | 9 | | BASE TABLE | -| [public.workflow_publish_history](public.workflow_publish_history.md) | 6 | | BASE TABLE | -| [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | 6 | | BASE TABLE | -| [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) | 6 | | BASE TABLE | -| [public.secrets_provider_connection](public.secrets_provider_connection.md) | 7 | | BASE TABLE | -| [public.project_secrets_provider_access](public.project_secrets_provider_access.md) | 5 | | BASE TABLE | -| [public.workflow_published_version](public.workflow_published_version.md) | 4 | | BASE TABLE | -| [public.dynamic_credential_entry](public.dynamic_credential_entry.md) | 6 | | BASE TABLE | -| [public.chat_hub_tools](public.chat_hub_tools.md) | 9 | | BASE TABLE | -| [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | 2 | | BASE TABLE | -| [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) | 2 | | BASE TABLE | -| [public.workflow_builder_session](public.workflow_builder_session.md) | 9 | | BASE TABLE | -| [public.role_mapping_rule](public.role_mapping_rule.md) | 7 | | BASE TABLE | -| [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | 2 | | BASE TABLE | -| [public.credential_dependency](public.credential_dependency.md) | 5 | | BASE TABLE | -| [public.instance_version_history](public.instance_version_history.md) | 5 | | BASE TABLE | -| [public.instance_ai_threads](public.instance_ai_threads.md) | 7 | | BASE TABLE | -| [public.instance_ai_messages](public.instance_ai_messages.md) | 8 | | BASE TABLE | -| [public.instance_ai_resources](public.instance_ai_resources.md) | 5 | | BASE TABLE | -| [public.instance_ai_observational_memory](public.instance_ai_observational_memory.md) | 32 | | BASE TABLE | -| [public.instance_ai_workflow_snapshots](public.instance_ai_workflow_snapshots.md) | 7 | | BASE TABLE | -| [public.instance_ai_run_snapshots](public.instance_ai_run_snapshots.md) | 11 | | BASE TABLE | -| [public.instance_ai_iteration_logs](public.instance_ai_iteration_logs.md) | 6 | | BASE TABLE | -| [public.token_exchange_jti](public.token_exchange_jti.md) | 3 | | BASE TABLE | -| [public.trusted_key_source](public.trusted_key_source.md) | 8 | | BASE TABLE | -| [public.trusted_key](public.trusted_key.md) | 4 | | BASE TABLE | -| [public.user_favorites](public.user_favorites.md) | 4 | | BASE TABLE | -| [public.deployment_key](public.deployment_key.md) | 7 | | BASE TABLE | -| [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) | 4 | | BASE TABLE | -| [public.evaluation_config](public.evaluation_config.md) | 12 | | BASE TABLE | -| [public.evaluation_collection](public.evaluation_collection.md) | 9 | | BASE TABLE | -| [public.agents](public.agents.md) | 12 | | BASE TABLE | +| [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) | 6 | | BASE TABLE | | [public.agent_checkpoints](public.agent_checkpoints.md) | 6 | | BASE TABLE | -| [public.agents_resources](public.agents_resources.md) | 4 | | BASE TABLE | -| [public.agents_threads](public.agents_threads.md) | 6 | | BASE TABLE | -| [public.agents_messages](public.agents_messages.md) | 8 | | BASE TABLE | -| [public.agent_execution_threads](public.agent_execution_threads.md) | 17 | | BASE TABLE | | [public.agent_execution](public.agent_execution.md) | 20 | | BASE TABLE | -| [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) | 8 | | BASE TABLE | -| [public.agents_observations](public.agents_observations.md) | 11 | | BASE TABLE | -| [public.agents_observation_cursors](public.agents_observation_cursors.md) | 6 | | BASE TABLE | -| [public.agents_observation_locks](public.agents_observation_locks.md) | 7 | | BASE TABLE | +| [public.agent_execution_threads](public.agent_execution_threads.md) | 17 | | BASE TABLE | +| [public.agent_files](public.agent_files.md) | 8 | | BASE TABLE | +| [public.agent_history](public.agent_history.md) | 9 | | BASE TABLE | +| [public.agent_task_definition](public.agent_task_definition.md) | 7 | | BASE TABLE | +| [public.agent_task_run_lock](public.agent_task_run_lock.md) | 6 | | BASE TABLE | +| [public.agent_task_snapshot](public.agent_task_snapshot.md) | 8 | | BASE TABLE | +| [public.agents](public.agents.md) | 12 | | BASE TABLE | | [public.agents_memory_entries](public.agents_memory_entries.md) | 13 | | BASE TABLE | +| [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) | 6 | | BASE TABLE | | [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) | 6 | | BASE TABLE | | [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | 9 | | BASE TABLE | -| [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) | 6 | | BASE TABLE | -| [public.agent_history](public.agent_history.md) | 9 | | BASE TABLE | -| [public.instance_ai_observations](public.instance_ai_observations.md) | 10 | | BASE TABLE | +| [public.agents_messages](public.agents_messages.md) | 8 | | BASE TABLE | +| [public.agents_observation_cursors](public.agents_observation_cursors.md) | 6 | | BASE TABLE | +| [public.agents_observation_locks](public.agents_observation_locks.md) | 7 | | BASE TABLE | +| [public.agents_observations](public.agents_observations.md) | 11 | | BASE TABLE | +| [public.agents_resources](public.agents_resources.md) | 4 | | BASE TABLE | +| [public.agents_threads](public.agents_threads.md) | 6 | | BASE TABLE | +| [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) | 4 | | BASE TABLE | +| [public.annotation_tag_entity](public.annotation_tag_entity.md) | 4 | | BASE TABLE | +| [public.auth_identity](public.auth_identity.md) | 5 | | BASE TABLE | +| [public.auth_provider_sync_history](public.auth_provider_sync_history.md) | 11 | | BASE TABLE | +| [public.binary_data](public.binary_data.md) | 9 | | BASE TABLE | +| [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) | 2 | | BASE TABLE | +| [public.chat_hub_agents](public.chat_hub_agents.md) | 13 | | BASE TABLE | +| [public.chat_hub_messages](public.chat_hub_messages.md) | 17 | | BASE TABLE | +| [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | 2 | | BASE TABLE | +| [public.chat_hub_sessions](public.chat_hub_sessions.md) | 13 | | BASE TABLE | +| [public.chat_hub_tools](public.chat_hub_tools.md) | 9 | | BASE TABLE | +| [public.credential_dependency](public.credential_dependency.md) | 5 | | BASE TABLE | +| [public.credentials_entity](public.credentials_entity.md) | 11 | | BASE TABLE | +| [public.data_table](public.data_table.md) | 5 | | BASE TABLE | +| [public.data_table_column](public.data_table_column.md) | 7 | | BASE TABLE | +| [public.deployment_key](public.deployment_key.md) | 7 | | BASE TABLE | +| [public.dynamic_credential_entry](public.dynamic_credential_entry.md) | 6 | | BASE TABLE | +| [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | 6 | | BASE TABLE | +| [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) | 6 | | BASE TABLE | +| [public.evaluation_collection](public.evaluation_collection.md) | 9 | | BASE TABLE | +| [public.evaluation_config](public.evaluation_config.md) | 12 | | BASE TABLE | +| [public.event_destinations](public.event_destinations.md) | 4 | | BASE TABLE | +| [public.execution_annotation_tags](public.execution_annotation_tags.md) | 2 | | BASE TABLE | +| [public.execution_annotations](public.execution_annotations.md) | 6 | | BASE TABLE | +| [public.execution_data](public.execution_data.md) | 4 | | BASE TABLE | +| [public.execution_entity](public.execution_entity.md) | 17 | | BASE TABLE | +| [public.execution_metadata](public.execution_metadata.md) | 4 | | BASE TABLE | +| [public.folder](public.folder.md) | 6 | | BASE TABLE | +| [public.folder_tag](public.folder_tag.md) | 2 | | BASE TABLE | +| [public.insights_by_period](public.insights_by_period.md) | 6 | | BASE TABLE | +| [public.insights_metadata](public.insights_metadata.md) | 5 | | BASE TABLE | +| [public.insights_raw](public.insights_raw.md) | 5 | | BASE TABLE | +| [public.installed_nodes](public.installed_nodes.md) | 4 | | BASE TABLE | +| [public.installed_packages](public.installed_packages.md) | 6 | | BASE TABLE | +| [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) | 8 | | BASE TABLE | +| [public.instance_ai_iteration_logs](public.instance_ai_iteration_logs.md) | 6 | | BASE TABLE | +| [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | 7 | | BASE TABLE | +| [public.instance_ai_messages](public.instance_ai_messages.md) | 8 | | BASE TABLE | | [public.instance_ai_observation_cursors](public.instance_ai_observation_cursors.md) | 5 | | BASE TABLE | | [public.instance_ai_observation_locks](public.instance_ai_observation_locks.md) | 6 | | BASE TABLE | +| [public.instance_ai_observational_memory](public.instance_ai_observational_memory.md) | 32 | | BASE TABLE | +| [public.instance_ai_observations](public.instance_ai_observations.md) | 10 | | BASE TABLE | | [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | 12 | | BASE TABLE | +| [public.instance_ai_resources](public.instance_ai_resources.md) | 5 | | BASE TABLE | +| [public.instance_ai_run_snapshots](public.instance_ai_run_snapshots.md) | 11 | | BASE TABLE | +| [public.instance_ai_threads](public.instance_ai_threads.md) | 7 | | BASE TABLE | +| [public.instance_ai_workflow_snapshots](public.instance_ai_workflow_snapshots.md) | 7 | | BASE TABLE | +| [public.instance_version_history](public.instance_version_history.md) | 5 | | BASE TABLE | +| [public.invalid_auth_token](public.invalid_auth_token.md) | 2 | | BASE TABLE | | [public.mcp_registry_server](public.mcp_registry_server.md) | 7 | | BASE TABLE | -| [public.agent_files](public.agent_files.md) | 8 | | BASE TABLE | -| [public.agent_task_definition](public.agent_task_definition.md) | 7 | | BASE TABLE | -| [public.agent_task_snapshot](public.agent_task_snapshot.md) | 8 | | BASE TABLE | -| [public.agent_task_run_lock](public.agent_task_run_lock.md) | 6 | | BASE TABLE | -| [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | 7 | | BASE TABLE | +| [public.oauth_access_tokens](public.oauth_access_tokens.md) | 3 | | BASE TABLE | +| [public.oauth_authorization_codes](public.oauth_authorization_codes.md) | 13 | | BASE TABLE | +| [public.oauth_clients](public.oauth_clients.md) | 9 | | BASE TABLE | +| [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) | 7 | | BASE TABLE | +| [public.oauth_user_consents](public.oauth_user_consents.md) | 4 | | BASE TABLE | +| [public.processed_data](public.processed_data.md) | 5 | | BASE TABLE | +| [public.project](public.project.md) | 9 | | BASE TABLE | +| [public.project_relation](public.project_relation.md) | 5 | | BASE TABLE | +| [public.project_secrets_provider_access](public.project_secrets_provider_access.md) | 5 | | BASE TABLE | +| [public.role](public.role.md) | 7 | | BASE TABLE | +| [public.role_mapping_rule](public.role_mapping_rule.md) | 7 | | BASE TABLE | +| [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | 2 | | BASE TABLE | +| [public.role_scope](public.role_scope.md) | 2 | | BASE TABLE | +| [public.scope](public.scope.md) | 3 | | BASE TABLE | +| [public.secrets_provider_connection](public.secrets_provider_connection.md) | 7 | | BASE TABLE | +| [public.settings](public.settings.md) | 3 | | BASE TABLE | +| [public.shared_credentials](public.shared_credentials.md) | 5 | | BASE TABLE | +| [public.shared_workflow](public.shared_workflow.md) | 5 | | BASE TABLE | +| [public.tag_entity](public.tag_entity.md) | 4 | | BASE TABLE | +| [public.test_case_execution](public.test_case_execution.md) | 14 | | BASE TABLE | +| [public.test_run](public.test_run.md) | 16 | | BASE TABLE | +| [public.token_exchange_jti](public.token_exchange_jti.md) | 3 | | BASE TABLE | +| [public.trusted_key](public.trusted_key.md) | 4 | | BASE TABLE | +| [public.trusted_key_source](public.trusted_key_source.md) | 8 | | BASE TABLE | +| [public.user](public.user.md) | 15 | | BASE TABLE | +| [public.user_api_keys](public.user_api_keys.md) | 9 | | BASE TABLE | +| [public.user_favorites](public.user_favorites.md) | 4 | | BASE TABLE | +| [public.variables](public.variables.md) | 5 | | BASE TABLE | +| [public.webhook_entity](public.webhook_entity.md) | 6 | | BASE TABLE | +| [public.workflow_builder_session](public.workflow_builder_session.md) | 9 | | BASE TABLE | +| [public.workflow_dependency](public.workflow_dependency.md) | 9 | | BASE TABLE | +| [public.workflow_entity](public.workflow_entity.md) | 20 | | BASE TABLE | +| [public.workflow_history](public.workflow_history.md) | 11 | | BASE TABLE | | [public.workflow_publication_outbox](public.workflow_publication_outbox.md) | 7 | | BASE TABLE | -| [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) | 6 | | BASE TABLE | +| [public.workflow_publish_history](public.workflow_publish_history.md) | 6 | | BASE TABLE | +| [public.workflow_published_version](public.workflow_published_version.md) | 4 | | BASE TABLE | +| [public.workflow_statistics](public.workflow_statistics.md) | 7 | | BASE TABLE | +| [public.workflows_tags](public.workflows_tags.md) | 2 | | BASE TABLE | ## Stored procedures and functions | Name | ReturnType | Arguments | Type | | ---- | ------- | ------- | ---- | -| public.uuid_nil | uuid | | FUNCTION | -| public.uuid_ns_dns | uuid | | FUNCTION | -| public.uuid_ns_url | uuid | | FUNCTION | -| public.uuid_ns_oid | uuid | | FUNCTION | -| public.uuid_ns_x500 | uuid | | FUNCTION | +| public.increment_workflow_version | trigger | | FUNCTION | | public.uuid_generate_v1 | uuid | | FUNCTION | | public.uuid_generate_v1mc | uuid | | FUNCTION | | public.uuid_generate_v3 | uuid | namespace uuid, name text | FUNCTION | | public.uuid_generate_v4 | uuid | | FUNCTION | | public.uuid_generate_v5 | uuid | namespace uuid, name text | FUNCTION | -| public.increment_workflow_version | trigger | | FUNCTION | +| public.uuid_nil | uuid | | FUNCTION | +| public.uuid_ns_dns | uuid | | FUNCTION | +| public.uuid_ns_oid | uuid | | FUNCTION | +| public.uuid_ns_url | uuid | | FUNCTION | +| public.uuid_ns_x500 | uuid | | FUNCTION | ## Relations ```mermaid erDiagram -"public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL" -"public.execution_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflow_entity" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" -"public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" -"public.webhook_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflows_tags" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" -"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)" -"public.installed_nodes" }o--|| "public.installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages(#quot;packageName#quot;) ON UPDATE CASCADE ON DELETE CASCADE" +"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE" +"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" +"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE" +"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" +"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE" +"public.agents_memory_entries" }o--o| "public.agents_memory_entries" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_memory_entries(id)" +"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_locks" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents_memory_entries" : "FOREIGN KEY (#quot;memoryEntryId#quot;) REFERENCES agents_memory_entries(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_messages" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_observation_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_observation_locks" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_observations(id)" +"public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES agents_observations(id)" +"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.ai_builder_temporary_workflow" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.auth_identity" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id)" -"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" -"public.workflow_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.project_relation" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug)" -"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.execution_metadata" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" -"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" -"public.execution_annotation_tags" }o--|| "public.execution_annotations" : "FOREIGN KEY (#quot;annotationId#quot;) REFERENCES execution_annotations(id) ON DELETE CASCADE" -"public.execution_annotation_tags" }o--|| "public.annotation_tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES annotation_tag_entity(id) ON DELETE CASCADE" -"public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.processed_data" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.folder" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" -"public.folder_tag" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" -"public.folder_tag" }o--|| "public.folder" : "FOREIGN KEY (#quot;folderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" -"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" -"public.insights_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE SET NULL" -"public.insights_raw" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" -"public.insights_by_period" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" -"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL" -"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL" -"public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" -"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE" -"public.role_scope" }o--|| "public.scope" : "FOREIGN KEY (#quot;scopeSlug#quot;) REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE" -"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" -"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.data_table_column" }o--|| "public.data_table" : "FOREIGN KEY (#quot;dataTableId#quot;) REFERENCES data_table(id) ON DELETE CASCADE" -"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_sessions" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" -"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" -"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" +"public.chat_hub_agent_tools" }o--|| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE CASCADE" +"public.chat_hub_agent_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" +"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.chat_hub_agents" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" "public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" "public.chat_hub_messages" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" "public.chat_hub_messages" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" @@ -193,1126 +186,1133 @@ erDiagram "public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;retryOfMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;previousMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" -"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_agents" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" -"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" +"public.chat_hub_session_tools" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" +"public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" +"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.chat_hub_sessions" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" +"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" +"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL" +"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.data_table_column" }o--|| "public.data_table" : "FOREIGN KEY (#quot;dataTableId#quot;) REFERENCES data_table(id) ON DELETE CASCADE" +"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" +"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.evaluation_collection" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE" +"public.evaluation_config" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.execution_annotation_tags" }o--|| "public.execution_annotations" : "FOREIGN KEY (#quot;annotationId#quot;) REFERENCES execution_annotations(id) ON DELETE CASCADE" +"public.execution_annotation_tags" }o--|| "public.annotation_tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES annotation_tag_entity(id) ON DELETE CASCADE" +"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" +"public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" +"public.execution_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.execution_metadata" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" +"public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.folder" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" +"public.folder_tag" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" +"public.folder_tag" }o--|| "public.folder" : "FOREIGN KEY (#quot;folderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" +"public.insights_by_period" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" +"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.insights_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE SET NULL" +"public.insights_raw" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" +"public.installed_nodes" }o--|| "public.installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages(#quot;packageName#quot;) ON UPDATE CASCADE ON DELETE CASCADE" +"public.instance_ai_checkpoints" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.instance_ai_mcp_registry_connections" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.instance_ai_mcp_registry_connections" }o--|| "public.mcp_registry_server" : "FOREIGN KEY (#quot;serverSlug#quot;) REFERENCES mcp_registry_server(slug) ON DELETE CASCADE" +"public.instance_ai_messages" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_observation_cursors" |o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_observation_locks" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL" +"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_observations" }o--o| "public.instance_ai_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES instance_ai_observations(id)" +"public.instance_ai_observations" }o--o| "public.instance_ai_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES instance_ai_observations(id)" +"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.instance_ai_pending_confirmations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_pending_confirmations" }o--o| "public.instance_ai_checkpoints" : "FOREIGN KEY (#quot;checkpointKey#quot;) REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE" +"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_access_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" +"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" "public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_refresh_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" "public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_user_consents" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" -"public.workflow_dependency" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.workflow_publish_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflow_publish_history" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE SET NULL" -"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" +"public.processed_data" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.project_relation" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug)" "public.project_secrets_provider_access" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE" -"public.workflow_published_version" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT" -"public.workflow_published_version" }o--|| "public.workflow_history" : "FOREIGN KEY (#quot;publishedVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" -"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" -"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_session_tools" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" -"public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" -"public.chat_hub_agent_tools" }o--|| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE CASCADE" -"public.chat_hub_agent_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" -"public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.workflow_builder_session" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" "public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE" -"public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.instance_ai_messages" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL" -"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.role_scope" }o--|| "public.scope" : "FOREIGN KEY (#quot;scopeSlug#quot;) REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE" +"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" +"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" +"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE" +"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL" +"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL" "public.trusted_key" }o--|| "public.trusted_key_source" : "FOREIGN KEY (#quot;sourceId#quot;) REFERENCES trusted_key_source(id) ON DELETE CASCADE" +"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)" +"public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.user_favorites" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.ai_builder_temporary_workflow" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.evaluation_config" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.evaluation_collection" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE" -"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" -"public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_messages" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" -"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE" -"public.instance_ai_checkpoints" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_observations(id)" -"public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES agents_observations(id)" -"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_observation_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_observation_locks" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE" -"public.agents_memory_entries" }o--o| "public.agents_memory_entries" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_memory_entries(id)" -"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entry_locks" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE" -"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(id) ON DELETE CASCADE" -"public.agents_memory_entry_sources" }o--|| "public.agents_memory_entries" : "FOREIGN KEY (#quot;memoryEntryId#quot;) REFERENCES agents_memory_entries(id) ON DELETE CASCADE" -"public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entry_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_observations" }o--o| "public.instance_ai_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES instance_ai_observations(id)" -"public.instance_ai_observations" }o--o| "public.instance_ai_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES instance_ai_observations(id)" -"public.instance_ai_observation_cursors" |o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_observation_locks" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.instance_ai_pending_confirmations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_pending_confirmations" }o--o| "public.instance_ai_checkpoints" : "FOREIGN KEY (#quot;checkpointKey#quot;) REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE" -"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE" -"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.instance_ai_mcp_registry_connections" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.instance_ai_mcp_registry_connections" }o--|| "public.mcp_registry_server" : "FOREIGN KEY (#quot;serverSlug#quot;) REFERENCES mcp_registry_server(slug) ON DELETE CASCADE" -"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.webhook_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.workflow_builder_session" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_dependency" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_entity" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" +"public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" +"public.workflow_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.workflow_publish_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_publish_history" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE SET NULL" +"public.workflow_published_version" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT" +"public.workflow_published_version" }o--|| "public.workflow_history" : "FOREIGN KEY (#quot;publishedVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" +"public.workflows_tags" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" -"public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type +"public.agent_chat_subscriptions" { + varchar_36_ agentId FK timestamp_3__with_time_zone createdAt + varchar_255_ credentialId + varchar_64_ integrationType + varchar_255_ threadId timestamp_3__with_time_zone updatedAt - varchar_36_ id - boolean isManaged - boolean isGlobal - boolean isResolvable - boolean resolvableAllowFallback - varchar_16_ resolverId FK } -"public.execution_entity" { - integer id - boolean finished - varchar mode - varchar retryOf - varchar retrySuccessId +"public.agent_checkpoints" { + varchar_255_ agentId FK + timestamp_3__with_time_zone createdAt + boolean expired + varchar_255_ runId + text state + timestamp_3__with_time_zone updatedAt +} +"public.agent_execution" { + text assistantResponse + integer completionTokens + double_precision cost + timestamp_3__with_time_zone createdAt + integer duration + text error + varchar_16_ hitlStatus + varchar_36_ id + varchar_255_ model + integer promptTokens + varchar_32_ source timestamp_3__with_time_zone startedAt + varchar_16_ status timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill - varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt - varchar_2_ storedAt - json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes - varchar_36_ workflowVersionId -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt + varchar_128_ threadId FK + json timeline + json toolCalls + integer totalTokens timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description + text userMessage +} +"public.agent_execution_threads" { + varchar_36_ agentId FK + varchar_255_ agentName + timestamp_3__with_time_zone createdAt + varchar_8_ emoji + varchar_128_ id + varchar_36_ parentAgentId + varchar_128_ parentThreadId + varchar_255_ projectId FK + integer sessionNumber + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title + integer totalCompletionTokens + double_precision totalCost + integer totalDuration + integer totalPromptTokens + timestamp_3__with_time_zone updatedAt +} +"public.agent_files" { + varchar_36_ agentId FK + text binaryDataId + timestamp_3__with_time_zone createdAt + varchar_255_ fileName + integer fileSizeBytes + varchar_16_ id + varchar_255_ mimeType + timestamp_3__with_time_zone updatedAt +} +"public.agent_history" { + varchar_36_ agentId FK + varchar_255_ author + timestamp_3__with_time_zone createdAt + uuid publishedById FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.agent_task_definition" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_128_ cronExpression + varchar_32_ id + varchar_128_ name + text objective + timestamp_3__with_time_zone updatedAt +} +"public.agent_task_run_lock" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + uuid holderId + varchar_32_ taskId + timestamp_3__with_time_zone updatedAt +} +"public.agent_task_snapshot" { + timestamp_3__with_time_zone createdAt + varchar_128_ cronExpression + boolean enabled + varchar_128_ name + text objective + varchar_32_ taskId + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId FK +} +"public.agents" { varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId -} -"public.webhook_entity" { - varchar webhookPath - varchar method - varchar node - varchar webhookId - integer pathLength - varchar_36_ workflowId FK -} -"public.tag_entity" { - varchar_24_ name timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_512_ description varchar_36_ id -} -"public.workflows_tags" { - varchar_36_ workflowId FK - varchar_36_ tagId FK -} -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK -} -"public.settings" { - varchar_255_ key - text value - boolean loadOnStartup -} -"public.installed_packages" { - varchar_214_ packageName - varchar_50_ installedVersion - varchar_70_ authorName - varchar_70_ authorEmail - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.installed_nodes" { - varchar_200_ name - varchar_200_ type - integer latestVersion - varchar_241_ package FK -} -"public.workflow_statistics" { - bigint count - timestamp_3__with_time_zone latestEvent + json integrations varchar_128_ name - varchar_36_ workflowId - bigint rootCount - integer id - varchar_128_ workflowName + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } -"public.event_destinations" { - uuid id - jsonb destination +"public.agents_memory_entries" { + varchar_36_ agentId FK + text content + varchar_64_ contentHash timestamp_3__with_time_zone createdAt + json embedding + varchar_128_ embeddingModel + varchar_36_ id + timestamp_3__with_time_zone lastSeenAt + json metadata + varchar_255_ resourceId FK + varchar_16_ status + varchar_36_ supersededBy FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_cursors" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_locks" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ resourceId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_sources" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_64_ evidenceHash + text evidenceText + varchar_36_ id + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_messages" { + json content + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_255_ resourceId + varchar_36_ role + varchar_255_ threadId FK + varchar_36_ type + timestamp_3__with_time_zone updatedAt +} +"public.agents_observation_cursors" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_observation_locks" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ observationScopeId FK + varchar_20_ taskKind + timestamp_3__with_time_zone updatedAt +} +"public.agents_observations" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_16_ marker + varchar_255_ observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + text text + integer tokenCount + timestamp_3__with_time_zone updatedAt +} +"public.agents_resources" { + timestamp_3__with_time_zone createdAt + varchar_255_ id + text metadata + timestamp_3__with_time_zone updatedAt +} +"public.agents_threads" { + timestamp_3__with_time_zone createdAt + varchar_128_ id + text metadata + varchar_255_ resourceId + varchar_255_ title + timestamp_3__with_time_zone updatedAt +} +"public.ai_builder_temporary_workflow" { + timestamp_3__with_time_zone createdAt + uuid threadId FK + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.annotation_tag_entity" { + timestamp_3__with_time_zone createdAt + varchar_16_ id + varchar_24_ name timestamp_3__with_time_zone updatedAt } "public.auth_identity" { - uuid userId FK + timestamp_3__with_time_zone createdAt varchar_255_ providerId varchar_32_ providerType - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.auth_provider_sync_history" { + integer created + integer disabled + timestamp_3__with_time_zone endedAt + text error integer id varchar_32_ providerType text runMode - text status - timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone endedAt integer scanned - integer created + timestamp_3__with_time_zone startedAt + text status integer updated - integer disabled - text error } -"public.variables" { - varchar_50_ key - varchar_50_ type - text value - varchar_36_ id - varchar_36_ projectId FK -} -"public.execution_data" { - integer executionId FK - json workflowData - text data - varchar_36_ workflowVersionId -} -"public.workflow_history" { - varchar_36_ versionId - varchar_36_ workflowId FK - varchar_255_ authors +"public.binary_data" { timestamp_3__with_time_zone createdAt + bytea data + uuid fileId + varchar_255_ fileName + integer fileSize + varchar_255_ mimeType + varchar_255_ sourceId + varchar_50_ sourceType timestamp_3__with_time_zone updatedAt - json nodes - json connections - varchar_128_ name - boolean autosaved - text description - json nodeGroups } -"public.project" { - varchar_36_ id - varchar_255_ name - varchar_36_ type +"public.chat_hub_agent_tools" { + uuid agentId FK + uuid toolId FK +} +"public.chat_hub_agents" { timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon + varchar_36_ credentialId FK varchar_512_ description - uuid creatorId FK - json customTelemetryTags -} -"public.project_relation" { - varchar_36_ projectId FK - uuid userId FK - varchar role FK - timestamp_3__with_time_zone createdAt + json files + json icon + uuid id + varchar_64_ model + varchar_256_ name + uuid ownerId FK + varchar_16_ provider + json suggestedPrompts + text systemPrompt timestamp_3__with_time_zone updatedAt } -"public.shared_credentials" { - varchar_36_ credentialsId FK - varchar_36_ projectId FK - text role +"public.chat_hub_messages" { + uuid agentId FK + json attachments + text content timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.shared_workflow" { - varchar_36_ workflowId FK - varchar_36_ projectId FK - text role - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.execution_metadata" { - integer id integer executionId FK - varchar_255_ key + uuid id + varchar_256_ model + varchar_128_ name + uuid previousMessageId FK + varchar_16_ provider + uuid retryOfMessageId FK + uuid revisionOfMessageId FK + uuid sessionId FK + varchar_16_ status + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_session_tools" { + uuid sessionId FK + uuid toolId FK +} +"public.chat_hub_sessions" { + uuid agentId FK + varchar_128_ agentName + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_tools" { + timestamp_3__with_time_zone createdAt + json definition + boolean enabled + uuid id + varchar_255_ name + uuid ownerId FK + varchar_255_ type + double_precision typeVersion + timestamp_3__with_time_zone updatedAt +} +"public.credential_dependency" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_255_ dependencyId + varchar_64_ dependencyType + integer id +} +"public.credentials_entity" { + timestamp_3__with_time_zone createdAt + text data + varchar_36_ id + boolean isGlobal + boolean isManaged + boolean isResolvable + varchar_128_ name + boolean resolvableAllowFallback + varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt +} +"public.data_table" { + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_128_ name + varchar_36_ projectId FK + timestamp_3__with_time_zone updatedAt +} +"public.data_table_column" { + timestamp_3__with_time_zone createdAt + varchar_36_ dataTableId FK + varchar_36_ id + integer index + varchar_128_ name + varchar_32_ type + timestamp_3__with_time_zone updatedAt +} +"public.deployment_key" { + varchar_20_ algorithm + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_20_ status + varchar_64_ type + timestamp_3__with_time_zone updatedAt text value } -"public.invalid_auth_token" { - varchar_512_ token - timestamp_3__with_time_zone expiresAt -} -"public.execution_annotations" { - integer id - integer executionId FK - varchar_6_ vote - text note +"public.dynamic_credential_entry" { timestamp_3__with_time_zone createdAt + varchar_16_ credential_id FK + text data + varchar_16_ resolver_id FK + varchar_2048_ subject_id timestamp_3__with_time_zone updatedAt } -"public.annotation_tag_entity" { - varchar_16_ id - varchar_24_ name +"public.dynamic_credential_resolver" { + text config timestamp_3__with_time_zone createdAt + varchar_16_ id + varchar_128_ name + varchar_128_ type + timestamp_3__with_time_zone updatedAt +} +"public.dynamic_credential_user_entry" { + timestamp_3__with_time_zone createdAt + varchar_16_ credentialId FK + text data + varchar_16_ resolverId FK + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.evaluation_collection" { + timestamp_3__with_time_zone createdAt + uuid createdById FK + text description + varchar_36_ evaluationConfigId FK + varchar_36_ id + json insightsCache + varchar_128_ name + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.evaluation_config" { + timestamp_3__with_time_zone createdAt + json datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id + varchar_64_ invalidReason + json metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.event_destinations" { + timestamp_3__with_time_zone createdAt + jsonb destination + uuid id timestamp_3__with_time_zone updatedAt } "public.execution_annotation_tags" { integer annotationId FK varchar_24_ tagId FK } -"public.user_api_keys" { - varchar_36_ id - uuid userId FK - varchar_100_ label - varchar apiKey +"public.execution_annotations" { timestamp_3__with_time_zone createdAt + integer executionId FK + integer id + text note timestamp_3__with_time_zone updatedAt - json scopes - varchar audience - timestamp_3__with_time_zone lastUsedAt + varchar_6_ vote } -"public.processed_data" { - varchar_36_ workflowId FK - varchar_255_ context +"public.execution_data" { + text data + integer executionId FK + json workflowData + varchar_36_ workflowVersionId +} +"public.execution_entity" { timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt + boolean finished + integer id + bigint jsonSizeBytes + varchar mode + varchar retryOf + varchar retrySuccessId + timestamp_3__with_time_zone startedAt + varchar status + timestamp_3__with_time_zone stoppedAt + varchar_2_ storedAt + json tracingContext + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} +"public.execution_metadata" { + integer executionId FK + integer id + varchar_255_ key text value } "public.folder" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.folder_tag" { varchar_36_ folderId FK varchar_36_ tagId FK } +"public.insights_by_period" { + integer id + integer metaId FK + timestamp_0__with_time_zone periodStart + integer periodUnit + integer type + bigint value +} "public.insights_metadata" { integer metaId - varchar_36_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName + varchar_36_ workflowId FK + varchar_128_ workflowName } "public.insights_raw" { integer id integer metaId FK - integer type - bigint value timestamp_0__with_time_zone timestamp -} -"public.insights_by_period" { - integer id - integer metaId FK integer type bigint value - integer periodUnit - timestamp_0__with_time_zone periodStart } -"public.test_run" { +"public.installed_nodes" { + integer latestVersion + varchar_200_ name + varchar_241_ package FK + varchar_200_ type +} +"public.installed_packages" { + varchar_70_ authorEmail + varchar_70_ authorName + timestamp_3__with_time_zone createdAt + varchar_50_ installedVersion + varchar_214_ packageName + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_checkpoints" { + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiredAt + varchar_255_ key + varchar_255_ resourceId + varchar_255_ runId + json state + uuid threadId FK + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_iteration_logs" { + timestamp_3__with_time_zone createdAt + text entry varchar_36_ id + varchar taskKey + uuid threadId FK + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_mcp_registry_connections" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + varchar_255_ serverSlug FK + json toolFilter + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.instance_ai_messages" { + text content + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_255_ resourceId + varchar_16_ role + uuid threadId FK + varchar_32_ type + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_observation_cursors" { + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + uuid observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_observation_locks" { + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + uuid observationScopeId FK + varchar_20_ taskKind + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_observational_memory" { + text activeObservations + json bufferedMessageIds + json bufferedObservationChunks + integer bufferedObservationTokens + text bufferedObservations + text bufferedReflection + integer bufferedReflectionInputTokens + integer bufferedReflectionTokens + text config + timestamp_3__with_time_zone createdAt + integer generationCount + varchar_36_ id + boolean isBufferingObservation + boolean isBufferingReflection + boolean isObserving + boolean isReflecting + timestamp_3__with_time_zone lastBufferedAtTime + integer lastBufferedAtTokens + timestamp_3__with_time_zone lastObservedAt + varchar_255_ lookupKey + json metadata + integer observationTokenCount + json observedMessageIds + varchar observedTimezone + varchar_32_ originType + integer pendingMessageTokens + integer reflectedObservationLineCount + varchar_255_ resourceId + varchar_16_ scope + uuid threadId FK + integer totalTokensObserved + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_observations" { + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_16_ marker + uuid observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + text text + integer tokenCount + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_pending_confirmations" { + varchar_255_ checkpointKey FK + varchar_36_ checkpointTaskId + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId + varchar_36_ runId + uuid threadId FK + varchar_64_ toolCallId + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.instance_ai_resources" { + timestamp_3__with_time_zone createdAt + varchar_255_ id + json metadata + timestamp_3__with_time_zone updatedAt + text workingMemory +} +"public.instance_ai_run_snapshots" { + timestamp_3__with_time_zone createdAt + varchar_36_ langsmithRunId + varchar_36_ langsmithTraceId + varchar_36_ messageGroupId + varchar_36_ runId + json runIds + varchar_64_ spanId + uuid threadId FK + varchar_64_ traceId + text tree + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt + uuid id + json metadata + varchar_36_ projectId FK + varchar_255_ resourceId + text title + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_workflow_snapshots" { + timestamp_3__with_time_zone createdAt + varchar_255_ resourceId + varchar_36_ runId + text snapshot + varchar status + timestamp_3__with_time_zone updatedAt + varchar_255_ workflowName +} +"public.instance_version_history" { + timestamp_3__with_time_zone createdAt + integer id + integer major + integer minor + integer patch +} +"public.invalid_auth_token" { + timestamp_3__with_time_zone expiresAt + varchar_512_ token +} +"public.mcp_registry_server" { + timestamp_3__with_time_zone createdAt + json data + timestamp_3__without_time_zone registryUpdatedAt + varchar_255_ slug + varchar_50_ status + timestamp_3__with_time_zone updatedAt + varchar_50_ version +} +"public.oauth_access_tokens" { + varchar clientId FK + varchar token + uuid userId FK +} +"public.oauth_authorization_codes" { + varchar clientId FK + varchar_255_ code + varchar codeChallenge + varchar_255_ codeChallengeMethod + timestamp_3__with_time_zone createdAt + bigint expiresAt + varchar redirectUri + varchar resource + json scope + varchar state + timestamp_3__with_time_zone updatedAt + boolean used + uuid userId FK +} +"public.oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + timestamp_3__with_time_zone createdAt + json grantTypes + varchar id + varchar_255_ name + json redirectUris + varchar_255_ tokenEndpointAuthMethod + timestamp_3__with_time_zone updatedAt +} +"public.oauth_refresh_tokens" { + varchar clientId FK + timestamp_3__with_time_zone createdAt + bigint expiresAt + json scope + varchar_255_ token + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.oauth_user_consents" { + varchar clientId FK + bigint grantedAt + integer id + uuid userId FK +} +"public.processed_data" { + varchar_255_ context + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone updatedAt + text value varchar_36_ workflowId FK - varchar status - varchar errorCode - json errorDetails - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - jsonb evaluationConfigSnapshot - varchar_36_ collectionId FK } -"public.test_case_execution" { +"public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id - varchar_36_ testRunId FK - integer executionId FK - varchar status - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - varchar errorCode - json errorDetails - json metrics - timestamp_3__with_time_zone createdAt + varchar_255_ name + varchar_36_ type timestamp_3__with_time_zone updatedAt - json inputs - json outputs - integer runIndex } -"public.scope" { - varchar_128_ slug - text displayName - text description +"public.project_relation" { + timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + varchar role FK + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.project_secrets_provider_access" { + timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + varchar_128_ role + integer secretsProviderConnectionId FK + timestamp_3__with_time_zone updatedAt } "public.role" { - varchar_128_ slug - text displayName - text description - text roleType - boolean systemRole timestamp_3__with_time_zone createdAt + text description + text displayName + text roleType + varchar_128_ slug + boolean systemRole timestamp_3__with_time_zone updatedAt } +"public.role_mapping_rule" { + timestamp_3__with_time_zone createdAt + text expression + varchar_16_ id + integer order + varchar_128_ role FK + varchar_64_ type + timestamp_3__with_time_zone updatedAt +} +"public.role_mapping_rule_project" { + varchar_36_ projectId FK + varchar_16_ roleMappingRuleId FK +} "public.role_scope" { varchar_128_ roleSlug FK varchar_128_ scopeSlug FK } -"public.data_table" { - varchar_36_ id - varchar_128_ name - varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.data_table_column" { - varchar_36_ id - varchar_128_ name - varchar_32_ type - integer index - varchar_36_ dataTableId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.chat_hub_sessions" { - uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_128_ agentName - varchar_16_ type -} -"public.chat_hub_messages" { - uuid id - uuid sessionId FK - uuid previousMessageId FK - uuid revisionOfMessageId FK - uuid retryOfMessageId FK - varchar_16_ type - varchar_128_ name - text content - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - integer executionId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_16_ status - json attachments -} -"public.chat_hub_agents" { - uuid id - varchar_256_ name - varchar_512_ description - text systemPrompt - uuid ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon - json files - json suggestedPrompts -} -"public.oauth_clients" { - varchar id - varchar_255_ name - json redirectUris - json grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt - varchar_255_ tokenEndpointAuthMethod - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.oauth_authorization_codes" { - varchar_255_ code - varchar clientId FK - uuid userId FK - varchar redirectUri - varchar codeChallenge - varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar resource - json scope -} -"public.oauth_access_tokens" { - varchar token - varchar clientId FK - uuid userId FK -} -"public.oauth_refresh_tokens" { - varchar_255_ token - varchar clientId FK - uuid userId FK - bigint expiresAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json scope -} -"public.oauth_user_consents" { - integer id - uuid userId FK - varchar clientId FK - bigint grantedAt -} -"public.workflow_dependency" { - integer id - varchar_36_ workflowId FK - integer workflowVersionId - varchar_32_ dependencyType - varchar_255_ dependencyKey - json dependencyInfo - smallint indexVersionId - timestamp_3__with_time_zone createdAt - varchar_36_ publishedVersionId -} -"public.binary_data" { - uuid fileId - varchar_50_ sourceType - varchar_255_ sourceId - bytea data - varchar_255_ mimeType - varchar_255_ fileName - integer fileSize - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.workflow_publish_history" { - integer id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - uuid userId FK - timestamp_3__with_time_zone createdAt -} -"public.dynamic_credential_resolver" { - varchar_16_ id - varchar_128_ name - varchar_128_ type - text config - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.dynamic_credential_user_entry" { - varchar_16_ credentialId FK - uuid userId FK - varchar_16_ resolverId FK - text data - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt +"public.scope" { + text description + text displayName + varchar_128_ slug } "public.secrets_provider_connection" { + timestamp_3__with_time_zone createdAt + text encryptedSettings integer id + boolean isEnabled varchar_128_ providerKey varchar_36_ type - text encryptedSettings - boolean isEnabled - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } -"public.project_secrets_provider_access" { - integer secretsProviderConnectionId FK +"public.settings" { + varchar_255_ key + boolean loadOnStartup + text value +} +"public.shared_credentials" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialsId FK varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt + text role timestamp_3__with_time_zone updatedAt - varchar_128_ role } -"public.workflow_published_version" { +"public.shared_workflow" { + timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + text role + timestamp_3__with_time_zone updatedAt varchar_36_ workflowId FK - varchar_36_ publishedVersionId FK +} +"public.tag_entity" { timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.dynamic_credential_entry" { - varchar_16_ credential_id FK - varchar_2048_ subject_id - varchar_16_ resolver_id FK - text data - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.chat_hub_tools" { - uuid id - varchar_255_ name - varchar_255_ type - double_precision typeVersion - uuid ownerId FK - json definition - boolean enabled - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.chat_hub_session_tools" { - uuid sessionId FK - uuid toolId FK -} -"public.chat_hub_agent_tools" { - uuid agentId FK - uuid toolId FK -} -"public.workflow_builder_session" { - uuid id - varchar_36_ workflowId FK - uuid userId FK - json messages - text previousSummary - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ activeVersionCardId - varchar_255_ resumeAfterRestoreMessageId -} -"public.role_mapping_rule" { - varchar_16_ id - text expression - varchar_128_ role FK - varchar_64_ type - integer order - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.role_mapping_rule_project" { - varchar_16_ roleMappingRuleId FK - varchar_36_ projectId FK -} -"public.credential_dependency" { - integer id - varchar_36_ credentialId FK - varchar_64_ dependencyType - varchar_255_ dependencyId - timestamp_3__with_time_zone createdAt -} -"public.instance_version_history" { - integer id - integer major - integer minor - integer patch - timestamp_3__with_time_zone createdAt -} -"public.instance_ai_threads" { - uuid id - varchar_255_ resourceId - text title - json metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK -} -"public.instance_ai_messages" { varchar_36_ id - uuid threadId FK - text content - varchar_16_ role - varchar_32_ type - varchar_255_ resourceId - timestamp_3__with_time_zone createdAt + varchar_24_ name timestamp_3__with_time_zone updatedAt } -"public.instance_ai_resources" { - varchar_255_ id - text workingMemory - json metadata +"public.test_case_execution" { + timestamp_3__with_time_zone completedAt timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_observational_memory" { + varchar errorCode + json errorDetails + integer executionId FK varchar_36_ id - varchar_255_ lookupKey - varchar_16_ scope - uuid threadId FK - varchar_255_ resourceId - text activeObservations - varchar_32_ originType - text config - integer generationCount - timestamp_3__with_time_zone lastObservedAt - integer pendingMessageTokens - integer totalTokensObserved - integer observationTokenCount - boolean isObserving - boolean isReflecting - json observedMessageIds - varchar observedTimezone - text bufferedObservations - integer bufferedObservationTokens - json bufferedMessageIds - text bufferedReflection - integer bufferedReflectionTokens - integer bufferedReflectionInputTokens - integer reflectedObservationLineCount - json bufferedObservationChunks - boolean isBufferingObservation - boolean isBufferingReflection - integer lastBufferedAtTokens - timestamp_3__with_time_zone lastBufferedAtTime - json metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_workflow_snapshots" { - varchar_36_ runId - varchar_255_ workflowName - varchar_255_ resourceId + json inputs + json metrics + json outputs + timestamp_3__with_time_zone runAt + integer runIndex varchar status - text snapshot - timestamp_3__with_time_zone createdAt + varchar_36_ testRunId FK timestamp_3__with_time_zone updatedAt } -"public.instance_ai_run_snapshots" { - uuid threadId FK - varchar_36_ runId - varchar_36_ messageGroupId - json runIds - text tree +"public.test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + timestamp_3__with_time_zone completedAt timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_36_ langsmithRunId - varchar_36_ langsmithTraceId - varchar_64_ traceId - varchar_64_ spanId -} -"public.instance_ai_iteration_logs" { + varchar errorCode + json errorDetails + varchar_36_ evaluationConfigId FK + jsonb evaluationConfigSnapshot varchar_36_ id - uuid threadId FK - varchar taskKey - text entry - timestamp_3__with_time_zone createdAt + json metrics + timestamp_3__with_time_zone runAt + varchar_255_ runningInstanceId + varchar status timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId } "public.token_exchange_jti" { - varchar_255_ jti + timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone expiresAt - timestamp_3__with_time_zone createdAt -} -"public.trusted_key_source" { - varchar_36_ id - varchar_32_ type - text config - varchar_32_ status - text lastError - timestamp_3__with_time_zone lastRefreshedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_255_ jti } "public.trusted_key" { - varchar_36_ sourceId FK - varchar_255_ kid - text data timestamp_3__with_time_zone createdAt + text data + varchar_255_ kid + varchar_36_ sourceId FK +} +"public.trusted_key_source" { + text config + timestamp_3__with_time_zone createdAt + varchar_36_ id + text lastError + timestamp_3__with_time_zone lastRefreshedAt + varchar_32_ status + varchar_32_ type + timestamp_3__with_time_zone updatedAt +} +"public.user" { + timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt +} +"public.user_api_keys" { + varchar apiKey + varchar audience + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_100_ label + timestamp_3__with_time_zone lastUsedAt + json scopes + timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.user_favorites" { integer id - uuid userId FK varchar_255_ resourceId varchar_64_ resourceType + uuid userId FK } -"public.deployment_key" { +"public.variables" { varchar_36_ id - varchar_64_ type + varchar_50_ key + varchar_36_ projectId FK + varchar_50_ type text value - varchar_20_ algorithm - varchar_20_ status - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt } -"public.ai_builder_temporary_workflow" { +"public.webhook_entity" { + varchar method + varchar node + integer pathLength + varchar webhookId + varchar webhookPath varchar_36_ workflowId FK - uuid threadId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt } -"public.evaluation_config" { - varchar_36_ id - varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - json datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - json metrics +"public.workflow_builder_session" { + varchar_255_ activeVersionCardId timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.evaluation_collection" { - varchar_36_ id - varchar_128_ name - text description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - uuid createdById FK - json insightsCache - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_36_ activeVersionId FK -} -"public.agent_checkpoints" { - varchar_255_ runId - varchar_255_ agentId FK - text state - boolean expired - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_resources" { - varchar_255_ id - text metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_threads" { - varchar_128_ id - varchar_255_ resourceId - varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_messages" { - varchar_36_ id - varchar_255_ threadId FK - varchar_255_ resourceId - varchar_36_ role - varchar_36_ type - json content - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_execution_threads" { - varchar_128_ id - varchar_36_ agentId FK - varchar_255_ agentName - varchar_255_ projectId FK - integer sessionNumber - integer totalPromptTokens - integer totalCompletionTokens - double_precision totalCost - integer totalDuration - varchar_255_ title - varchar_8_ emoji - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId -} -"public.agent_execution" { - varchar_36_ id - varchar_128_ threadId FK - varchar_16_ status - timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - integer duration - text userMessage - text assistantResponse - varchar_255_ model - integer promptTokens - integer completionTokens - integer totalTokens - double_precision cost - json toolCalls - json timeline - text error - varchar_16_ hitlStatus - varchar_32_ source - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_checkpoints" { - varchar_255_ key - varchar_255_ runId - uuid threadId FK - varchar_255_ resourceId - json state - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - timestamp_3__with_time_zone expiredAt -} -"public.agents_observations" { - varchar_36_ id - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_16_ marker - text text - varchar_36_ parentId FK - integer tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observation_cursors" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observation_locks" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entries" { - varchar_36_ id - varchar_36_ agentId FK - varchar_255_ resourceId FK - text content - varchar_64_ contentHash - varchar_16_ status - varchar_36_ supersededBy FK - varchar_128_ embeddingModel - json embedding - json metadata - timestamp_3__with_time_zone lastSeenAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_locks" { - varchar_36_ agentId FK - varchar_255_ resourceId FK - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_sources" { - varchar_36_ id - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - text evidenceText - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_cursors" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastIndexedObservationId - timestamp_3__with_time_zone lastIndexedObservationCreatedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_history" { - varchar_36_ versionId - varchar_36_ agentId FK - json schema - json tools - json skills - uuid publishedById FK - varchar_255_ author - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_observations" { - varchar_36_ id - uuid observationScopeId FK - varchar_16_ marker - text text - varchar_36_ parentId FK - integer tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_observation_cursors" { - uuid observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_observation_locks" { - uuid observationScopeId FK - varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_pending_confirmations" { - varchar_36_ requestId - uuid threadId FK - uuid userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId - varchar_255_ checkpointKey FK - varchar_36_ checkpointTaskId - timestamp_3__with_time_zone expiresAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.mcp_registry_server" { - varchar_255_ slug - varchar_50_ status - varchar_50_ version - timestamp_3__without_time_zone registryUpdatedAt - json data - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_files" { - varchar_16_ id - varchar_36_ agentId FK - text binaryDataId - varchar_255_ fileName - varchar_255_ mimeType - integer fileSizeBytes - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_task_definition" { - varchar_32_ id - varchar_36_ agentId FK - varchar_128_ name - text objective - varchar_128_ cronExpression - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_task_snapshot" { - varchar_36_ versionId FK - varchar_32_ taskId - boolean enabled - varchar_128_ name - text objective - varchar_128_ cronExpression - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_task_run_lock" { - varchar_36_ agentId FK - varchar_32_ taskId - uuid holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_mcp_registry_connections" { uuid id - varchar_36_ credentialId FK - varchar_255_ serverSlug FK - json toolFilter - uuid userId FK - timestamp_3__with_time_zone createdAt + json messages + text previousSummary + varchar_255_ resumeAfterRestoreMessageId timestamp_3__with_time_zone updatedAt + uuid userId FK + varchar_36_ workflowId FK +} +"public.workflow_dependency" { + timestamp_3__with_time_zone createdAt + json dependencyInfo + varchar_255_ dependencyKey + varchar_32_ dependencyType + integer id + smallint indexVersionId + varchar_36_ publishedVersionId + varchar_36_ workflowId FK + integer workflowVersionId +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId +} +"public.workflow_history" { + varchar_255_ authors + boolean autosaved + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_128_ name + json nodeGroups + json nodes + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId + varchar_36_ workflowId FK } "public.workflow_publication_outbox" { + timestamp_3__with_time_zone createdAt + text errorMessage integer id - varchar_36_ workflowId varchar_36_ publishedVersionId varchar_20_ status - text errorMessage - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId } -"public.agent_chat_subscriptions" { - varchar_36_ agentId FK - varchar_64_ integrationType - varchar_255_ credentialId - varchar_255_ threadId +"public.workflow_publish_history" { timestamp_3__with_time_zone createdAt + varchar_36_ event + integer id + uuid userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK +} +"public.workflow_published_version" { + timestamp_3__with_time_zone createdAt + varchar_36_ publishedVersionId FK timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.workflow_statistics" { + bigint count + integer id + timestamp_3__with_time_zone latestEvent + varchar_128_ name + bigint rootCount + varchar_36_ workflowId + varchar_128_ workflowName +} +"public.workflows_tags" { + varchar_36_ tagId FK + varchar_36_ workflowId FK } ``` diff --git a/docs/generated/postgres-schema/public.agent_chat_subscriptions.md b/docs/generated/postgres-schema/public.agent_chat_subscriptions.md index 9aed227e693..1d1982a68f2 100644 --- a/docs/generated/postgres-schema/public.agent_chat_subscriptions.md +++ b/docs/generated/postgres-schema/public.agent_chat_subscriptions.md @@ -5,10 +5,10 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this subscription | -| integrationType | varchar(64) | | false | | | Chat integration platform for this subscription | -| credentialId | varchar(255) | | false | | | Credential connection that owns this subscription | -| threadId | varchar(255) | | false | | | Platform thread ID the agent is subscribed to | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| credentialId | varchar(255) | | false | | | Credential connection that owns this subscription | +| integrationType | varchar(64) | | false | | | Chat integration platform for this subscription | +| threadId | varchar(255) | | false | | | Platform thread ID the agent is subscribed to | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -16,14 +16,14 @@ | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_agent_chat_subscriptions_integrationType | CHECK | CHECK ((("integrationType")::text = ANY ((ARRAY['telegram'::character varying, 'slack'::character varying, 'linear'::character varying])::text[]))) | +| FK_e79153bd179c011e779d5016796 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_76598cf91038bee1f3ac94c94bc | PRIMARY KEY | PRIMARY KEY ("agentId", "integrationType", "credentialId", "threadId") | | agent_chat_subscriptions_agentId_not_null | n | NOT NULL "agentId" | | agent_chat_subscriptions_createdAt_not_null | n | NOT NULL "createdAt" | | agent_chat_subscriptions_credentialId_not_null | n | NOT NULL "credentialId" | | agent_chat_subscriptions_integrationType_not_null | n | NOT NULL "integrationType" | | agent_chat_subscriptions_threadId_not_null | n | NOT NULL "threadId" | | agent_chat_subscriptions_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_e79153bd179c011e779d5016796 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_76598cf91038bee1f3ac94c94bc | PRIMARY KEY | PRIMARY KEY ("agentId", "integrationType", "credentialId", "threadId") | ## Indexes @@ -40,25 +40,25 @@ erDiagram "public.agent_chat_subscriptions" { varchar_36_ agentId FK - varchar_64_ integrationType - varchar_255_ credentialId - varchar_255_ threadId timestamp_3__with_time_zone createdAt + varchar_255_ credentialId + varchar_64_ integrationType + varchar_255_ threadId timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agent_checkpoints.md b/docs/generated/postgres-schema/public.agent_checkpoints.md index 5bd8a586b64..d9a46bfffa4 100644 --- a/docs/generated/postgres-schema/public.agent_checkpoints.md +++ b/docs/generated/postgres-schema/public.agent_checkpoints.md @@ -4,30 +4,30 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| runId | varchar(255) | | false | | | | | agentId | varchar(255) | | true | | [public.agents](public.agents.md) | | -| state | text | | true | | | | -| expired | boolean | false | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| expired | boolean | false | false | | | | +| runId | varchar(255) | | false | | | | +| state | text | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_5e31c210f896d539964bf99fe32 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_50a27cbafa6806c9b162304b5fd | PRIMARY KEY | PRIMARY KEY ("runId") | | agent_checkpoints_createdAt_not_null | n | NOT NULL "createdAt" | | agent_checkpoints_expired_not_null | n | NOT NULL expired | | agent_checkpoints_runId_not_null | n | NOT NULL "runId" | | agent_checkpoints_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_5e31c210f896d539964bf99fe32 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_50a27cbafa6806c9b162304b5fd | PRIMARY KEY | PRIMARY KEY ("runId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_50a27cbafa6806c9b162304b5fd | CREATE UNIQUE INDEX "PK_50a27cbafa6806c9b162304b5fd" ON public.agent_checkpoints USING btree ("runId") | | IDX_5e31c210f896d539964bf99fe3 | CREATE INDEX "IDX_5e31c210f896d539964bf99fe3" ON public.agent_checkpoints USING btree ("agentId") | +| PK_50a27cbafa6806c9b162304b5fd | CREATE UNIQUE INDEX "PK_50a27cbafa6806c9b162304b5fd" ON public.agent_checkpoints USING btree ("runId") | ## Relations @@ -37,26 +37,26 @@ erDiagram "public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_checkpoints" { - varchar_255_ runId varchar_255_ agentId FK - text state - boolean expired timestamp_3__with_time_zone createdAt + boolean expired + varchar_255_ runId + text state timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agent_execution.md b/docs/generated/postgres-schema/public.agent_execution.md index f01bc72e413..9a55ebba2cb 100644 --- a/docs/generated/postgres-schema/public.agent_execution.md +++ b/docs/generated/postgres-schema/public.agent_execution.md @@ -4,26 +4,26 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | varchar(128) | | false | | [public.agent_execution_threads](public.agent_execution_threads.md) | | -| status | varchar(16) | | false | | | | -| startedAt | timestamp(3) with time zone | | true | | | | -| stoppedAt | timestamp(3) with time zone | | true | | | | -| duration | integer | 0 | false | | | | -| userMessage | text | | false | | | | | assistantResponse | text | | false | | | | -| model | varchar(255) | | true | | | | -| promptTokens | integer | | true | | | | | completionTokens | integer | | true | | | | -| totalTokens | integer | | true | | | | | cost | double precision | | true | | | | -| toolCalls | json | | true | | | | -| timeline | json | | true | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| duration | integer | 0 | false | | | | | error | text | | true | | | | | hitlStatus | varchar(16) | | true | | | | +| id | varchar(36) | | false | | | | +| model | varchar(255) | | true | | | | +| promptTokens | integer | | true | | | | | source | varchar(32) | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| startedAt | timestamp(3) with time zone | | true | | | | +| status | varchar(16) | | false | | | | +| stoppedAt | timestamp(3) with time zone | | true | | | | +| threadId | varchar(128) | | false | | [public.agent_execution_threads](public.agent_execution_threads.md) | | +| timeline | json | | true | | | | +| toolCalls | json | | true | | | | +| totalTokens | integer | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userMessage | text | | false | | | | ## Constraints @@ -31,6 +31,8 @@ | ---- | ---- | ---------- | | CHK_agent_execution_hitlStatus | CHECK | CHECK ((("hitlStatus")::text = ANY ((ARRAY['suspended'::character varying, 'resumed'::character varying])::text[]))) | | CHK_agent_execution_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['success'::character varying, 'error'::character varying])::text[]))) | +| FK_add2432fb6034cc18b6af299dce | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agent_execution_threads(id) ON DELETE CASCADE | +| PK_ba438acc8532addc12d1ef17049 | PRIMARY KEY | PRIMARY KEY (id) | | agent_execution_assistantResponse_not_null | n | NOT NULL "assistantResponse" | | agent_execution_createdAt_not_null | n | NOT NULL "createdAt" | | agent_execution_duration_not_null | n | NOT NULL duration | @@ -39,15 +41,13 @@ | agent_execution_threadId_not_null | n | NOT NULL "threadId" | | agent_execution_updatedAt_not_null | n | NOT NULL "updatedAt" | | agent_execution_userMessage_not_null | n | NOT NULL "userMessage" | -| PK_ba438acc8532addc12d1ef17049 | PRIMARY KEY | PRIMARY KEY (id) | -| FK_add2432fb6034cc18b6af299dce | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agent_execution_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_ba438acc8532addc12d1ef17049 | CREATE UNIQUE INDEX "PK_ba438acc8532addc12d1ef17049" ON public.agent_execution USING btree (id) | | IDX_63d3c3a68b9cebf05f967f0b1c | CREATE INDEX "IDX_63d3c3a68b9cebf05f967f0b1c" ON public.agent_execution USING btree ("threadId", "createdAt") | +| PK_ba438acc8532addc12d1ef17049 | CREATE UNIQUE INDEX "PK_ba438acc8532addc12d1ef17049" ON public.agent_execution USING btree (id) | ## Relations @@ -57,45 +57,45 @@ erDiagram "public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE" "public.agent_execution" { - varchar_36_ id - varchar_128_ threadId FK - varchar_16_ status - timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - integer duration - text userMessage text assistantResponse - varchar_255_ model - integer promptTokens integer completionTokens - integer totalTokens double_precision cost - json toolCalls - json timeline + timestamp_3__with_time_zone createdAt + integer duration text error varchar_16_ hitlStatus + varchar_36_ id + varchar_255_ model + integer promptTokens varchar_32_ source - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone startedAt + varchar_16_ status + timestamp_3__with_time_zone stoppedAt + varchar_128_ threadId FK + json timeline + json toolCalls + integer totalTokens timestamp_3__with_time_zone updatedAt + text userMessage } "public.agent_execution_threads" { - varchar_128_ id varchar_36_ agentId FK varchar_255_ agentName + timestamp_3__with_time_zone createdAt + varchar_8_ emoji + varchar_128_ id + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK integer sessionNumber - integer totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title integer totalCompletionTokens double_precision totalCost integer totalDuration - varchar_255_ title - varchar_8_ emoji - timestamp_3__with_time_zone createdAt + integer totalPromptTokens timestamp_3__with_time_zone updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId } ``` diff --git a/docs/generated/postgres-schema/public.agent_execution_threads.md b/docs/generated/postgres-schema/public.agent_execution_threads.md index 968a6ea6efd..7c1e0dcd043 100644 --- a/docs/generated/postgres-schema/public.agent_execution_threads.md +++ b/docs/generated/postgres-schema/public.agent_execution_threads.md @@ -4,28 +4,32 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(128) | | false | [public.agent_execution](public.agent_execution.md) | | | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | | | agentName | varchar(255) | | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| emoji | varchar(8) | | true | | | | +| id | varchar(128) | | false | [public.agent_execution](public.agent_execution.md) | | | +| parentAgentId | varchar(36) | | true | | | Saved agent id of the parent that delegated this subagent run. | +| parentThreadId | varchar(128) | | true | | | Parent session thread id that delegated this subagent run. | | projectId | varchar(255) | | false | | [public.project](public.project.md) | | | sessionNumber | integer | 0 | false | | | | -| totalPromptTokens | integer | 0 | false | | | | +| taskId | varchar(32) | | true | | | Published task ID that triggered this session; not an FK because published runs can outlive draft task definition rows | +| taskVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | Published agent_history version that supplied the task snapshot | +| title | varchar(255) | | true | | | | | totalCompletionTokens | integer | 0 | false | | | | | totalCost | double precision | 0 | false | | | | | totalDuration | integer | 0 | false | | | | -| title | varchar(255) | | true | | | | -| emoji | varchar(8) | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| totalPromptTokens | integer | 0 | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| taskId | varchar(32) | | true | | | Published task ID that triggered this session; not an FK because published runs can outlive draft task definition rows | -| taskVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | Published agent_history version that supplied the task snapshot | -| parentThreadId | varchar(128) | | true | | | Parent session thread id that delegated this subagent run. | -| parentAgentId | varchar(36) | | true | | | Saved agent id of the parent that delegated this subagent run. | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_0468a9dc35597314e641d4722aa | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| FK_0e2f8bf92a7a9c88b89670f701c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| FK_f00b52d74fe11838e1fe086deea | FOREIGN KEY | FOREIGN KEY ("taskVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL | +| PK_22373dbf6ba6929d8ac50093309 | PRIMARY KEY | PRIMARY KEY (id) | | agent_execution_threads_agentId_not_null | n | NOT NULL "agentId" | | agent_execution_threads_agentName_not_null | n | NOT NULL "agentName" | | agent_execution_threads_createdAt_not_null | n | NOT NULL "createdAt" | @@ -37,10 +41,6 @@ | agent_execution_threads_totalDuration_not_null | n | NOT NULL "totalDuration" | | agent_execution_threads_totalPromptTokens_not_null | n | NOT NULL "totalPromptTokens" | | agent_execution_threads_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_0e2f8bf92a7a9c88b89670f701c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| FK_0468a9dc35597314e641d4722aa | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| FK_f00b52d74fe11838e1fe086deea | FOREIGN KEY | FOREIGN KEY ("taskVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL | -| PK_22373dbf6ba6929d8ac50093309 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -56,87 +56,87 @@ ```mermaid erDiagram -"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE" "public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE" "public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" "public.agent_execution_threads" { - varchar_128_ id varchar_36_ agentId FK varchar_255_ agentName + timestamp_3__with_time_zone createdAt + varchar_8_ emoji + varchar_128_ id + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK integer sessionNumber - integer totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title integer totalCompletionTokens double_precision totalCost integer totalDuration - varchar_255_ title - varchar_8_ emoji - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId -} -"public.agent_execution" { - varchar_36_ id - varchar_128_ threadId FK - varchar_16_ status - timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - integer duration - text userMessage - text assistantResponse - varchar_255_ model - integer promptTokens - integer completionTokens - integer totalTokens - double_precision cost - json toolCalls - json timeline - text error - varchar_16_ hitlStatus - varchar_32_ source - timestamp_3__with_time_zone createdAt + integer totalPromptTokens timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.agent_execution" { + text assistantResponse + integer completionTokens + double_precision cost + timestamp_3__with_time_zone createdAt + integer duration + text error + varchar_16_ hitlStatus + varchar_36_ id + varchar_255_ model + integer promptTokens + varchar_32_ source + timestamp_3__with_time_zone startedAt + varchar_16_ status + timestamp_3__with_time_zone stoppedAt + varchar_128_ threadId FK + json timeline + json toolCalls + integer totalTokens + timestamp_3__with_time_zone updatedAt + text userMessage } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } "public.agent_history" { - varchar_36_ versionId varchar_36_ agentId FK - json schema - json tools - json skills - uuid publishedById FK varchar_255_ author timestamp_3__with_time_zone createdAt + uuid publishedById FK + json schema + json skills + json tools timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agent_files.md b/docs/generated/postgres-schema/public.agent_files.md index 8b1538a3ce2..f77a54103e3 100644 --- a/docs/generated/postgres-schema/public.agent_files.md +++ b/docs/generated/postgres-schema/public.agent_files.md @@ -4,19 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(16) | | false | | | Application-generated n8n nano ID | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this uploaded file | | binaryDataId | text | | false | | | Opaque BinaryDataService reference (mode-prefixed, e.g. "filesystem-v2:\"); not an FK to binary_data, which only has rows in DB storage mode | -| fileName | varchar(255) | | false | | | | -| mimeType | varchar(255) | | false | | | | -| fileSizeBytes | integer | | false | | | Uploaded file size in bytes | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| fileName | varchar(255) | | false | | | | +| fileSizeBytes | integer | | false | | | Uploaded file size in bytes | +| id | varchar(16) | | false | | | Application-generated n8n nano ID | +| mimeType | varchar(255) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_aca4514cb500494b64356c2e164 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_692920e59217af7d124cd95106f | PRIMARY KEY | PRIMARY KEY (id) | | agent_files_agentId_not_null | n | NOT NULL "agentId" | | agent_files_binaryDataId_not_null | n | NOT NULL "binaryDataId" | | agent_files_createdAt_not_null | n | NOT NULL "createdAt" | @@ -25,15 +27,13 @@ | agent_files_id_not_null | n | NOT NULL id | | agent_files_mimeType_not_null | n | NOT NULL "mimeType" | | agent_files_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_aca4514cb500494b64356c2e164 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_692920e59217af7d124cd95106f | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_692920e59217af7d124cd95106f | CREATE UNIQUE INDEX "PK_692920e59217af7d124cd95106f" ON public.agent_files USING btree (id) | | IDX_45dafc48fe2ce95eac30fc8ffd | CREATE INDEX "IDX_45dafc48fe2ce95eac30fc8ffd" ON public.agent_files USING btree ("agentId", "createdAt") | +| PK_692920e59217af7d124cd95106f | CREATE UNIQUE INDEX "PK_692920e59217af7d124cd95106f" ON public.agent_files USING btree (id) | ## Relations @@ -43,28 +43,28 @@ erDiagram "public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_files" { - varchar_16_ id varchar_36_ agentId FK text binaryDataId - varchar_255_ fileName - varchar_255_ mimeType - integer fileSizeBytes timestamp_3__with_time_zone createdAt + varchar_255_ fileName + integer fileSizeBytes + varchar_16_ id + varchar_255_ mimeType timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agent_history.md b/docs/generated/postgres-schema/public.agent_history.md index b46f5a2a73f..d23cafe46ae 100644 --- a/docs/generated/postgres-schema/public.agent_history.md +++ b/docs/generated/postgres-schema/public.agent_history.md @@ -4,117 +4,117 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| versionId | varchar(36) | | false | [public.agents](public.agents.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_task_snapshot](public.agent_task_snapshot.md) | | | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | | -| schema | json | | true | | | Frozen snapshot of the published AgentJsonConfig | -| tools | json | | true | | | Frozen map of `toolId → { code, descriptor }` at publish time | -| skills | json | | true | | | Frozen map of `skillId → AgentSkill` at publish time | -| publishedById | uuid | | true | | [public.user](public.user.md) | | | author | varchar(255) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| publishedById | uuid | | true | | [public.user](public.user.md) | | +| schema | json | | true | | | Frozen snapshot of the published AgentJsonConfig | +| skills | json | | true | | | Frozen map of `skillId → AgentSkill` at publish time | +| tools | json | | true | | | Frozen map of `toolId → { code, descriptor }` at publish time | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| versionId | varchar(36) | | false | [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_task_snapshot](public.agent_task_snapshot.md) [public.agents](public.agents.md) | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_8771675f44c58fb40e0feb9ee35 | FOREIGN KEY | FOREIGN KEY ("publishedById") REFERENCES "user"(id) ON DELETE SET NULL | +| FK_87cd5a8da20304b089ea2f83fec | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_65ffcfe7a8e112fb826311fb092 | PRIMARY KEY | PRIMARY KEY ("versionId") | | agent_history_agentId_not_null | n | NOT NULL "agentId" | | agent_history_author_not_null | n | NOT NULL author | | agent_history_createdAt_not_null | n | NOT NULL "createdAt" | | agent_history_updatedAt_not_null | n | NOT NULL "updatedAt" | | agent_history_versionId_not_null | n | NOT NULL "versionId" | -| FK_8771675f44c58fb40e0feb9ee35 | FOREIGN KEY | FOREIGN KEY ("publishedById") REFERENCES "user"(id) ON DELETE SET NULL | -| FK_87cd5a8da20304b089ea2f83fec | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_65ffcfe7a8e112fb826311fb092 | PRIMARY KEY | PRIMARY KEY ("versionId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_65ffcfe7a8e112fb826311fb092 | CREATE UNIQUE INDEX "PK_65ffcfe7a8e112fb826311fb092" ON public.agent_history USING btree ("versionId") | | IDX_87cd5a8da20304b089ea2f83fe | CREATE INDEX "IDX_87cd5a8da20304b089ea2f83fe" ON public.agent_history USING btree ("agentId") | +| PK_65ffcfe7a8e112fb826311fb092 | CREATE UNIQUE INDEX "PK_65ffcfe7a8e112fb826311fb092" ON public.agent_history USING btree ("versionId") | ## Relations ```mermaid erDiagram -"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" -"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" -"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE" "public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.agent_execution_threads" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;taskVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" +"public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE" +"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" "public.agent_history" { - varchar_36_ versionId varchar_36_ agentId FK - json schema - json tools - json skills - uuid publishedById FK varchar_255_ author timestamp_3__with_time_zone createdAt + uuid publishedById FK + json schema + json skills + json tools timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.user" { + timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } "public.agent_execution_threads" { - varchar_128_ id varchar_36_ agentId FK varchar_255_ agentName + timestamp_3__with_time_zone createdAt + varchar_8_ emoji + varchar_128_ id + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK integer sessionNumber - integer totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title integer totalCompletionTokens double_precision totalCost integer totalDuration - varchar_255_ title - varchar_8_ emoji - timestamp_3__with_time_zone createdAt + integer totalPromptTokens timestamp_3__with_time_zone updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId } "public.agent_task_snapshot" { - varchar_36_ versionId FK - varchar_32_ taskId + timestamp_3__with_time_zone createdAt + varchar_128_ cronExpression boolean enabled varchar_128_ name text objective - varchar_128_ cronExpression - timestamp_3__with_time_zone createdAt + varchar_32_ taskId timestamp_3__with_time_zone updatedAt -} -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK + varchar_36_ versionId FK } ``` diff --git a/docs/generated/postgres-schema/public.agent_task_definition.md b/docs/generated/postgres-schema/public.agent_task_definition.md index fa6b52223ab..f33b98e683a 100644 --- a/docs/generated/postgres-schema/public.agent_task_definition.md +++ b/docs/generated/postgres-schema/public.agent_task_definition.md @@ -4,18 +4,20 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(32) | | false | | | Application-generated task ID referenced from agent JSON config | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Owning agent; task definitions are deleted when the agent is deleted | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone | +| id | varchar(32) | | false | | | Application-generated task ID referenced from agent JSON config | | name | varchar(128) | | false | | | | | objective | text | | false | | | User-authored instruction sent to the agent when this task runs | -| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_f45d0535a2ed59b6c2dd6da98a0 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_1756c11c637903e97629a7a784a | PRIMARY KEY | PRIMARY KEY (id) | | agent_task_definition_agentId_not_null | n | NOT NULL "agentId" | | agent_task_definition_createdAt_not_null | n | NOT NULL "createdAt" | | agent_task_definition_cronExpression_not_null | n | NOT NULL "cronExpression" | @@ -23,15 +25,13 @@ | agent_task_definition_name_not_null | n | NOT NULL name | | agent_task_definition_objective_not_null | n | NOT NULL objective | | agent_task_definition_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_f45d0535a2ed59b6c2dd6da98a0 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_1756c11c637903e97629a7a784a | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_1756c11c637903e97629a7a784a | CREATE UNIQUE INDEX "PK_1756c11c637903e97629a7a784a" ON public.agent_task_definition USING btree (id) | | IDX_f45d0535a2ed59b6c2dd6da98a | CREATE INDEX "IDX_f45d0535a2ed59b6c2dd6da98a" ON public.agent_task_definition USING btree ("agentId") | +| PK_1756c11c637903e97629a7a784a | CREATE UNIQUE INDEX "PK_1756c11c637903e97629a7a784a" ON public.agent_task_definition USING btree (id) | ## Relations @@ -41,27 +41,27 @@ erDiagram "public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_task_definition" { - varchar_32_ id varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_128_ cronExpression + varchar_32_ id varchar_128_ name text objective - varchar_128_ cronExpression - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agent_task_run_lock.md b/docs/generated/postgres-schema/public.agent_task_run_lock.md index 34f2fd95e5f..6076f126d2d 100644 --- a/docs/generated/postgres-schema/public.agent_task_run_lock.md +++ b/docs/generated/postgres-schema/public.agent_task_run_lock.md @@ -5,24 +5,24 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Published agent whose scheduled task run is locked | -| taskId | varchar(32) | | false | | | Published task ID whose scheduled run is locked | -| holderId | uuid | | false | | | Ephemeral lock owner token generated by the running main | -| heldUntil | timestamp(3) with time zone | | false | | | Time after which another main can claim this task run lock | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| heldUntil | timestamp(3) with time zone | | false | | | Time after which another main can claim this task run lock | +| holderId | uuid | | false | | | Ephemeral lock owner token generated by the running main | +| taskId | varchar(32) | | false | | | Published task ID whose scheduled run is locked | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_b57a2862ae869aab24e54cefd48 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_f593adaf7230e964d3c25deda64 | PRIMARY KEY | PRIMARY KEY ("agentId", "taskId") | | agent_task_run_lock_agentId_not_null | n | NOT NULL "agentId" | | agent_task_run_lock_createdAt_not_null | n | NOT NULL "createdAt" | | agent_task_run_lock_heldUntil_not_null | n | NOT NULL "heldUntil" | | agent_task_run_lock_holderId_not_null | n | NOT NULL "holderId" | | agent_task_run_lock_taskId_not_null | n | NOT NULL "taskId" | | agent_task_run_lock_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_b57a2862ae869aab24e54cefd48 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_f593adaf7230e964d3c25deda64 | PRIMARY KEY | PRIMARY KEY ("agentId", "taskId") | ## Indexes @@ -39,25 +39,25 @@ erDiagram "public.agent_task_run_lock" { varchar_36_ agentId FK - varchar_32_ taskId - uuid holderId - timestamp_3__with_time_zone heldUntil timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + uuid holderId + varchar_32_ taskId timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agent_task_snapshot.md b/docs/generated/postgres-schema/public.agent_task_snapshot.md index b4a3de4e45a..1c09787a408 100644 --- a/docs/generated/postgres-schema/public.agent_task_snapshot.md +++ b/docs/generated/postgres-schema/public.agent_task_snapshot.md @@ -4,19 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| versionId | varchar(36) | | false | | [public.agent_history](public.agent_history.md) | Published agent_history version this task snapshot belongs to | -| taskId | varchar(32) | | false | | | Stable task ID referenced from the published agent JSON config | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone | | enabled | boolean | | false | | | Published enabled state for this task at publish time | | name | varchar(128) | | false | | | | | objective | text | | false | | | User-authored instruction sent to the agent when this task runs | -| cronExpression | varchar(128) | | false | | | Cron schedule evaluated using the instance timezone | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| taskId | varchar(32) | | false | | | Stable task ID referenced from the published agent JSON config | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| versionId | varchar(36) | | false | | [public.agent_history](public.agent_history.md) | Published agent_history version this task snapshot belongs to | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_1acedce6690392ef1611cca8b88 | FOREIGN KEY | FOREIGN KEY ("versionId") REFERENCES agent_history("versionId") ON DELETE CASCADE | +| PK_2142a8bcda2360c3c5e34f82640 | PRIMARY KEY | PRIMARY KEY ("versionId", "taskId") | | agent_task_snapshot_createdAt_not_null | n | NOT NULL "createdAt" | | agent_task_snapshot_cronExpression_not_null | n | NOT NULL "cronExpression" | | agent_task_snapshot_enabled_not_null | n | NOT NULL enabled | @@ -25,8 +27,6 @@ | agent_task_snapshot_taskId_not_null | n | NOT NULL "taskId" | | agent_task_snapshot_updatedAt_not_null | n | NOT NULL "updatedAt" | | agent_task_snapshot_versionId_not_null | n | NOT NULL "versionId" | -| FK_1acedce6690392ef1611cca8b88 | FOREIGN KEY | FOREIGN KEY ("versionId") REFERENCES agent_history("versionId") ON DELETE CASCADE | -| PK_2142a8bcda2360c3c5e34f82640 | PRIMARY KEY | PRIMARY KEY ("versionId", "taskId") | ## Indexes @@ -42,25 +42,25 @@ erDiagram "public.agent_task_snapshot" }o--|| "public.agent_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE CASCADE" "public.agent_task_snapshot" { - varchar_36_ versionId FK - varchar_32_ taskId + timestamp_3__with_time_zone createdAt + varchar_128_ cronExpression boolean enabled varchar_128_ name text objective - varchar_128_ cronExpression - timestamp_3__with_time_zone createdAt + varchar_32_ taskId timestamp_3__with_time_zone updatedAt + varchar_36_ versionId FK } "public.agent_history" { - varchar_36_ versionId varchar_36_ agentId FK - json schema - json tools - json skills - uuid publishedById FK varchar_255_ author timestamp_3__with_time_zone createdAt + uuid publishedById FK + json schema + json skills + json tools timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.agents.md b/docs/generated/postgres-schema/public.agents.md index 7fcdcc00eae..6df9196df05 100644 --- a/docs/generated/postgres-schema/public.agents.md +++ b/docs/generated/postgres-schema/public.agents.md @@ -4,23 +4,26 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.agent_checkpoints](public.agent_checkpoints.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agents_observations](public.agents_observations.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) [public.agent_history](public.agent_history.md) [public.agent_files](public.agent_files.md) [public.agent_task_definition](public.agent_task_definition.md) [public.agent_task_run_lock](public.agent_task_run_lock.md) [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) | | | -| name | varchar(128) | | false | | | | -| description | varchar(512) | | true | | | | -| projectId | varchar(255) | | false | | [public.project](public.project.md) | | -| integrations | json | '[]'::json | false | | | | -| schema | json | | true | | | | -| tools | json | '{}'::json | false | | | | -| skills | json | '{}'::json | false | | | | -| versionId | varchar(36) | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | activeVersionId | varchar(36) | | true | | [public.agent_history](public.agent_history.md) | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| description | varchar(512) | | true | | | | +| id | varchar(36) | | false | [public.agent_chat_subscriptions](public.agent_chat_subscriptions.md) [public.agent_checkpoints](public.agent_checkpoints.md) [public.agent_execution_threads](public.agent_execution_threads.md) [public.agent_files](public.agent_files.md) [public.agent_history](public.agent_history.md) [public.agent_task_definition](public.agent_task_definition.md) [public.agent_task_run_lock](public.agent_task_run_lock.md) [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_observations](public.agents_observations.md) | | | +| integrations | json | '[]'::json | false | | | | +| name | varchar(128) | | false | | | | +| projectId | varchar(255) | | false | | [public.project](public.project.md) | | +| schema | json | | true | | | | +| skills | json | '{}'::json | false | | | | +| tools | json | '{}'::json | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| versionId | varchar(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_940597dfe9753375309ce6aeea0 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL | +| FK_a30d560207c4071d98aa03c179c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| PK_9c653f28ae19c5884d5baf6a1d9 | PRIMARY KEY | PRIMARY KEY (id) | | agents_createdAt_not_null | n | NOT NULL "createdAt" | | agents_id_not_null | n | NOT NULL id | | agents_integrations_not_null | n | NOT NULL integrations | @@ -29,209 +32,206 @@ | agents_skills_not_null | n | NOT NULL skills | | agents_tools_not_null | n | NOT NULL tools | | agents_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_a30d560207c4071d98aa03c179c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| PK_9c653f28ae19c5884d5baf6a1d9 | PRIMARY KEY | PRIMARY KEY (id) | -| FK_940597dfe9753375309ce6aeea0 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES agent_history("versionId") ON DELETE SET NULL | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_9c653f28ae19c5884d5baf6a1d9 | CREATE UNIQUE INDEX "PK_9c653f28ae19c5884d5baf6a1d9" ON public.agents USING btree (id) | | IDX_a30d560207c4071d98aa03c179 | CREATE INDEX "IDX_a30d560207c4071d98aa03c179" ON public.agents USING btree ("projectId") | | IDX_agents_projectId | CREATE INDEX "IDX_agents_projectId" ON public.agents USING btree ("projectId") | +| PK_9c653f28ae19c5884d5baf6a1d9 | CREATE UNIQUE INDEX "PK_9c653f28ae19c5884d5baf6a1d9" ON public.agents USING btree (id) | ## Relations ```mermaid erDiagram +"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" +"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" -"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL" "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.agent_history" { + varchar_36_ agentId FK + varchar_255_ author + timestamp_3__with_time_zone createdAt + uuid publishedById FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.agent_chat_subscriptions" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_255_ credentialId + varchar_64_ integrationType + varchar_255_ threadId + timestamp_3__with_time_zone updatedAt } "public.agent_checkpoints" { - varchar_255_ runId varchar_255_ agentId FK - text state - boolean expired timestamp_3__with_time_zone createdAt + boolean expired + varchar_255_ runId + text state timestamp_3__with_time_zone updatedAt } "public.agent_execution_threads" { - varchar_128_ id varchar_36_ agentId FK varchar_255_ agentName + timestamp_3__with_time_zone createdAt + varchar_8_ emoji + varchar_128_ id + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK integer sessionNumber - integer totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title integer totalCompletionTokens double_precision totalCost integer totalDuration - varchar_255_ title - varchar_8_ emoji - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId -} -"public.agents_observations" { - varchar_36_ id - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_16_ marker - text text - varchar_36_ parentId FK - integer tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observation_cursors" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observation_locks" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entries" { - varchar_36_ id - varchar_36_ agentId FK - varchar_255_ resourceId FK - text content - varchar_64_ contentHash - varchar_16_ status - varchar_36_ supersededBy FK - varchar_128_ embeddingModel - json embedding - json metadata - timestamp_3__with_time_zone lastSeenAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_locks" { - varchar_36_ agentId FK - varchar_255_ resourceId FK - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_sources" { - varchar_36_ id - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - text evidenceText - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_cursors" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastIndexedObservationId - timestamp_3__with_time_zone lastIndexedObservationCreatedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agent_history" { - varchar_36_ versionId - varchar_36_ agentId FK - json schema - json tools - json skills - uuid publishedById FK - varchar_255_ author - timestamp_3__with_time_zone createdAt + integer totalPromptTokens timestamp_3__with_time_zone updatedAt } "public.agent_files" { - varchar_16_ id varchar_36_ agentId FK text binaryDataId - varchar_255_ fileName - varchar_255_ mimeType - integer fileSizeBytes timestamp_3__with_time_zone createdAt + varchar_255_ fileName + integer fileSizeBytes + varchar_16_ id + varchar_255_ mimeType timestamp_3__with_time_zone updatedAt } "public.agent_task_definition" { - varchar_32_ id varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_128_ cronExpression + varchar_32_ id varchar_128_ name text objective - varchar_128_ cronExpression - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agent_task_run_lock" { varchar_36_ agentId FK - varchar_32_ taskId - uuid holderId - timestamp_3__with_time_zone heldUntil timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + uuid holderId + varchar_32_ taskId timestamp_3__with_time_zone updatedAt } -"public.agent_chat_subscriptions" { +"public.agents_memory_entries" { varchar_36_ agentId FK - varchar_64_ integrationType - varchar_255_ credentialId - varchar_255_ threadId + text content + varchar_64_ contentHash timestamp_3__with_time_zone createdAt + json embedding + varchar_128_ embeddingModel + varchar_36_ id + timestamp_3__with_time_zone lastSeenAt + json metadata + varchar_255_ resourceId FK + varchar_16_ status + varchar_36_ supersededBy FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_cursors" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_locks" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ resourceId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_sources" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_64_ evidenceHash + text evidenceText + varchar_36_ id + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_observation_cursors" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_observation_locks" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ observationScopeId FK + varchar_20_ taskKind + timestamp_3__with_time_zone updatedAt +} +"public.agents_observations" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_16_ marker + varchar_255_ observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + text text + integer tokenCount timestamp_3__with_time_zone updatedAt } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } ``` diff --git a/docs/generated/postgres-schema/public.agents_memory_entries.md b/docs/generated/postgres-schema/public.agents_memory_entries.md index 7c19bca6159..c070feae0b7 100644 --- a/docs/generated/postgres-schema/public.agents_memory_entries.md +++ b/docs/generated/postgres-schema/public.agents_memory_entries.md @@ -4,18 +4,18 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | | | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this episodic memory entry | -| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition used for episodic recall scope | | content | text | | false | | | | | contentHash | varchar(64) | | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| embedding | json | | true | | | Embedding vector for episodic recall | +| embeddingModel | varchar(128) | | true | | | Embedding model used to produce embedding | +| id | varchar(36) | | false | [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | | | +| lastSeenAt | timestamp(3) with time zone | | false | | | Last time equivalent content was observed; updatedAt tracks row mutation time | +| metadata | json | | true | | | Optional system metadata for ranking and debugging | +| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition used for episodic recall scope | | status | varchar(16) | | false | | | | | supersededBy | varchar(36) | | true | | [public.agents_memory_entries](public.agents_memory_entries.md) | Self-reference to replacement memory entry | -| embeddingModel | varchar(128) | | true | | | Embedding model used to produce embedding | -| embedding | json | | true | | | Embedding vector for episodic recall | -| metadata | json | | true | | | Optional system metadata for ranking and debugging | -| lastSeenAt | timestamp(3) with time zone | | false | | | Last time equivalent content was observed; updatedAt tracks row mutation time | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -23,6 +23,10 @@ | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_agents_memory_entries_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) | +| FK_0edf1226b77ddc525eae4938079 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_memory_entries(id) | +| FK_1443a75e59adbfb796071d66393 | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE | +| FK_28e981fb675e9b44ce02f0ec1dd | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_bfbc45dc88f66fae4e4b4a15fec | PRIMARY KEY | PRIMARY KEY (id) | | agents_memory_entries_agentId_not_null | n | NOT NULL "agentId" | | agents_memory_entries_contentHash_not_null | n | NOT NULL "contentHash" | | agents_memory_entries_content_not_null | n | NOT NULL content | @@ -32,75 +36,71 @@ | agents_memory_entries_resourceId_not_null | n | NOT NULL "resourceId" | | agents_memory_entries_status_not_null | n | NOT NULL status | | agents_memory_entries_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_28e981fb675e9b44ce02f0ec1dd | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| FK_1443a75e59adbfb796071d66393 | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE | -| FK_0edf1226b77ddc525eae4938079 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_memory_entries(id) | -| PK_bfbc45dc88f66fae4e4b4a15fec | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_bfbc45dc88f66fae4e4b4a15fec | CREATE UNIQUE INDEX "PK_bfbc45dc88f66fae4e4b4a15fec" ON public.agents_memory_entries USING btree (id) | -| IDX_aff2807b31eccbafe59d0474f0 | CREATE INDEX "IDX_aff2807b31eccbafe59d0474f0" ON public.agents_memory_entries USING btree ("agentId", "resourceId", status, "createdAt", id) | -| IDX_a03e04e94bea8439dd166d4b52 | CREATE UNIQUE INDEX "IDX_a03e04e94bea8439dd166d4b52" ON public.agents_memory_entries USING btree ("agentId", "resourceId", "contentHash") | -| IDX_1443a75e59adbfb796071d6639 | CREATE INDEX "IDX_1443a75e59adbfb796071d6639" ON public.agents_memory_entries USING btree ("resourceId") | | IDX_0edf1226b77ddc525eae493807 | CREATE INDEX "IDX_0edf1226b77ddc525eae493807" ON public.agents_memory_entries USING btree ("supersededBy") | +| IDX_1443a75e59adbfb796071d6639 | CREATE INDEX "IDX_1443a75e59adbfb796071d6639" ON public.agents_memory_entries USING btree ("resourceId") | +| IDX_a03e04e94bea8439dd166d4b52 | CREATE UNIQUE INDEX "IDX_a03e04e94bea8439dd166d4b52" ON public.agents_memory_entries USING btree ("agentId", "resourceId", "contentHash") | +| IDX_aff2807b31eccbafe59d0474f0 | CREATE INDEX "IDX_aff2807b31eccbafe59d0474f0" ON public.agents_memory_entries USING btree ("agentId", "resourceId", status, "createdAt", id) | +| PK_bfbc45dc88f66fae4e4b4a15fec | CREATE UNIQUE INDEX "PK_bfbc45dc88f66fae4e4b4a15fec" ON public.agents_memory_entries USING btree (id) | ## Relations ```mermaid erDiagram +"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agents_memory_entries" }o--o| "public.agents_memory_entries" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_memory_entries(id)" "public.agents_memory_entry_sources" }o--|| "public.agents_memory_entries" : "FOREIGN KEY (#quot;memoryEntryId#quot;) REFERENCES agents_memory_entries(id) ON DELETE CASCADE" -"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agents_memory_entries" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE" "public.agents_memory_entries" { - varchar_36_ id varchar_36_ agentId FK - varchar_255_ resourceId FK text content varchar_64_ contentHash + timestamp_3__with_time_zone createdAt + json embedding + varchar_128_ embeddingModel + varchar_36_ id + timestamp_3__with_time_zone lastSeenAt + json metadata + varchar_255_ resourceId FK varchar_16_ status varchar_36_ supersededBy FK - varchar_128_ embeddingModel - json embedding - json metadata - timestamp_3__with_time_zone lastSeenAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_sources" { - varchar_36_ id - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - text evidenceText - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.agents_memory_entry_sources" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_64_ evidenceHash + text evidenceText + varchar_36_ id + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + timestamp_3__with_time_zone updatedAt } "public.agents_resources" { + timestamp_3__with_time_zone createdAt varchar_255_ id text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_memory_entry_cursors.md b/docs/generated/postgres-schema/public.agents_memory_entry_cursors.md index f1a55ed19a5..e41c5d19fe0 100644 --- a/docs/generated/postgres-schema/public.agents_memory_entry_cursors.md +++ b/docs/generated/postgres-schema/public.agents_memory_entry_cursors.md @@ -5,32 +5,32 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this cursor | -| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream indexed into episodic memory | -| lastIndexedObservationId | varchar(36) | | false | | | Last observation-log row indexed into episodic memory | -| lastIndexedObservationCreatedAt | timestamp(3) with time zone | | false | | | Creation timestamp for the last indexed observation-log row | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| lastIndexedObservationCreatedAt | timestamp(3) with time zone | | false | | | Creation timestamp for the last indexed observation-log row | +| lastIndexedObservationId | varchar(36) | | false | | | Last observation-log row indexed into episodic memory | +| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream indexed into episodic memory | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_069e791e428391a5569e7a96b20 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | +| FK_746780fd115e5e4352457a3c617 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_b31a1d5c009a27f4cc5ef8f102a | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") | | agents_memory_entry_cursors_agentId_not_null | n | NOT NULL "agentId" | | agents_memory_entry_cursors_createdAt_not_null | n | NOT NULL "createdAt" | | agents_memory_entry_cursors_lastIndexedObservationCrea_not_null | n | NOT NULL "lastIndexedObservationCreatedAt" | | agents_memory_entry_cursors_lastIndexedObservationId_not_null | n | NOT NULL "lastIndexedObservationId" | | agents_memory_entry_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" | | agents_memory_entry_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_746780fd115e5e4352457a3c617 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_b31a1d5c009a27f4cc5ef8f102a | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") | -| FK_069e791e428391a5569e7a96b20 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_b31a1d5c009a27f4cc5ef8f102a | CREATE UNIQUE INDEX "PK_b31a1d5c009a27f4cc5ef8f102a" ON public.agents_memory_entry_cursors USING btree ("agentId", "observationScopeId") | | IDX_069e791e428391a5569e7a96b2 | CREATE INDEX "IDX_069e791e428391a5569e7a96b2" ON public.agents_memory_entry_cursors USING btree ("observationScopeId") | +| PK_b31a1d5c009a27f4cc5ef8f102a | CREATE UNIQUE INDEX "PK_b31a1d5c009a27f4cc5ef8f102a" ON public.agents_memory_entry_cursors USING btree ("agentId", "observationScopeId") | ## Relations @@ -42,32 +42,32 @@ erDiagram "public.agents_memory_entry_cursors" { varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastIndexedObservationId - timestamp_3__with_time_zone lastIndexedObservationCreatedAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId FK timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_memory_entry_locks.md b/docs/generated/postgres-schema/public.agents_memory_entry_locks.md index 7b5eacf4b06..3cc7fa7bd7e 100644 --- a/docs/generated/postgres-schema/public.agents_memory_entry_locks.md +++ b/docs/generated/postgres-schema/public.agents_memory_entry_locks.md @@ -5,32 +5,32 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this lock | -| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition locked for episodic indexing | -| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token | -| heldUntil | timestamp(3) with time zone | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| heldUntil | timestamp(3) with time zone | | false | | | | +| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token | +| resourceId | varchar(255) | | false | | [public.agents_resources](public.agents_resources.md) | agents_resources.id partition locked for episodic indexing | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_0ccf6d9ea6f44fa1c264fc2f795 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| FK_9594c0983cfee1c8ff49b05848b | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE | +| PK_a8e0f570d04a174292bea104ae6 | PRIMARY KEY | PRIMARY KEY ("agentId", "resourceId") | | agents_memory_entry_locks_agentId_not_null | n | NOT NULL "agentId" | | agents_memory_entry_locks_createdAt_not_null | n | NOT NULL "createdAt" | | agents_memory_entry_locks_heldUntil_not_null | n | NOT NULL "heldUntil" | | agents_memory_entry_locks_holderId_not_null | n | NOT NULL "holderId" | | agents_memory_entry_locks_resourceId_not_null | n | NOT NULL "resourceId" | | agents_memory_entry_locks_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_0ccf6d9ea6f44fa1c264fc2f795 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| FK_9594c0983cfee1c8ff49b05848b | FOREIGN KEY | FOREIGN KEY ("resourceId") REFERENCES agents_resources(id) ON DELETE CASCADE | -| PK_a8e0f570d04a174292bea104ae6 | PRIMARY KEY | PRIMARY KEY ("agentId", "resourceId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_a8e0f570d04a174292bea104ae6 | CREATE UNIQUE INDEX "PK_a8e0f570d04a174292bea104ae6" ON public.agents_memory_entry_locks USING btree ("agentId", "resourceId") | | IDX_9594c0983cfee1c8ff49b05848 | CREATE INDEX "IDX_9594c0983cfee1c8ff49b05848" ON public.agents_memory_entry_locks USING btree ("resourceId") | +| PK_a8e0f570d04a174292bea104ae6 | CREATE UNIQUE INDEX "PK_a8e0f570d04a174292bea104ae6" ON public.agents_memory_entry_locks USING btree ("agentId", "resourceId") | ## Relations @@ -42,30 +42,30 @@ erDiagram "public.agents_memory_entry_locks" { varchar_36_ agentId FK - varchar_255_ resourceId FK - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ resourceId FK timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } "public.agents_resources" { + timestamp_3__with_time_zone createdAt varchar_255_ id text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_memory_entry_sources.md b/docs/generated/postgres-schema/public.agents_memory_entry_sources.md index 8aa4fff11a8..36c3ac04919 100644 --- a/docs/generated/postgres-schema/public.agents_memory_entry_sources.md +++ b/docs/generated/postgres-schema/public.agents_memory_entry_sources.md @@ -4,20 +4,25 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns the linked episodic memory entry source | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| evidenceHash | varchar(64) | | false | | | Bounded hash used to deduplicate exact evidence links | +| evidenceText | text | | false | | | Exact source evidence text from the observation, not recall scope | +| id | varchar(36) | | false | | | | | memoryEntryId | varchar(36) | | false | | [public.agents_memory_entries](public.agents_memory_entries.md) | Episodic memory entry linked to this source evidence | | observationId | varchar(36) | | false | | [public.agents_observations](public.agents_observations.md) | Observation-log row used as source evidence | | threadId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | Source conversation thread that produced the linked observation | -| evidenceHash | varchar(64) | | false | | | Bounded hash used to deduplicate exact evidence links | -| evidenceText | text | | false | | | Exact source evidence text from the observation, not recall scope | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_451d387a182fa8dd8002dfc3a77 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE | +| FK_4706f6223313959b7437a2b48df | FOREIGN KEY | FOREIGN KEY ("memoryEntryId") REFERENCES agents_memory_entries(id) ON DELETE CASCADE | +| FK_c38e8a57a36b880e39a52ada2e8 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| FK_cb7c15d22fd068a0806aa57fc03 | FOREIGN KEY | FOREIGN KEY ("observationId") REFERENCES agents_observations(id) ON DELETE CASCADE | +| PK_278f05e98e74baaaa93f52b4bab | PRIMARY KEY | PRIMARY KEY (id) | | agents_memory_entry_sources_agentId_not_null | n | NOT NULL "agentId" | | agents_memory_entry_sources_createdAt_not_null | n | NOT NULL "createdAt" | | agents_memory_entry_sources_evidenceHash_not_null | n | NOT NULL "evidenceHash" | @@ -27,21 +32,16 @@ | agents_memory_entry_sources_observationId_not_null | n | NOT NULL "observationId" | | agents_memory_entry_sources_threadId_not_null | n | NOT NULL "threadId" | | agents_memory_entry_sources_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_c38e8a57a36b880e39a52ada2e8 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| FK_cb7c15d22fd068a0806aa57fc03 | FOREIGN KEY | FOREIGN KEY ("observationId") REFERENCES agents_observations(id) ON DELETE CASCADE | -| FK_4706f6223313959b7437a2b48df | FOREIGN KEY | FOREIGN KEY ("memoryEntryId") REFERENCES agents_memory_entries(id) ON DELETE CASCADE | -| PK_278f05e98e74baaaa93f52b4bab | PRIMARY KEY | PRIMARY KEY (id) | -| FK_451d387a182fa8dd8002dfc3a77 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_278f05e98e74baaaa93f52b4bab | CREATE UNIQUE INDEX "PK_278f05e98e74baaaa93f52b4bab" ON public.agents_memory_entry_sources USING btree (id) | +| IDX_451d387a182fa8dd8002dfc3a7 | CREATE INDEX "IDX_451d387a182fa8dd8002dfc3a7" ON public.agents_memory_entry_sources USING btree ("threadId") | | IDX_a353ac251315ef0af6ad3c9f0a | CREATE UNIQUE INDEX "IDX_a353ac251315ef0af6ad3c9f0a" ON public.agents_memory_entry_sources USING btree ("memoryEntryId", "observationId", "evidenceHash") | | IDX_cb7c15d22fd068a0806aa57fc0 | CREATE INDEX "IDX_cb7c15d22fd068a0806aa57fc0" ON public.agents_memory_entry_sources USING btree ("observationId") | | IDX_f9573af4ed653f13b0ba1f7b12 | CREATE INDEX "IDX_f9573af4ed653f13b0ba1f7b12" ON public.agents_memory_entry_sources USING btree ("agentId", "threadId") | -| IDX_451d387a182fa8dd8002dfc3a7 | CREATE INDEX "IDX_451d387a182fa8dd8002dfc3a7" ON public.agents_memory_entry_sources USING btree ("threadId") | +| PK_278f05e98e74baaaa93f52b4bab | CREATE UNIQUE INDEX "PK_278f05e98e74baaaa93f52b4bab" ON public.agents_memory_entry_sources USING btree (id) | ## Relations @@ -54,64 +54,64 @@ erDiagram "public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_memory_entry_sources" { - varchar_36_ id varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_64_ evidenceHash + text evidenceText + varchar_36_ id varchar_36_ memoryEntryId FK varchar_36_ observationId FK varchar_255_ threadId FK - varchar_64_ evidenceHash - text evidenceText - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } "public.agents_memory_entries" { - varchar_36_ id varchar_36_ agentId FK - varchar_255_ resourceId FK text content varchar_64_ contentHash + timestamp_3__with_time_zone createdAt + json embedding + varchar_128_ embeddingModel + varchar_36_ id + timestamp_3__with_time_zone lastSeenAt + json metadata + varchar_255_ resourceId FK varchar_16_ status varchar_36_ supersededBy FK - varchar_128_ embeddingModel - json embedding - json metadata - timestamp_3__with_time_zone lastSeenAt - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents_observations" { - varchar_36_ id varchar_36_ agentId FK - varchar_255_ observationScopeId FK + timestamp_3__with_time_zone createdAt + varchar_36_ id varchar_16_ marker - text text + varchar_255_ observationScopeId FK varchar_36_ parentId FK - integer tokenCount varchar_16_ status varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt + text text + integer tokenCount timestamp_3__with_time_zone updatedAt } "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_messages.md b/docs/generated/postgres-schema/public.agents_messages.md index 9b884026283..80600957f09 100644 --- a/docs/generated/postgres-schema/public.agents_messages.md +++ b/docs/generated/postgres-schema/public.agents_messages.md @@ -4,19 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | | -| resourceId | varchar(255) | | false | | | | -| role | varchar(36) | | false | | | | -| type | varchar(36) | | true | | | | | content | json | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | | | | +| resourceId | varchar(255) | | false | | | | +| role | varchar(36) | | false | | | | +| threadId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | | +| type | varchar(36) | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_0a8057a61afabd2999608ffd0d9 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE | +| PK_81020dc608dfb0af1ede386d907 | PRIMARY KEY | PRIMARY KEY (id) | | agents_messages_content_not_null | n | NOT NULL content | | agents_messages_createdAt_not_null | n | NOT NULL "createdAt" | | agents_messages_id_not_null | n | NOT NULL id | @@ -24,16 +26,14 @@ | agents_messages_role_not_null | n | NOT NULL role | | agents_messages_threadId_not_null | n | NOT NULL "threadId" | | agents_messages_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_81020dc608dfb0af1ede386d907 | PRIMARY KEY | PRIMARY KEY (id) | -| FK_0a8057a61afabd2999608ffd0d9 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES agents_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_81020dc608dfb0af1ede386d907 | CREATE UNIQUE INDEX "PK_81020dc608dfb0af1ede386d907" ON public.agents_messages USING btree (id) | -| IDX_fc7bf858660bfafd19181e8e35 | CREATE INDEX "IDX_fc7bf858660bfafd19181e8e35" ON public.agents_messages USING btree ("threadId", "createdAt") | | IDX_agents_messages_threadId_createdAt | CREATE INDEX "IDX_agents_messages_threadId_createdAt" ON public.agents_messages USING btree ("threadId", "createdAt") | +| IDX_fc7bf858660bfafd19181e8e35 | CREATE INDEX "IDX_fc7bf858660bfafd19181e8e35" ON public.agents_messages USING btree ("threadId", "createdAt") | +| PK_81020dc608dfb0af1ede386d907 | CREATE UNIQUE INDEX "PK_81020dc608dfb0af1ede386d907" ON public.agents_messages USING btree (id) | ## Relations @@ -43,21 +43,21 @@ erDiagram "public.agents_messages" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_messages" { - varchar_36_ id - varchar_255_ threadId FK - varchar_255_ resourceId - varchar_36_ role - varchar_36_ type json content timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_255_ resourceId + varchar_36_ role + varchar_255_ threadId FK + varchar_36_ type timestamp_3__with_time_zone updatedAt } "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_observation_cursors.md b/docs/generated/postgres-schema/public.agents_observation_cursors.md index 2636ec4c849..40bb9477736 100644 --- a/docs/generated/postgres-schema/public.agents_observation_cursors.md +++ b/docs/generated/postgres-schema/public.agents_observation_cursors.md @@ -5,32 +5,32 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this cursor | -| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream checkpointed by this cursor | -| lastObservedMessageId | varchar(36) | | false | | | | -| lastObservedAt | timestamp(3) with time zone | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| lastObservedAt | timestamp(3) with time zone | | false | | | | +| lastObservedMessageId | varchar(36) | | false | | | | +| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream checkpointed by this cursor | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_64e92819f4b413661ed6e2c3c3d | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| FK_87aa187d27ea67eafd164905154 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | +| PK_eb777ac57ab872d38f8ebd19317 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") | | agents_observation_cursors_agentId_not_null | n | NOT NULL "agentId" | | agents_observation_cursors_createdAt_not_null | n | NOT NULL "createdAt" | | agents_observation_cursors_lastObservedAt_not_null | n | NOT NULL "lastObservedAt" | | agents_observation_cursors_lastObservedMessageId_not_null | n | NOT NULL "lastObservedMessageId" | | agents_observation_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" | | agents_observation_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_64e92819f4b413661ed6e2c3c3d | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_eb777ac57ab872d38f8ebd19317 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") | -| FK_87aa187d27ea67eafd164905154 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_eb777ac57ab872d38f8ebd19317 | CREATE UNIQUE INDEX "PK_eb777ac57ab872d38f8ebd19317" ON public.agents_observation_cursors USING btree ("agentId", "observationScopeId") | | IDX_87aa187d27ea67eafd16490515 | CREATE INDEX "IDX_87aa187d27ea67eafd16490515" ON public.agents_observation_cursors USING btree ("observationScopeId") | +| PK_eb777ac57ab872d38f8ebd19317 | CREATE UNIQUE INDEX "PK_eb777ac57ab872d38f8ebd19317" ON public.agents_observation_cursors USING btree ("agentId", "observationScopeId") | ## Relations @@ -42,32 +42,32 @@ erDiagram "public.agents_observation_cursors" { varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId FK timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_observation_locks.md b/docs/generated/postgres-schema/public.agents_observation_locks.md index 968a44b6034..0eb4de0b957 100644 --- a/docs/generated/postgres-schema/public.agents_observation_locks.md +++ b/docs/generated/postgres-schema/public.agents_observation_locks.md @@ -5,11 +5,11 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this lock | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| heldUntil | timestamp(3) with time zone | | false | | | | +| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID | | observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream locked for observation tasks | | taskKind | varchar(20) | | false | | | | -| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID | -| heldUntil | timestamp(3) with time zone | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -17,6 +17,9 @@ | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_agents_observation_locks_taskKind | CHECK | CHECK ((("taskKind")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[]))) | +| FK_093e44ae20f2518e97d83a95433 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| FK_6b55089892e447c2f82e5ec60ed | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | +| PK_7e2e315162ac3d80587e15ac2c3 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId", "taskKind") | | agents_observation_locks_agentId_not_null | n | NOT NULL "agentId" | | agents_observation_locks_createdAt_not_null | n | NOT NULL "createdAt" | | agents_observation_locks_heldUntil_not_null | n | NOT NULL "heldUntil" | @@ -24,16 +27,13 @@ | agents_observation_locks_observationScopeId_not_null | n | NOT NULL "observationScopeId" | | agents_observation_locks_taskKind_not_null | n | NOT NULL "taskKind" | | agents_observation_locks_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_093e44ae20f2518e97d83a95433 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| PK_7e2e315162ac3d80587e15ac2c3 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId", "taskKind") | -| FK_6b55089892e447c2f82e5ec60ed | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_7e2e315162ac3d80587e15ac2c3 | CREATE UNIQUE INDEX "PK_7e2e315162ac3d80587e15ac2c3" ON public.agents_observation_locks USING btree ("agentId", "observationScopeId", "taskKind") | | IDX_6b55089892e447c2f82e5ec60e | CREATE INDEX "IDX_6b55089892e447c2f82e5ec60e" ON public.agents_observation_locks USING btree ("observationScopeId") | +| PK_7e2e315162ac3d80587e15ac2c3 | CREATE UNIQUE INDEX "PK_7e2e315162ac3d80587e15ac2c3" ON public.agents_observation_locks USING btree ("agentId", "observationScopeId", "taskKind") | ## Relations @@ -45,33 +45,33 @@ erDiagram "public.agents_observation_locks" { varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId varchar_255_ observationScopeId FK varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_observations.md b/docs/generated/postgres-schema/public.agents_observations.md index caba3bb3117..6cecb9ff490 100644 --- a/docs/generated/postgres-schema/public.agents_observations.md +++ b/docs/generated/postgres-schema/public.agents_observations.md @@ -4,16 +4,16 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.agents_observations](public.agents_observations.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) | | Application-generated n8n string ID, not a database UUID | | agentId | varchar(36) | | false | | [public.agents](public.agents.md) | Agent that owns this observation row | -| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream for this observation log | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_observations](public.agents_observations.md) | | Application-generated n8n string ID, not a database UUID | | marker | varchar(16) | | false | | | | -| text | text | | false | | | | +| observationScopeId | varchar(255) | | false | | [public.agents_threads](public.agents_threads.md) | agents_threads.id source stream for this observation log | | parentId | varchar(36) | | true | | [public.agents_observations](public.agents_observations.md) | | -| tokenCount | integer | 0 | false | | | | | status | varchar(16) | | false | | | | | supersededBy | varchar(36) | | true | | [public.agents_observations](public.agents_observations.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| text | text | | false | | | | +| tokenCount | integer | 0 | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -22,6 +22,11 @@ | ---- | ---- | ---------- | | CHK_agents_observations_marker | CHECK | CHECK (((marker)::text = ANY ((ARRAY['critical'::character varying, 'important'::character varying, 'info'::character varying, 'completion'::character varying])::text[]))) | | CHK_agents_observations_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) | +| FK_127ee1078ffa952bb37b511efad | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_observations(id) | +| FK_4cfd8a70ebb0a5b0cf047dca3cf | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | +| FK_501e2d1701a10e24fb69ab5fc5f | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES agents_observations(id) | +| FK_d206432be97b7ed88d187479b1b | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | +| PK_9ad319654d12c2649f7caf27135 | PRIMARY KEY | PRIMARY KEY (id) | | agents_observations_agentId_not_null | n | NOT NULL "agentId" | | agents_observations_createdAt_not_null | n | NOT NULL "createdAt" | | agents_observations_id_not_null | n | NOT NULL id | @@ -31,77 +36,72 @@ | agents_observations_text_not_null | n | NOT NULL text | | agents_observations_tokenCount_not_null | n | NOT NULL "tokenCount" | | agents_observations_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_d206432be97b7ed88d187479b1b | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE | -| FK_127ee1078ffa952bb37b511efad | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES agents_observations(id) | -| FK_501e2d1701a10e24fb69ab5fc5f | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES agents_observations(id) | -| PK_9ad319654d12c2649f7caf27135 | PRIMARY KEY | PRIMARY KEY (id) | -| FK_4cfd8a70ebb0a5b0cf047dca3cf | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_9ad319654d12c2649f7caf27135 | CREATE UNIQUE INDEX "PK_9ad319654d12c2649f7caf27135" ON public.agents_observations USING btree (id) | | IDX_07cb1e4a302629c5fa5d74d2bb | CREATE INDEX "IDX_07cb1e4a302629c5fa5d74d2bb" ON public.agents_observations USING btree ("agentId", "observationScopeId", status) | +| IDX_127ee1078ffa952bb37b511efa | CREATE INDEX "IDX_127ee1078ffa952bb37b511efa" ON public.agents_observations USING btree ("supersededBy") | | IDX_4cfd8a70ebb0a5b0cf047dca3c | CREATE INDEX "IDX_4cfd8a70ebb0a5b0cf047dca3c" ON public.agents_observations USING btree ("observationScopeId") | | IDX_501e2d1701a10e24fb69ab5fc5 | CREATE INDEX "IDX_501e2d1701a10e24fb69ab5fc5" ON public.agents_observations USING btree ("parentId") | -| IDX_127ee1078ffa952bb37b511efa | CREATE INDEX "IDX_127ee1078ffa952bb37b511efa" ON public.agents_observations USING btree ("supersededBy") | +| PK_9ad319654d12c2649f7caf27135 | CREATE UNIQUE INDEX "PK_9ad319654d12c2649f7caf27135" ON public.agents_observations USING btree (id) | ## Relations ```mermaid erDiagram +"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(id) ON DELETE CASCADE" "public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;supersededBy#quot;) REFERENCES agents_observations(id)" "public.agents_observations" }o--o| "public.agents_observations" : "FOREIGN KEY (#quot;parentId#quot;) REFERENCES agents_observations(id)" -"public.agents_memory_entry_sources" }o--|| "public.agents_observations" : "FOREIGN KEY (#quot;observationId#quot;) REFERENCES agents_observations(id) ON DELETE CASCADE" -"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE" "public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_observations" { - varchar_36_ id varchar_36_ agentId FK - varchar_255_ observationScopeId FK + timestamp_3__with_time_zone createdAt + varchar_36_ id varchar_16_ marker - text text + varchar_255_ observationScopeId FK varchar_36_ parentId FK - integer tokenCount varchar_16_ status varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_sources" { - varchar_36_ id - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - text evidenceText - timestamp_3__with_time_zone createdAt + text text + integer tokenCount timestamp_3__with_time_zone updatedAt } "public.agents" { - varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt + varchar_512_ description + varchar_36_ id + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.agents_memory_entry_sources" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_64_ evidenceHash + text evidenceText + varchar_36_ id + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + timestamp_3__with_time_zone updatedAt } "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_resources.md b/docs/generated/postgres-schema/public.agents_resources.md index 71627242b85..93ab87be445 100644 --- a/docs/generated/postgres-schema/public.agents_resources.md +++ b/docs/generated/postgres-schema/public.agents_resources.md @@ -4,19 +4,19 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | id | varchar(255) | | false | [public.agents_memory_entries](public.agents_memory_entries.md) [public.agents_memory_entry_locks](public.agents_memory_entry_locks.md) | | | | metadata | text | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_fa6b20b2d31a9991529dbf8ef7d | PRIMARY KEY | PRIMARY KEY (id) | | agents_resources_createdAt_not_null | n | NOT NULL "createdAt" | | agents_resources_id_not_null | n | NOT NULL id | | agents_resources_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_fa6b20b2d31a9991529dbf8ef7d | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -33,32 +33,32 @@ erDiagram "public.agents_memory_entry_locks" }o--|| "public.agents_resources" : "FOREIGN KEY (#quot;resourceId#quot;) REFERENCES agents_resources(id) ON DELETE CASCADE" "public.agents_resources" { + timestamp_3__with_time_zone createdAt varchar_255_ id text metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents_memory_entries" { - varchar_36_ id varchar_36_ agentId FK - varchar_255_ resourceId FK text content varchar_64_ contentHash + timestamp_3__with_time_zone createdAt + json embedding + varchar_128_ embeddingModel + varchar_36_ id + timestamp_3__with_time_zone lastSeenAt + json metadata + varchar_255_ resourceId FK varchar_16_ status varchar_36_ supersededBy FK - varchar_128_ embeddingModel - json embedding - json metadata - timestamp_3__with_time_zone lastSeenAt - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents_memory_entry_locks" { varchar_36_ agentId FK - varchar_255_ resourceId FK - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ resourceId FK timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.agents_threads.md b/docs/generated/postgres-schema/public.agents_threads.md index 71b84c19260..606edddac5d 100644 --- a/docs/generated/postgres-schema/public.agents_threads.md +++ b/docs/generated/postgres-schema/public.agents_threads.md @@ -4,22 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(128) | | false | [public.agents_messages](public.agents_messages.md) [public.agents_observations](public.agents_observations.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(128) | | false | [public.agents_memory_entry_cursors](public.agents_memory_entry_cursors.md) [public.agents_memory_entry_sources](public.agents_memory_entry_sources.md) [public.agents_messages](public.agents_messages.md) [public.agents_observation_cursors](public.agents_observation_cursors.md) [public.agents_observation_locks](public.agents_observation_locks.md) [public.agents_observations](public.agents_observations.md) | | | +| metadata | text | | true | | | | | resourceId | varchar(255) | | false | | | | | title | varchar(255) | | true | | | | -| metadata | text | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_4a3feb0a13ffe315c009cce64e5 | PRIMARY KEY | PRIMARY KEY (id) | | agents_threads_createdAt_not_null | n | NOT NULL "createdAt" | | agents_threads_id_not_null | n | NOT NULL id | | agents_threads_resourceId_not_null | n | NOT NULL "resourceId" | | agents_threads_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_4a3feb0a13ffe315c009cce64e5 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -33,78 +33,78 @@ ```mermaid erDiagram +"public.agents_memory_entry_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_messages" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_observation_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_observation_locks" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_memory_entry_sources" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" -"public.agents_memory_entry_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" +"public.agents_observations" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE" "public.agents_threads" { + timestamp_3__with_time_zone createdAt varchar_128_ id + text metadata varchar_255_ resourceId varchar_255_ title - text metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_messages" { - varchar_36_ id - varchar_255_ threadId FK - varchar_255_ resourceId - varchar_36_ role - varchar_36_ type - json content - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observations" { - varchar_36_ id - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_16_ marker - text text - varchar_36_ parentId FK - integer tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observation_cursors" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_observation_locks" { - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.agents_memory_entry_sources" { - varchar_36_ id - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - text evidenceText - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.agents_memory_entry_cursors" { varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_36_ lastIndexedObservationId - timestamp_3__with_time_zone lastIndexedObservationCreatedAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_memory_entry_sources" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_64_ evidenceHash + text evidenceText + varchar_36_ id + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_messages" { + json content + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_255_ resourceId + varchar_36_ role + varchar_255_ threadId FK + varchar_36_ type + timestamp_3__with_time_zone updatedAt +} +"public.agents_observation_cursors" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId FK + timestamp_3__with_time_zone updatedAt +} +"public.agents_observation_locks" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId + varchar_255_ observationScopeId FK + varchar_20_ taskKind + timestamp_3__with_time_zone updatedAt +} +"public.agents_observations" { + varchar_36_ agentId FK + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_16_ marker + varchar_255_ observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + text text + integer tokenCount timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.ai_builder_temporary_workflow.md b/docs/generated/postgres-schema/public.ai_builder_temporary_workflow.md index 30b4a3b4e5e..5de55a0242f 100644 --- a/docs/generated/postgres-schema/public.ai_builder_temporary_workflow.md +++ b/docs/generated/postgres-schema/public.ai_builder_temporary_workflow.md @@ -4,74 +4,74 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_39b07732e819fb561d74c38763f | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| FK_85a87a1ba0f61999fe11dc56325 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_85a87a1ba0f61999fe11dc56325 | PRIMARY KEY | PRIMARY KEY ("workflowId") | | ai_builder_temporary_workflow_createdAt_not_null | n | NOT NULL "createdAt" | | ai_builder_temporary_workflow_threadId_not_null | n | NOT NULL "threadId" | | ai_builder_temporary_workflow_updatedAt_not_null | n | NOT NULL "updatedAt" | | ai_builder_temporary_workflow_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_85a87a1ba0f61999fe11dc56325 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| FK_39b07732e819fb561d74c38763f | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_85a87a1ba0f61999fe11dc56325 | PRIMARY KEY | PRIMARY KEY ("workflowId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_85a87a1ba0f61999fe11dc56325 | CREATE UNIQUE INDEX "PK_85a87a1ba0f61999fe11dc56325" ON public.ai_builder_temporary_workflow USING btree ("workflowId") | | IDX_39b07732e819fb561d74c38763 | CREATE INDEX "IDX_39b07732e819fb561d74c38763" ON public.ai_builder_temporary_workflow USING btree ("threadId") | +| PK_85a87a1ba0f61999fe11dc56325 | CREATE UNIQUE INDEX "PK_85a87a1ba0f61999fe11dc56325" ON public.ai_builder_temporary_workflow USING btree ("workflowId") | ## Relations ```mermaid erDiagram -"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.ai_builder_temporary_workflow" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.ai_builder_temporary_workflow" { - varchar_36_ workflowId FK - uuid threadId FK timestamp_3__with_time_zone createdAt + uuid threadId FK + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt + uuid id + json metadata + varchar_36_ projectId FK + varchar_255_ resourceId + text title timestamp_3__with_time_zone updatedAt } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId -} -"public.instance_ai_threads" { - uuid id - varchar_255_ resourceId - text title - json metadata - timestamp_3__with_time_zone createdAt + json staticData + integer triggerCount timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.annotation_tag_entity.md b/docs/generated/postgres-schema/public.annotation_tag_entity.md index 8b89db6576d..67740581c8d 100644 --- a/docs/generated/postgres-schema/public.annotation_tag_entity.md +++ b/docs/generated/postgres-schema/public.annotation_tag_entity.md @@ -4,27 +4,27 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | id | varchar(16) | | false | [public.execution_annotation_tags](public.execution_annotation_tags.md) | | | | name | varchar(24) | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_69dfa041592c30bbc0d4b84aa00 | PRIMARY KEY | PRIMARY KEY (id) | | annotation_tag_entity_createdAt_not_null | n | NOT NULL "createdAt" | | annotation_tag_entity_id_not_null | n | NOT NULL id | | annotation_tag_entity_name_not_null | n | NOT NULL name | | annotation_tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_69dfa041592c30bbc0d4b84aa00 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_69dfa041592c30bbc0d4b84aa00 | CREATE UNIQUE INDEX "PK_69dfa041592c30bbc0d4b84aa00" ON public.annotation_tag_entity USING btree (id) | | IDX_ae51b54c4bb430cf92f48b623f | CREATE UNIQUE INDEX "IDX_ae51b54c4bb430cf92f48b623f" ON public.annotation_tag_entity USING btree (name) | +| PK_69dfa041592c30bbc0d4b84aa00 | CREATE UNIQUE INDEX "PK_69dfa041592c30bbc0d4b84aa00" ON public.annotation_tag_entity USING btree (id) | ## Relations @@ -34,9 +34,9 @@ erDiagram "public.execution_annotation_tags" }o--|| "public.annotation_tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES annotation_tag_entity(id) ON DELETE CASCADE" "public.annotation_tag_entity" { + timestamp_3__with_time_zone createdAt varchar_16_ id varchar_24_ name - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.execution_annotation_tags" { diff --git a/docs/generated/postgres-schema/public.auth_identity.md b/docs/generated/postgres-schema/public.auth_identity.md index f38a1aac548..d2c3e673434 100644 --- a/docs/generated/postgres-schema/public.auth_identity.md +++ b/docs/generated/postgres-schema/public.auth_identity.md @@ -4,22 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| userId | uuid | | true | | [public.user](public.user.md) | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | providerId | varchar(255) | | false | | | | | providerType | varchar(32) | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | true | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | auth_identity_createdAt_not_null | n | NOT NULL "createdAt" | +| auth_identity_pkey | PRIMARY KEY | PRIMARY KEY ("providerId", "providerType") | | auth_identity_providerId_not_null | n | NOT NULL "providerId" | | auth_identity_providerType_not_null | n | NOT NULL "providerType" | | auth_identity_updatedAt_not_null | n | NOT NULL "updatedAt" | | auth_identity_userId_fkey | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) | -| auth_identity_pkey | PRIMARY KEY | PRIMARY KEY ("providerId", "providerType") | ## Indexes @@ -35,28 +35,28 @@ erDiagram "public.auth_identity" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id)" "public.auth_identity" { - uuid userId FK + timestamp_3__with_time_zone createdAt varchar_255_ providerId varchar_32_ providerType - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.auth_provider_sync_history.md b/docs/generated/postgres-schema/public.auth_provider_sync_history.md index 7213ca01b15..0f681cba193 100644 --- a/docs/generated/postgres-schema/public.auth_provider_sync_history.md +++ b/docs/generated/postgres-schema/public.auth_provider_sync_history.md @@ -4,17 +4,17 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| created | integer | | false | | | | +| disabled | integer | | false | | | | +| endedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | | +| error | text | | true | | | | | id | integer | nextval('auth_provider_sync_history_id_seq'::regclass) | false | | | | | providerType | varchar(32) | | false | | | | | runMode | text | | false | | | | -| status | text | | false | | | | -| startedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | | -| endedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | | | scanned | integer | | false | | | | -| created | integer | | false | | | | +| startedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP | false | | | | +| status | text | | false | | | | | updated | integer | | false | | | | -| disabled | integer | | false | | | | -| error | text | | true | | | | ## Constraints @@ -24,13 +24,13 @@ | auth_provider_sync_history_disabled_not_null | n | NOT NULL disabled | | auth_provider_sync_history_endedAt_not_null | n | NOT NULL "endedAt" | | auth_provider_sync_history_id_not_null | n | NOT NULL id | +| auth_provider_sync_history_pkey | PRIMARY KEY | PRIMARY KEY (id) | | auth_provider_sync_history_providerType_not_null | n | NOT NULL "providerType" | | auth_provider_sync_history_runMode_not_null | n | NOT NULL "runMode" | | auth_provider_sync_history_scanned_not_null | n | NOT NULL scanned | | auth_provider_sync_history_startedAt_not_null | n | NOT NULL "startedAt" | | auth_provider_sync_history_status_not_null | n | NOT NULL status | | auth_provider_sync_history_updated_not_null | n | NOT NULL updated | -| auth_provider_sync_history_pkey | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -45,17 +45,17 @@ erDiagram "public.auth_provider_sync_history" { + integer created + integer disabled + timestamp_3__with_time_zone endedAt + text error integer id varchar_32_ providerType text runMode - text status - timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone endedAt integer scanned - integer created + timestamp_3__with_time_zone startedAt + text status integer updated - integer disabled - text error } ``` diff --git a/docs/generated/postgres-schema/public.binary_data.md b/docs/generated/postgres-schema/public.binary_data.md index 5dd15b6a717..22d62e04692 100644 --- a/docs/generated/postgres-schema/public.binary_data.md +++ b/docs/generated/postgres-schema/public.binary_data.md @@ -4,14 +4,14 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| fileId | uuid | | false | | | | -| sourceType | varchar(50) | | false | | | Source the file belongs to, e.g. 'execution' | -| sourceId | varchar(255) | | false | | | ID of the source, e.g. execution ID | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | data | bytea | | false | | | Raw, not base64 encoded | -| mimeType | varchar(255) | | true | | | | +| fileId | uuid | | false | | | | | fileName | varchar(255) | | true | | | | | fileSize | integer | | false | | | In bytes | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| mimeType | varchar(255) | | true | | | | +| sourceId | varchar(255) | | false | | | ID of the source, e.g. execution ID | +| sourceType | varchar(50) | | false | | | Source the file belongs to, e.g. 'execution' | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -19,6 +19,7 @@ | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_binary_data_sourceType | CHECK | CHECK ((("sourceType")::text = ANY ((ARRAY['execution'::character varying, 'chat_message_attachment'::character varying, 'agent_file'::character varying])::text[]))) | +| PK_fc3691585b39408bb0551122af6 | PRIMARY KEY | PRIMARY KEY ("fileId") | | binary_data_createdAt_not_null | n | NOT NULL "createdAt" | | binary_data_data_not_null | n | NOT NULL data | | binary_data_fileId_not_null | n | NOT NULL "fileId" | @@ -26,14 +27,13 @@ | binary_data_sourceId_not_null | n | NOT NULL "sourceId" | | binary_data_sourceType_not_null | n | NOT NULL "sourceType" | | binary_data_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_fc3691585b39408bb0551122af6 | PRIMARY KEY | PRIMARY KEY ("fileId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_fc3691585b39408bb0551122af6 | CREATE UNIQUE INDEX "PK_fc3691585b39408bb0551122af6" ON public.binary_data USING btree ("fileId") | | IDX_56900edc3cfd16612e2ef2c6a8 | CREATE INDEX "IDX_56900edc3cfd16612e2ef2c6a8" ON public.binary_data USING btree ("sourceType", "sourceId") | +| PK_fc3691585b39408bb0551122af6 | CREATE UNIQUE INDEX "PK_fc3691585b39408bb0551122af6" ON public.binary_data USING btree ("fileId") | ## Relations @@ -42,14 +42,14 @@ erDiagram "public.binary_data" { - uuid fileId - varchar_50_ sourceType - varchar_255_ sourceId + timestamp_3__with_time_zone createdAt bytea data - varchar_255_ mimeType + uuid fileId varchar_255_ fileName integer fileSize - timestamp_3__with_time_zone createdAt + varchar_255_ mimeType + varchar_255_ sourceId + varchar_50_ sourceType timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.chat_hub_agent_tools.md b/docs/generated/postgres-schema/public.chat_hub_agent_tools.md index 09fb03d4896..a7d6e2e812b 100644 --- a/docs/generated/postgres-schema/public.chat_hub_agent_tools.md +++ b/docs/generated/postgres-schema/public.chat_hub_agent_tools.md @@ -11,11 +11,11 @@ | Name | Type | Definition | | ---- | ---- | ---------- | -| chat_hub_agent_tools_agentId_not_null | n | NOT NULL "agentId" | -| chat_hub_agent_tools_toolId_not_null | n | NOT NULL "toolId" | | FK_2b53d796b3dbae91b1a9553c048 | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE CASCADE | | FK_43e70f04c53344f82483d0570f6 | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE | | PK_cc8806fdea48297a7d497035d72 | PRIMARY KEY | PRIMARY KEY ("agentId", "toolId") | +| chat_hub_agent_tools_agentId_not_null | n | NOT NULL "agentId" | +| chat_hub_agent_tools_toolId_not_null | n | NOT NULL "toolId" | ## Indexes @@ -36,29 +36,29 @@ erDiagram uuid toolId FK } "public.chat_hub_agents" { - uuid id - varchar_256_ name - varchar_512_ description - text systemPrompt - uuid ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon + varchar_36_ credentialId FK + varchar_512_ description json files + json icon + uuid id + varchar_64_ model + varchar_256_ name + uuid ownerId FK + varchar_16_ provider json suggestedPrompts + text systemPrompt + timestamp_3__with_time_zone updatedAt } "public.chat_hub_tools" { - uuid id - varchar_255_ name - varchar_255_ type - double_precision typeVersion - uuid ownerId FK + timestamp_3__with_time_zone createdAt json definition boolean enabled - timestamp_3__with_time_zone createdAt + uuid id + varchar_255_ name + uuid ownerId FK + varchar_255_ type + double_precision typeVersion timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.chat_hub_agents.md b/docs/generated/postgres-schema/public.chat_hub_agents.md index 8377d382a7c..17276ebaed2 100644 --- a/docs/generated/postgres-schema/public.chat_hub_agents.md +++ b/docs/generated/postgres-schema/public.chat_hub_agents.md @@ -4,24 +4,27 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) | | | -| name | varchar(256) | | false | | | | -| description | varchar(512) | | true | | | | -| systemPrompt | text | | false | | | | -| ownerId | uuid | | false | | [public.user](public.user.md) | | -| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | | -| provider | varchar(16) | | false | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" | -| model | varchar(64) | | false | | | Model name used at the respective Model node, ie. "gpt-4" | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| icon | json | | true | | | | +| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | | +| description | varchar(512) | | true | | | | | files | json | '[]'::json | false | | | | +| icon | json | | true | | | | +| id | uuid | | false | [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) | | | +| model | varchar(64) | | false | | | Model name used at the respective Model node, ie. "gpt-4" | +| name | varchar(256) | | false | | | | +| ownerId | uuid | | false | | [public.user](public.user.md) | | +| provider | varchar(16) | | false | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" | | suggestedPrompts | json | '[]'::json | false | | | | +| systemPrompt | text | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_441ba2caba11e077ce3fbfa2cd8 | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE | +| FK_9c61ad497dcbae499c96a6a78ba | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL | +| PK_f39a3b36bbdf0e2979ddb21cf78 | PRIMARY KEY | PRIMARY KEY (id) | | chat_hub_agents_createdAt_not_null | n | NOT NULL "createdAt" | | chat_hub_agents_files_not_null | n | NOT NULL files | | chat_hub_agents_id_not_null | n | NOT NULL id | @@ -32,9 +35,6 @@ | chat_hub_agents_suggestedPrompts_not_null | n | NOT NULL "suggestedPrompts" | | chat_hub_agents_systemPrompt_not_null | n | NOT NULL "systemPrompt" | | chat_hub_agents_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_441ba2caba11e077ce3fbfa2cd8 | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_9c61ad497dcbae499c96a6a78ba | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL | -| PK_f39a3b36bbdf0e2979ddb21cf78 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -47,94 +47,94 @@ ```mermaid erDiagram -"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" -"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" -"public.chat_hub_agent_tools" }o--|| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE CASCADE" -"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.chat_hub_agents" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" +"public.chat_hub_agent_tools" }o--|| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE CASCADE" +"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" +"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" +"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.chat_hub_agents" { - uuid id - varchar_256_ name + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK varchar_512_ description - text systemPrompt - uuid ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon json files - json suggestedPrompts -} -"public.chat_hub_sessions" { + json icon uuid id - varchar_256_ title + varchar_64_ model + varchar_256_ name uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt + json suggestedPrompts + text systemPrompt timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_128_ agentName - varchar_16_ type } -"public.chat_hub_messages" { - uuid id - uuid sessionId FK - uuid previousMessageId FK - uuid revisionOfMessageId FK - uuid retryOfMessageId FK - varchar_16_ type - varchar_128_ name - text content - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - integer executionId FK +"public.credentials_entity" { timestamp_3__with_time_zone createdAt + text data + varchar_36_ id + boolean isGlobal + boolean isManaged + boolean isResolvable + varchar_128_ name + boolean resolvableAllowFallback + varchar_16_ resolverId FK + varchar_128_ type timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_16_ status - json attachments } "public.chat_hub_agent_tools" { uuid agentId FK uuid toolId FK } -"public.user" { +"public.chat_hub_messages" { + uuid agentId FK + json attachments + text content + timestamp_3__with_time_zone createdAt + integer executionId FK uuid id + varchar_256_ model + varchar_128_ name + uuid previousMessageId FK + varchar_16_ provider + uuid retryOfMessageId FK + uuid revisionOfMessageId FK + uuid sessionId FK + varchar_16_ status + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_sessions" { + uuid agentId FK + varchar_128_ agentName + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.user" { + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type - timestamp_3__with_time_zone createdAt + json settings timestamp_3__with_time_zone updatedAt - varchar_36_ id - boolean isManaged - boolean isGlobal - boolean isResolvable - boolean resolvableAllowFallback - varchar_16_ resolverId FK } ``` diff --git a/docs/generated/postgres-schema/public.chat_hub_messages.md b/docs/generated/postgres-schema/public.chat_hub_messages.md index 416d61194aa..a102b84125f 100644 --- a/docs/generated/postgres-schema/public.chat_hub_messages.md +++ b/docs/generated/postgres-schema/public.chat_hub_messages.md @@ -4,28 +4,36 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) | | | -| sessionId | uuid | | false | | [public.chat_hub_sessions](public.chat_hub_sessions.md) | | -| previousMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | | -| revisionOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | | -| retryOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | | -| type | varchar(16) | | false | | | ChatHubMessageType enum: "human", "ai", "system", "tool", "generic" | -| name | varchar(128) | | false | | | | -| content | text | | false | | | | -| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" | -| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" | -| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | | -| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | agentId | uuid | | true | | [public.chat_hub_agents](public.chat_hub_agents.md) | ID of the custom agent (if provider is "custom-agent") | -| status | varchar(16) | 'success'::character varying | false | | | ChatHubMessageStatus enum, eg. "success", "error", "running", "cancelled" | | attachments | json | | true | | | File attachments for the message (if any), stored as JSON. Files are stored as base64-encoded data URLs. | +| content | text | | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | | +| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) | | | +| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" | +| name | varchar(128) | | false | | | | +| previousMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | | +| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" | +| retryOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | | +| revisionOfMessageId | uuid | | true | | [public.chat_hub_messages](public.chat_hub_messages.md) | | +| sessionId | uuid | | false | | [public.chat_hub_sessions](public.chat_hub_sessions.md) | | +| status | varchar(16) | 'success'::character varying | false | | | ChatHubMessageStatus enum, eg. "success", "error", "running", "cancelled" | +| type | varchar(16) | | false | | | ChatHubMessageType enum: "human", "ai", "system", "tool", "generic" | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_1f4998c8a7dec9e00a9ab15550e | FOREIGN KEY | FOREIGN KEY ("revisionOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE | +| FK_25c9736e7f769f3a005eef4b372 | FOREIGN KEY | FOREIGN KEY ("retryOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE | +| FK_6afb260449dd7a9b85355d4e0c9 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL | +| FK_acf8926098f063cdbbad8497fd1 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL | +| FK_chat_hub_messages_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL | +| FK_e22538eb50a71a17954cd7e076c | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE | +| FK_e5d1fa722c5a8d38ac204746662 | FOREIGN KEY | FOREIGN KEY ("previousMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE | +| PK_7704a5add6baed43eef835f0bfb | PRIMARY KEY | PRIMARY KEY (id) | | chat_hub_messages_content_not_null | n | NOT NULL content | | chat_hub_messages_createdAt_not_null | n | NOT NULL "createdAt" | | chat_hub_messages_id_not_null | n | NOT NULL id | @@ -34,124 +42,116 @@ | chat_hub_messages_status_not_null | n | NOT NULL status | | chat_hub_messages_type_not_null | n | NOT NULL type | | chat_hub_messages_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_6afb260449dd7a9b85355d4e0c9 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL | -| FK_acf8926098f063cdbbad8497fd1 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL | -| FK_e22538eb50a71a17954cd7e076c | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE | -| FK_1f4998c8a7dec9e00a9ab15550e | FOREIGN KEY | FOREIGN KEY ("revisionOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE | -| FK_25c9736e7f769f3a005eef4b372 | FOREIGN KEY | FOREIGN KEY ("retryOfMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE | -| FK_e5d1fa722c5a8d38ac204746662 | FOREIGN KEY | FOREIGN KEY ("previousMessageId") REFERENCES chat_hub_messages(id) ON DELETE CASCADE | -| PK_7704a5add6baed43eef835f0bfb | PRIMARY KEY | PRIMARY KEY (id) | -| FK_chat_hub_messages_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_7704a5add6baed43eef835f0bfb | CREATE UNIQUE INDEX "PK_7704a5add6baed43eef835f0bfb" ON public.chat_hub_messages USING btree (id) | | IDX_chat_hub_messages_sessionId | CREATE INDEX "IDX_chat_hub_messages_sessionId" ON public.chat_hub_messages USING btree ("sessionId") | +| PK_7704a5add6baed43eef835f0bfb | CREATE UNIQUE INDEX "PK_7704a5add6baed43eef835f0bfb" ON public.chat_hub_messages USING btree (id) | ## Relations ```mermaid erDiagram +"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" +"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" "public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;revisionOfMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;retryOfMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--o| "public.chat_hub_messages" : "FOREIGN KEY (#quot;previousMessageId#quot;) REFERENCES chat_hub_messages(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" -"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" -"public.chat_hub_messages" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" "public.chat_hub_messages" { - uuid id - uuid sessionId FK - uuid previousMessageId FK - uuid revisionOfMessageId FK - uuid retryOfMessageId FK - varchar_16_ type - varchar_128_ name - text content - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - integer executionId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt uuid agentId FK - varchar_16_ status json attachments -} -"public.chat_hub_sessions" { + text content + timestamp_3__with_time_zone createdAt + integer executionId FK uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_128_ agentName - varchar_16_ type -} -"public.workflow_entity" { varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt + uuid previousMessageId FK + varchar_16_ provider + uuid retryOfMessageId FK + uuid revisionOfMessageId FK + uuid sessionId FK + varchar_16_ status + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_agents" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_512_ description + json files + json icon + uuid id + varchar_64_ model + varchar_256_ name + uuid ownerId FK + varchar_16_ provider + json suggestedPrompts + text systemPrompt timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId } "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK varchar_36_ workflowVersionId } -"public.chat_hub_agents" { - uuid id - varchar_256_ name - varchar_512_ description - text systemPrompt - uuid ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model +"public.chat_hub_sessions" { + uuid agentId FK + varchar_128_ agentName timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type timestamp_3__with_time_zone updatedAt - json icon - json files - json suggestedPrompts + varchar_36_ workflowId FK +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.chat_hub_session_tools.md b/docs/generated/postgres-schema/public.chat_hub_session_tools.md index 05e65c082b5..1a6cb7a1452 100644 --- a/docs/generated/postgres-schema/public.chat_hub_session_tools.md +++ b/docs/generated/postgres-schema/public.chat_hub_session_tools.md @@ -11,11 +11,11 @@ | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_6596a328affd8d4967ffb303eee | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE | +| FK_e649bf1295f4ed8d4299ed290f9 | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE | +| PK_87aea76ff4c274c4a5ac838ebe3 | PRIMARY KEY | PRIMARY KEY ("sessionId", "toolId") | | chat_hub_session_tools_sessionId_not_null | n | NOT NULL "sessionId" | | chat_hub_session_tools_toolId_not_null | n | NOT NULL "toolId" | -| FK_e649bf1295f4ed8d4299ed290f9 | FOREIGN KEY | FOREIGN KEY ("sessionId") REFERENCES chat_hub_sessions(id) ON DELETE CASCADE | -| FK_6596a328affd8d4967ffb303eee | FOREIGN KEY | FOREIGN KEY ("toolId") REFERENCES chat_hub_tools(id) ON DELETE CASCADE | -| PK_87aea76ff4c274c4a5ac838ebe3 | PRIMARY KEY | PRIMARY KEY ("sessionId", "toolId") | ## Indexes @@ -36,29 +36,29 @@ erDiagram uuid toolId FK } "public.chat_hub_sessions" { - uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt uuid agentId FK varchar_128_ agentName + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.chat_hub_tools" { - uuid id - varchar_255_ name - varchar_255_ type - double_precision typeVersion - uuid ownerId FK + timestamp_3__with_time_zone createdAt json definition boolean enabled - timestamp_3__with_time_zone createdAt + uuid id + varchar_255_ name + uuid ownerId FK + varchar_255_ type + double_precision typeVersion timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.chat_hub_sessions.md b/docs/generated/postgres-schema/public.chat_hub_sessions.md index 285f828710a..e27222bc539 100644 --- a/docs/generated/postgres-schema/public.chat_hub_sessions.md +++ b/docs/generated/postgres-schema/public.chat_hub_sessions.md @@ -4,25 +4,30 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | | | -| title | varchar(256) | | false | | | | -| ownerId | uuid | | false | | [public.user](public.user.md) | | -| lastMessageAt | timestamp(3) with time zone | | false | | | | -| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | | -| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" | -| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" | -| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | agentId | uuid | | true | | [public.chat_hub_agents](public.chat_hub_agents.md) | ID of the custom agent (if provider is "custom-agent") | | agentName | varchar(128) | | true | | | Cached name of the custom agent (if provider is "custom-agent") | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| credentialId | varchar(36) | | true | | [public.credentials_entity](public.credentials_entity.md) | | +| id | uuid | | false | [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | | | +| lastMessageAt | timestamp(3) with time zone | | false | | | | +| model | varchar(256) | | true | | | Model name used at the respective Model node, ie. "gpt-4" | +| ownerId | uuid | | false | | [public.user](public.user.md) | | +| provider | varchar(16) | | true | | | ChatHubProvider enum: "openai", "anthropic", "google", "n8n" | +| title | varchar(256) | | false | | | | | type | varchar(16) | 'production'::character varying | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_chat_hub_sessions_type | CHECK | CHECK (((type)::text = ANY ((ARRAY['production'::character varying, 'manual'::character varying])::text[]))) | +| FK_7bc13b4c7e6afbfaf9be326c189 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL | +| FK_9f9293d9f552496c40e0d1a8f80 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL | +| FK_chat_hub_sessions_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL | +| FK_e9ecf8ede7d989fcd18790fe36a | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_1eafef1273c70e4464fec703412 | PRIMARY KEY | PRIMARY KEY (id) | | chat_hub_sessions_createdAt_not_null | n | NOT NULL "createdAt" | | chat_hub_sessions_id_not_null | n | NOT NULL id | | chat_hub_sessions_lastMessageAt_not_null | n | NOT NULL "lastMessageAt" | @@ -30,135 +35,130 @@ | chat_hub_sessions_title_not_null | n | NOT NULL title | | chat_hub_sessions_type_not_null | n | NOT NULL type | | chat_hub_sessions_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_e9ecf8ede7d989fcd18790fe36a | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_9f9293d9f552496c40e0d1a8f80 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL | -| FK_7bc13b4c7e6afbfaf9be326c189 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE SET NULL | -| PK_1eafef1273c70e4464fec703412 | PRIMARY KEY | PRIMARY KEY (id) | -| FK_chat_hub_sessions_agentId | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES chat_hub_agents(id) ON DELETE SET NULL | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_1eafef1273c70e4464fec703412 | CREATE UNIQUE INDEX "PK_1eafef1273c70e4464fec703412" ON public.chat_hub_sessions USING btree (id) | | IDX_chat_hub_sessions_owner_lastmsg_id | CREATE INDEX "IDX_chat_hub_sessions_owner_lastmsg_id" ON public.chat_hub_sessions USING btree ("ownerId", "lastMessageAt" DESC, id) | +| PK_1eafef1273c70e4464fec703412 | CREATE UNIQUE INDEX "PK_1eafef1273c70e4464fec703412" ON public.chat_hub_sessions USING btree (id) | ## Relations ```mermaid erDiagram +"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" +"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" "public.chat_hub_messages" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" "public.chat_hub_session_tools" }o--|| "public.chat_hub_sessions" : "FOREIGN KEY (#quot;sessionId#quot;) REFERENCES chat_hub_sessions(id) ON DELETE CASCADE" "public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" "public.chat_hub_sessions" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" -"public.chat_hub_sessions" }o--o| "public.chat_hub_agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES chat_hub_agents(id) ON DELETE SET NULL" "public.chat_hub_sessions" { - uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt uuid agentId FK varchar_128_ agentName + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_agents" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_512_ description + json files + json icon + uuid id + varchar_64_ model + varchar_256_ name + uuid ownerId FK + varchar_16_ provider + json suggestedPrompts + text systemPrompt + timestamp_3__with_time_zone updatedAt +} +"public.credentials_entity" { + timestamp_3__with_time_zone createdAt + text data + varchar_36_ id + boolean isGlobal + boolean isManaged + boolean isResolvable + varchar_128_ name + boolean resolvableAllowFallback + varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt } "public.chat_hub_messages" { - uuid id - uuid sessionId FK - uuid previousMessageId FK - uuid revisionOfMessageId FK - uuid retryOfMessageId FK - varchar_16_ type - varchar_128_ name - text content - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - integer executionId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt uuid agentId FK - varchar_16_ status json attachments + text content + timestamp_3__with_time_zone createdAt + integer executionId FK + uuid id + varchar_256_ model + varchar_128_ name + uuid previousMessageId FK + varchar_16_ provider + uuid retryOfMessageId FK + uuid revisionOfMessageId FK + uuid sessionId FK + varchar_16_ status + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.chat_hub_session_tools" { uuid sessionId FK uuid toolId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type - timestamp_3__with_time_zone createdAt + json settings timestamp_3__with_time_zone updatedAt - varchar_36_ id - boolean isManaged - boolean isGlobal - boolean isResolvable - boolean resolvableAllowFallback - varchar_16_ resolverId FK } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId -} -"public.chat_hub_agents" { - uuid id - varchar_256_ name - varchar_512_ description - text systemPrompt - uuid ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - timestamp_3__with_time_zone createdAt + json staticData + integer triggerCount timestamp_3__with_time_zone updatedAt - json icon - json files - json suggestedPrompts + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.chat_hub_tools.md b/docs/generated/postgres-schema/public.chat_hub_tools.md index 7dc2312079c..05bea5d1a20 100644 --- a/docs/generated/postgres-schema/public.chat_hub_tools.md +++ b/docs/generated/postgres-schema/public.chat_hub_tools.md @@ -4,20 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | [public.chat_hub_session_tools](public.chat_hub_session_tools.md) [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) | | | -| name | varchar(255) | | false | | | | -| type | varchar(255) | | false | | | | -| typeVersion | double precision | | false | | | | -| ownerId | uuid | | false | | [public.user](public.user.md) | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | definition | json | | false | | | | | enabled | boolean | true | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | uuid | | false | [public.chat_hub_agent_tools](public.chat_hub_agent_tools.md) [public.chat_hub_session_tools](public.chat_hub_session_tools.md) | | | +| name | varchar(255) | | false | | | | +| ownerId | uuid | | false | | [public.user](public.user.md) | | +| type | varchar(255) | | false | | | | +| typeVersion | double precision | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_b8030b47af9213f1fd15450fb7f | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_696d26426c704fba79b2c195ef5 | PRIMARY KEY | PRIMARY KEY (id) | | chat_hub_tools_createdAt_not_null | n | NOT NULL "createdAt" | | chat_hub_tools_definition_not_null | n | NOT NULL definition | | chat_hub_tools_enabled_not_null | n | NOT NULL enabled | @@ -27,60 +29,58 @@ | chat_hub_tools_typeVersion_not_null | n | NOT NULL "typeVersion" | | chat_hub_tools_type_not_null | n | NOT NULL type | | chat_hub_tools_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_b8030b47af9213f1fd15450fb7f | FOREIGN KEY | FOREIGN KEY ("ownerId") REFERENCES "user"(id) ON DELETE CASCADE | -| PK_696d26426c704fba79b2c195ef5 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_696d26426c704fba79b2c195ef5 | CREATE UNIQUE INDEX "PK_696d26426c704fba79b2c195ef5" ON public.chat_hub_tools USING btree (id) | | IDX_4c72ebdb265d1775bf61147af0 | CREATE UNIQUE INDEX "IDX_4c72ebdb265d1775bf61147af0" ON public.chat_hub_tools USING btree ("ownerId", name) | +| PK_696d26426c704fba79b2c195ef5 | CREATE UNIQUE INDEX "PK_696d26426c704fba79b2c195ef5" ON public.chat_hub_tools USING btree (id) | ## Relations ```mermaid erDiagram -"public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" "public.chat_hub_agent_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" +"public.chat_hub_session_tools" }o--|| "public.chat_hub_tools" : "FOREIGN KEY (#quot;toolId#quot;) REFERENCES chat_hub_tools(id) ON DELETE CASCADE" "public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.chat_hub_tools" { - uuid id - varchar_255_ name - varchar_255_ type - double_precision typeVersion - uuid ownerId FK + timestamp_3__with_time_zone createdAt json definition boolean enabled - timestamp_3__with_time_zone createdAt + uuid id + varchar_255_ name + uuid ownerId FK + varchar_255_ type + double_precision typeVersion timestamp_3__with_time_zone updatedAt } -"public.chat_hub_session_tools" { - uuid sessionId FK - uuid toolId FK -} "public.chat_hub_agent_tools" { uuid agentId FK uuid toolId FK } +"public.chat_hub_session_tools" { + uuid sessionId FK + uuid toolId FK +} "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.credential_dependency.md b/docs/generated/postgres-schema/public.credential_dependency.md index 0d64ec95402..392925de42d 100644 --- a/docs/generated/postgres-schema/public.credential_dependency.md +++ b/docs/generated/postgres-schema/public.credential_dependency.md @@ -4,32 +4,32 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | integer | | false | | | | -| credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | | -| dependencyType | varchar(64) | | false | | | | -| dependencyId | varchar(255) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | | +| dependencyId | varchar(255) | | false | | | | +| dependencyType | varchar(64) | | false | | | | +| id | integer | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_5ec8e8c8d3539f3696cf73b43bf | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE | +| PK_80212729ed0ffa0709417ab28f4 | PRIMARY KEY | PRIMARY KEY (id) | | credential_dependency_createdAt_not_null | n | NOT NULL "createdAt" | | credential_dependency_credentialId_not_null | n | NOT NULL "credentialId" | | credential_dependency_dependencyId_not_null | n | NOT NULL "dependencyId" | | credential_dependency_dependencyType_not_null | n | NOT NULL "dependencyType" | | credential_dependency_id_not_null | n | NOT NULL id | -| FK_5ec8e8c8d3539f3696cf73b43bf | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE | -| PK_80212729ed0ffa0709417ab28f4 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_80212729ed0ffa0709417ab28f4 | CREATE UNIQUE INDEX "PK_80212729ed0ffa0709417ab28f4" ON public.credential_dependency USING btree (id) | | IDX_5ec8e8c8d3539f3696cf73b43b | CREATE INDEX "IDX_5ec8e8c8d3539f3696cf73b43b" ON public.credential_dependency USING btree ("credentialId") | | IDX_91ee85fa9619dd6776725e117b | CREATE INDEX "IDX_91ee85fa9619dd6776725e117b" ON public.credential_dependency USING btree ("dependencyType", "dependencyId") | | IDX_credential_dependency_credentialId_dependencyType_dependenc | CREATE UNIQUE INDEX "IDX_credential_dependency_credentialId_dependencyType_dependenc" ON public.credential_dependency USING btree ("credentialId", "dependencyType", "dependencyId") | +| PK_80212729ed0ffa0709417ab28f4 | CREATE UNIQUE INDEX "PK_80212729ed0ffa0709417ab28f4" ON public.credential_dependency USING btree (id) | ## Relations @@ -39,24 +39,24 @@ erDiagram "public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" "public.credential_dependency" { - integer id - varchar_36_ credentialId FK - varchar_64_ dependencyType - varchar_255_ dependencyId timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_255_ dependencyId + varchar_64_ dependencyType + integer id } "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.credentials_entity.md b/docs/generated/postgres-schema/public.credentials_entity.md index 2c447130464..b7088d0f3ce 100644 --- a/docs/generated/postgres-schema/public.credentials_entity.md +++ b/docs/generated/postgres-schema/public.credentials_entity.md @@ -4,17 +4,17 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| name | varchar(128) | | false | | | | -| data | text | | false | | | | -| type | varchar(128) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| id | varchar(36) | | false | [public.shared_credentials](public.shared_credentials.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) [public.credential_dependency](public.credential_dependency.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | | | -| isManaged | boolean | false | false | | | | +| data | text | | false | | | | +| id | varchar(36) | | false | [public.chat_hub_agents](public.chat_hub_agents.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.credential_dependency](public.credential_dependency.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) [public.shared_credentials](public.shared_credentials.md) | | | | isGlobal | boolean | false | false | | | | +| isManaged | boolean | false | false | | | | | isResolvable | boolean | false | false | | | | +| name | varchar(128) | | false | | | | | resolvableAllowFallback | boolean | false | false | | | | | resolverId | varchar(16) | | true | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | | +| type | varchar(128) | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -27,122 +27,122 @@ | credentials_entity_isManaged_not_null | n | NOT NULL "isManaged" | | credentials_entity_isResolvable_not_null | n | NOT NULL "isResolvable" | | credentials_entity_name_not_null | n | NOT NULL name | +| credentials_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) | | credentials_entity_resolvableAllowFallback_not_null | n | NOT NULL "resolvableAllowFallback" | +| credentials_entity_resolverId_foreign | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL | | credentials_entity_type_not_null | n | NOT NULL type | | credentials_entity_updatedAt_not_null | n | NOT NULL "updatedAt" | -| credentials_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) | -| credentials_entity_resolverId_foreign | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL | ## Indexes | Name | Definition | | ---- | ---------- | +| credentials_entity_pkey | CREATE UNIQUE INDEX credentials_entity_pkey ON public.credentials_entity USING btree (id) | | idx_07fde106c0b471d8cc80a64fc8 | CREATE INDEX idx_07fde106c0b471d8cc80a64fc8 ON public.credentials_entity USING btree (type) | | pk_credentials_entity_id | CREATE UNIQUE INDEX pk_credentials_entity_id ON public.credentials_entity USING btree (id) | -| credentials_entity_pkey | CREATE UNIQUE INDEX credentials_entity_pkey ON public.credentials_entity USING btree (id) | ## Relations ```mermaid erDiagram -"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" "public.chat_hub_agents" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" -"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.chat_hub_sessions" }o--o| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE SET NULL" "public.credential_dependency" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.dynamic_credential_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" "public.instance_ai_mcp_registry_connections" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" +"public.shared_credentials" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialsId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" "public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL" "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt } -"public.shared_credentials" { - varchar_36_ credentialsId FK - varchar_36_ projectId FK - text role +"public.chat_hub_agents" { timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_512_ description + json files + json icon + uuid id + varchar_64_ model + varchar_256_ name + uuid ownerId FK + varchar_16_ provider + json suggestedPrompts + text systemPrompt timestamp_3__with_time_zone updatedAt } "public.chat_hub_sessions" { - uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt uuid agentId FK varchar_128_ agentName - varchar_16_ type -} -"public.chat_hub_agents" { - uuid id - varchar_256_ name - varchar_512_ description - text systemPrompt - uuid ownerId FK + timestamp_3__with_time_zone createdAt varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK varchar_16_ provider - varchar_64_ model - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon - json files - json suggestedPrompts -} -"public.dynamic_credential_user_entry" { - varchar_16_ credentialId FK - uuid userId FK - varchar_16_ resolverId FK - text data - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.dynamic_credential_entry" { - varchar_16_ credential_id FK - varchar_2048_ subject_id - varchar_16_ resolver_id FK - text data - timestamp_3__with_time_zone createdAt + varchar_256_ title + varchar_16_ type timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.credential_dependency" { - integer id - varchar_36_ credentialId FK - varchar_64_ dependencyType - varchar_255_ dependencyId timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_255_ dependencyId + varchar_64_ dependencyType + integer id +} +"public.dynamic_credential_entry" { + timestamp_3__with_time_zone createdAt + varchar_16_ credential_id FK + text data + varchar_16_ resolver_id FK + varchar_2048_ subject_id + timestamp_3__with_time_zone updatedAt +} +"public.dynamic_credential_user_entry" { + timestamp_3__with_time_zone createdAt + varchar_16_ credentialId FK + text data + varchar_16_ resolverId FK + timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.instance_ai_mcp_registry_connections" { - uuid id + timestamp_3__with_time_zone createdAt varchar_36_ credentialId FK + uuid id varchar_255_ serverSlug FK json toolFilter + timestamp_3__with_time_zone updatedAt uuid userId FK +} +"public.shared_credentials" { timestamp_3__with_time_zone createdAt + varchar_36_ credentialsId FK + varchar_36_ projectId FK + text role timestamp_3__with_time_zone updatedAt } "public.dynamic_credential_resolver" { + text config + timestamp_3__with_time_zone createdAt varchar_16_ id varchar_128_ name varchar_128_ type - text config - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.data_table.md b/docs/generated/postgres-schema/public.data_table.md index 60928cb1987..05667e6d60f 100644 --- a/docs/generated/postgres-schema/public.data_table.md +++ b/docs/generated/postgres-schema/public.data_table.md @@ -4,24 +4,24 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | id | varchar(36) | | false | [public.data_table_column](public.data_table_column.md) | | | | name | varchar(128) | | false | | | | | projectId | varchar(36) | | false | | [public.project](public.project.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_c2a794257dee48af7c9abf681de | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| PK_e226d0001b9e6097cbfe70617cb | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_b23096ef747281ac944d28e8b0d | UNIQUE | UNIQUE ("projectId", name) | | data_table_createdAt_not_null | n | NOT NULL "createdAt" | | data_table_id_not_null | n | NOT NULL id | | data_table_name_not_null | n | NOT NULL name | | data_table_projectId_not_null | n | NOT NULL "projectId" | | data_table_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_c2a794257dee48af7c9abf681de | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| PK_e226d0001b9e6097cbfe70617cb | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_b23096ef747281ac944d28e8b0d | UNIQUE | UNIQUE ("projectId", name) | ## Indexes @@ -39,31 +39,31 @@ erDiagram "public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.data_table" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.data_table_column" { + timestamp_3__with_time_zone createdAt + varchar_36_ dataTableId FK varchar_36_ id + integer index varchar_128_ name varchar_32_ type - integer index - varchar_36_ dataTableId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } ``` diff --git a/docs/generated/postgres-schema/public.data_table_column.md b/docs/generated/postgres-schema/public.data_table_column.md index 12a1f1f7b85..b79a5701fd6 100644 --- a/docs/generated/postgres-schema/public.data_table_column.md +++ b/docs/generated/postgres-schema/public.data_table_column.md @@ -4,18 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| dataTableId | varchar(36) | | false | | [public.data_table](public.data_table.md) | | | id | varchar(36) | | false | | | | +| index | integer | | false | | | Column order, starting from 0 (0 = first column) | | name | varchar(128) | | false | | | | | type | varchar(32) | | false | | | Expected: string, number, boolean, or date (not enforced as a constraint) | -| index | integer | | false | | | Column order, starting from 0 (0 = first column) | -| dataTableId | varchar(36) | | false | | [public.data_table](public.data_table.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_930b6e8faaf88294cef23484160 | FOREIGN KEY | FOREIGN KEY ("dataTableId") REFERENCES data_table(id) ON DELETE CASCADE | +| PK_673cb121ee4a8a5e27850c72c51 | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_8082ec4890f892f0bc77473a123 | UNIQUE | UNIQUE ("dataTableId", name) | | data_table_column_createdAt_not_null | n | NOT NULL "createdAt" | | data_table_column_dataTableId_not_null | n | NOT NULL "dataTableId" | | data_table_column_id_not_null | n | NOT NULL id | @@ -23,9 +26,6 @@ | data_table_column_name_not_null | n | NOT NULL name | | data_table_column_type_not_null | n | NOT NULL type | | data_table_column_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_930b6e8faaf88294cef23484160 | FOREIGN KEY | FOREIGN KEY ("dataTableId") REFERENCES data_table(id) ON DELETE CASCADE | -| PK_673cb121ee4a8a5e27850c72c51 | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_8082ec4890f892f0bc77473a123 | UNIQUE | UNIQUE ("dataTableId", name) | ## Indexes @@ -42,19 +42,19 @@ erDiagram "public.data_table_column" }o--|| "public.data_table" : "FOREIGN KEY (#quot;dataTableId#quot;) REFERENCES data_table(id) ON DELETE CASCADE" "public.data_table_column" { + timestamp_3__with_time_zone createdAt + varchar_36_ dataTableId FK varchar_36_ id + integer index varchar_128_ name varchar_32_ type - integer index - varchar_36_ dataTableId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.data_table" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.deployment_key.md b/docs/generated/postgres-schema/public.deployment_key.md index 7d747f52e82..a4e0c2fccb5 100644 --- a/docs/generated/postgres-schema/public.deployment_key.md +++ b/docs/generated/postgres-schema/public.deployment_key.md @@ -4,37 +4,37 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| type | varchar(64) | | false | | | | -| value | text | | false | | | | | algorithm | varchar(20) | | true | | | | -| status | varchar(20) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | | | | +| status | varchar(20) | | false | | | | +| type | varchar(64) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| value | text | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_94bb7aeb5def5a0284a5fe9f9a0 | PRIMARY KEY | PRIMARY KEY (id) | | deployment_key_createdAt_not_null | n | NOT NULL "createdAt" | | deployment_key_id_not_null | n | NOT NULL id | | deployment_key_status_not_null | n | NOT NULL status | | deployment_key_type_not_null | n | NOT NULL type | | deployment_key_updatedAt_not_null | n | NOT NULL "updatedAt" | | deployment_key_value_not_null | n | NOT NULL value | -| PK_94bb7aeb5def5a0284a5fe9f9a0 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_94bb7aeb5def5a0284a5fe9f9a0 | CREATE UNIQUE INDEX "PK_94bb7aeb5def5a0284a5fe9f9a0" ON public.deployment_key USING btree (id) | | IDX_deployment_key_data_encryption_active | CREATE UNIQUE INDEX "IDX_deployment_key_data_encryption_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'data_encryption'::text)) | | IDX_deployment_key_instance_id_active | CREATE UNIQUE INDEX "IDX_deployment_key_instance_id_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'instance.id'::text)) | -| IDX_deployment_key_signing_jwt_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_jwt_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.jwt'::text)) | -| IDX_deployment_key_signing_hmac_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_hmac_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.hmac'::text)) | -| IDX_deployment_key_signing_binary_data_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_binary_data_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.binary_data'::text)) | | IDX_deployment_key_jwe_private_key_active | CREATE UNIQUE INDEX "IDX_deployment_key_jwe_private_key_active" ON public.deployment_key USING btree (type, algorithm) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'jwe.private-key'::text)) | +| IDX_deployment_key_signing_binary_data_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_binary_data_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.binary_data'::text)) | +| IDX_deployment_key_signing_hmac_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_hmac_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.hmac'::text)) | +| IDX_deployment_key_signing_jwt_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_jwt_active" ON public.deployment_key USING btree (type) WHERE (((status)::text = 'active'::text) AND ((type)::text = 'signing.jwt'::text)) | +| PK_94bb7aeb5def5a0284a5fe9f9a0 | CREATE UNIQUE INDEX "PK_94bb7aeb5def5a0284a5fe9f9a0" ON public.deployment_key USING btree (id) | ## Relations @@ -43,13 +43,13 @@ erDiagram "public.deployment_key" { - varchar_36_ id - varchar_64_ type - text value varchar_20_ algorithm - varchar_20_ status timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_20_ status + varchar_64_ type timestamp_3__with_time_zone updatedAt + text value } ``` diff --git a/docs/generated/postgres-schema/public.dynamic_credential_entry.md b/docs/generated/postgres-schema/public.dynamic_credential_entry.md index 9566d2d7dfa..8aa6eaa757d 100644 --- a/docs/generated/postgres-schema/public.dynamic_credential_entry.md +++ b/docs/generated/postgres-schema/public.dynamic_credential_entry.md @@ -4,34 +4,34 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| credential_id | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | | -| subject_id | varchar(2048) | | false | | | | -| resolver_id | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | | -| data | text | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| credential_id | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | | +| data | text | | false | | | | +| resolver_id | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | | +| subject_id | varchar(2048) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_a6d1dd080958304a47a02952aab | FOREIGN KEY | FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE | +| FK_d61a12235d268a49af6a3c09c13 | FOREIGN KEY | FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE | +| PK_5135ffcabecad4727ff6b9b803d | PRIMARY KEY | PRIMARY KEY (credential_id, subject_id, resolver_id) | | tmp_dynamic_credential_entry_createdAt_not_null | n | NOT NULL "createdAt" | | tmp_dynamic_credential_entry_credential_id_not_null | n | NOT NULL credential_id | | tmp_dynamic_credential_entry_data_not_null | n | NOT NULL data | | tmp_dynamic_credential_entry_resolver_id_not_null | n | NOT NULL resolver_id | | tmp_dynamic_credential_entry_subject_id_not_null | n | NOT NULL subject_id | | tmp_dynamic_credential_entry_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_a6d1dd080958304a47a02952aab | FOREIGN KEY | FOREIGN KEY (credential_id) REFERENCES credentials_entity(id) ON DELETE CASCADE | -| FK_d61a12235d268a49af6a3c09c13 | FOREIGN KEY | FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE | -| PK_5135ffcabecad4727ff6b9b803d | PRIMARY KEY | PRIMARY KEY (credential_id, subject_id, resolver_id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_5135ffcabecad4727ff6b9b803d | CREATE UNIQUE INDEX "PK_5135ffcabecad4727ff6b9b803d" ON public.dynamic_credential_entry USING btree (credential_id, subject_id, resolver_id) | | IDX_62476b94b56d9dc7ed9ed75d3d | CREATE INDEX "IDX_62476b94b56d9dc7ed9ed75d3d" ON public.dynamic_credential_entry USING btree (subject_id) | | IDX_d61a12235d268a49af6a3c09c1 | CREATE INDEX "IDX_d61a12235d268a49af6a3c09c1" ON public.dynamic_credential_entry USING btree (resolver_id) | +| PK_5135ffcabecad4727ff6b9b803d | CREATE UNIQUE INDEX "PK_5135ffcabecad4727ff6b9b803d" ON public.dynamic_credential_entry USING btree (credential_id, subject_id, resolver_id) | ## Relations @@ -42,32 +42,32 @@ erDiagram "public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" "public.dynamic_credential_entry" { - varchar_16_ credential_id FK - varchar_2048_ subject_id - varchar_16_ resolver_id FK - text data timestamp_3__with_time_zone createdAt + varchar_16_ credential_id FK + text data + varchar_16_ resolver_id FK + varchar_2048_ subject_id timestamp_3__with_time_zone updatedAt } "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt } "public.dynamic_credential_resolver" { + text config + timestamp_3__with_time_zone createdAt varchar_16_ id varchar_128_ name varchar_128_ type - text config - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.dynamic_credential_resolver.md b/docs/generated/postgres-schema/public.dynamic_credential_resolver.md index 59b66b7665c..10105bf72f9 100644 --- a/docs/generated/postgres-schema/public.dynamic_credential_resolver.md +++ b/docs/generated/postgres-schema/public.dynamic_credential_resolver.md @@ -4,31 +4,31 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(16) | | false | [public.credentials_entity](public.credentials_entity.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) | | | -| name | varchar(128) | | false | | | | -| type | varchar(128) | | false | | | | | config | text | | false | | | Encrypted resolver configuration (JSON encrypted as string) | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(16) | | false | [public.credentials_entity](public.credentials_entity.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) | | | +| name | varchar(128) | | false | | | | +| type | varchar(128) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_b76cfb088dcdaf5275e9980bb64 | PRIMARY KEY | PRIMARY KEY (id) | | dynamic_credential_resolver_config_not_null | n | NOT NULL config | | dynamic_credential_resolver_createdAt_not_null | n | NOT NULL "createdAt" | | dynamic_credential_resolver_id_not_null | n | NOT NULL id | | dynamic_credential_resolver_name_not_null | n | NOT NULL name | | dynamic_credential_resolver_type_not_null | n | NOT NULL type | | dynamic_credential_resolver_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_b76cfb088dcdaf5275e9980bb64 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_b76cfb088dcdaf5275e9980bb64 | CREATE UNIQUE INDEX "PK_b76cfb088dcdaf5275e9980bb64" ON public.dynamic_credential_resolver USING btree (id) | | IDX_9c9ee9df586e60bb723234e499 | CREATE INDEX "IDX_9c9ee9df586e60bb723234e499" ON public.dynamic_credential_resolver USING btree (type) | +| PK_b76cfb088dcdaf5275e9980bb64 | CREATE UNIQUE INDEX "PK_b76cfb088dcdaf5275e9980bb64" ON public.dynamic_credential_resolver USING btree (id) | ## Relations @@ -36,46 +36,46 @@ erDiagram "public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL" -"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" "public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" "public.dynamic_credential_resolver" { + text config + timestamp_3__with_time_zone createdAt varchar_16_ id varchar_128_ name varchar_128_ type - text config - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK -} -"public.dynamic_credential_user_entry" { - varchar_16_ credentialId FK - uuid userId FK - varchar_16_ resolverId FK - text data - timestamp_3__with_time_zone createdAt + varchar_128_ type timestamp_3__with_time_zone updatedAt } "public.dynamic_credential_entry" { - varchar_16_ credential_id FK - varchar_2048_ subject_id - varchar_16_ resolver_id FK - text data timestamp_3__with_time_zone createdAt + varchar_16_ credential_id FK + text data + varchar_16_ resolver_id FK + varchar_2048_ subject_id timestamp_3__with_time_zone updatedAt } +"public.dynamic_credential_user_entry" { + timestamp_3__with_time_zone createdAt + varchar_16_ credentialId FK + text data + varchar_16_ resolverId FK + timestamp_3__with_time_zone updatedAt + uuid userId FK +} ``` --- diff --git a/docs/generated/postgres-schema/public.dynamic_credential_user_entry.md b/docs/generated/postgres-schema/public.dynamic_credential_user_entry.md index f8ee0380fc2..bf62db4025b 100644 --- a/docs/generated/postgres-schema/public.dynamic_credential_user_entry.md +++ b/docs/generated/postgres-schema/public.dynamic_credential_user_entry.md @@ -4,35 +4,35 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| credentialId | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | | -| userId | uuid | | false | | [public.user](public.user.md) | | -| resolverId | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | | -| data | text | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| credentialId | varchar(16) | | false | | [public.credentials_entity](public.credentials_entity.md) | | +| data | text | | false | | | | +| resolverId | varchar(16) | | false | | [public.dynamic_credential_resolver](public.dynamic_credential_resolver.md) | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_6edec973a6450990977bb854c38 | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE | +| FK_945ba70b342a066d1306b12ccd2 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE | +| FK_a36dc616fabc3f736bb82410a22 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_74f548e633abc66dc27c8f0ca77 | PRIMARY KEY | PRIMARY KEY ("credentialId", "userId", "resolverId") | | dynamic_credential_user_entry_createdAt_not_null | n | NOT NULL "createdAt" | | dynamic_credential_user_entry_credentialId_not_null | n | NOT NULL "credentialId" | | dynamic_credential_user_entry_data_not_null | n | NOT NULL data | | dynamic_credential_user_entry_resolverId_not_null | n | NOT NULL "resolverId" | | dynamic_credential_user_entry_updatedAt_not_null | n | NOT NULL "updatedAt" | | dynamic_credential_user_entry_userId_not_null | n | NOT NULL "userId" | -| FK_a36dc616fabc3f736bb82410a22 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_945ba70b342a066d1306b12ccd2 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE | -| FK_6edec973a6450990977bb854c38 | FOREIGN KEY | FOREIGN KEY ("resolverId") REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE | -| PK_74f548e633abc66dc27c8f0ca77 | PRIMARY KEY | PRIMARY KEY ("credentialId", "userId", "resolverId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_74f548e633abc66dc27c8f0ca77 | CREATE UNIQUE INDEX "PK_74f548e633abc66dc27c8f0ca77" ON public.dynamic_credential_user_entry USING btree ("credentialId", "userId", "resolverId") | -| IDX_a36dc616fabc3f736bb82410a2 | CREATE INDEX "IDX_a36dc616fabc3f736bb82410a2" ON public.dynamic_credential_user_entry USING btree ("userId") | | IDX_6edec973a6450990977bb854c3 | CREATE INDEX "IDX_6edec973a6450990977bb854c3" ON public.dynamic_credential_user_entry USING btree ("resolverId") | +| IDX_a36dc616fabc3f736bb82410a2 | CREATE INDEX "IDX_a36dc616fabc3f736bb82410a2" ON public.dynamic_credential_user_entry USING btree ("userId") | +| PK_74f548e633abc66dc27c8f0ca77 | CREATE UNIQUE INDEX "PK_74f548e633abc66dc27c8f0ca77" ON public.dynamic_credential_user_entry USING btree ("credentialId", "userId", "resolverId") | ## Relations @@ -40,53 +40,53 @@ erDiagram "public.dynamic_credential_user_entry" }o--|| "public.credentials_entity" : "FOREIGN KEY (#quot;credentialId#quot;) REFERENCES credentials_entity(id) ON DELETE CASCADE" -"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.dynamic_credential_user_entry" { - varchar_16_ credentialId FK - uuid userId FK - varchar_16_ resolverId FK - text data timestamp_3__with_time_zone createdAt + varchar_16_ credentialId FK + text data + varchar_16_ resolverId FK timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK -} -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt + varchar_128_ type timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK } "public.dynamic_credential_resolver" { + text config + timestamp_3__with_time_zone createdAt varchar_16_ id varchar_128_ name varchar_128_ type - text config + timestamp_3__with_time_zone updatedAt +} +"public.user" { timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.evaluation_collection.md b/docs/generated/postgres-schema/public.evaluation_collection.md index 6d18bd52aa3..242d8663642 100644 --- a/docs/generated/postgres-schema/public.evaluation_collection.md +++ b/docs/generated/postgres-schema/public.evaluation_collection.md @@ -4,130 +4,130 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.test_run](public.test_run.md) | | | -| name | varchar(128) | | false | | | | -| description | text | | true | | | | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| evaluationConfigId | varchar(36) | | false | | [public.evaluation_config](public.evaluation_config.md) | | -| createdById | uuid | | true | | [public.user](public.user.md) | | -| insightsCache | json | | true | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| createdById | uuid | | true | | [public.user](public.user.md) | | +| description | text | | true | | | | +| evaluationConfigId | varchar(36) | | false | | [public.evaluation_config](public.evaluation_config.md) | | +| id | varchar(36) | | false | [public.test_run](public.test_run.md) | | | +| insightsCache | json | | true | | | | +| name | varchar(128) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_a48ce930c3bc7604894b8f0eaad | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| FK_d634a0c93fd7de68a87eab951b2 | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE CASCADE | +| FK_f4561f38b5a22a4f090d5cd3eae | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL | +| PK_e720b6efc1e45b878ebb0b2ca30 | PRIMARY KEY | PRIMARY KEY (id) | | evaluation_collection_createdAt_not_null | n | NOT NULL "createdAt" | | evaluation_collection_evaluationConfigId_not_null | n | NOT NULL "evaluationConfigId" | | evaluation_collection_id_not_null | n | NOT NULL id | | evaluation_collection_name_not_null | n | NOT NULL name | | evaluation_collection_updatedAt_not_null | n | NOT NULL "updatedAt" | | evaluation_collection_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_f4561f38b5a22a4f090d5cd3eae | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL | -| FK_a48ce930c3bc7604894b8f0eaad | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| FK_d634a0c93fd7de68a87eab951b2 | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE CASCADE | -| PK_e720b6efc1e45b878ebb0b2ca30 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_e720b6efc1e45b878ebb0b2ca30 | CREATE UNIQUE INDEX "PK_e720b6efc1e45b878ebb0b2ca30" ON public.evaluation_collection USING btree (id) | | IDX_a48ce930c3bc7604894b8f0eaa | CREATE INDEX "IDX_a48ce930c3bc7604894b8f0eaa" ON public.evaluation_collection USING btree ("workflowId") | | IDX_d634a0c93fd7de68a87eab951b | CREATE INDEX "IDX_d634a0c93fd7de68a87eab951b" ON public.evaluation_collection USING btree ("evaluationConfigId") | +| PK_e720b6efc1e45b878ebb0b2ca30 | CREATE UNIQUE INDEX "PK_e720b6efc1e45b878ebb0b2ca30" ON public.evaluation_collection USING btree (id) | ## Relations ```mermaid erDiagram +"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE" "public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL" "public.evaluation_collection" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE" -"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" "public.evaluation_collection" { - varchar_36_ id - varchar_128_ name - text description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK + timestamp_3__with_time_zone createdAt uuid createdById FK - json insightsCache - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.test_run" { - varchar_36_ id - varchar_36_ workflowId FK - varchar status - varchar errorCode - json errorDetails - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - jsonb evaluationConfigSnapshot - varchar_36_ collectionId FK -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId -} -"public.evaluation_config" { + varchar_36_ evaluationConfigId FK varchar_36_ id - varchar_36_ workflowId FK + json insightsCache varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - json datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - json metrics - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt +} +"public.evaluation_config" { + timestamp_3__with_time_zone createdAt + json datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id + varchar_64_ invalidReason + json metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt + varchar errorCode + json errorDetails + varchar_36_ evaluationConfigId FK + jsonb evaluationConfigSnapshot + varchar_36_ id + json metrics + timestamp_3__with_time_zone runAt + varchar_255_ runningInstanceId + varchar status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.evaluation_config.md b/docs/generated/postgres-schema/public.evaluation_config.md index 6c88ca36885..e4f1d4c4b97 100644 --- a/docs/generated/postgres-schema/public.evaluation_config.md +++ b/docs/generated/postgres-schema/public.evaluation_config.md @@ -4,23 +4,26 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.test_run](public.test_run.md) [public.evaluation_collection](public.evaluation_collection.md) | | | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| name | varchar(128) | | false | | | | -| status | varchar(16) | 'valid'::character varying | false | | | | -| invalidReason | varchar(64) | | true | | | | -| datasetSource | varchar(32) | | false | | | | -| datasetRef | json | | false | | | | -| startNodeName | varchar(255) | | false | | | | -| endNodeName | varchar(255) | | false | | | | -| metrics | json | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| datasetRef | json | | false | | | | +| datasetSource | varchar(32) | | false | | | | +| endNodeName | varchar(255) | | false | | | | +| id | varchar(36) | | false | [public.evaluation_collection](public.evaluation_collection.md) [public.test_run](public.test_run.md) | | | +| invalidReason | varchar(64) | | true | | | | +| metrics | json | | false | | | | +| name | varchar(128) | | false | | | | +| startNodeName | varchar(255) | | false | | | | +| status | varchar(16) | 'valid'::character varying | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_fd7542bb123074760285dc1bbf3 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_59c14dccf8989df94070c2dcfda | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_3c3c99a712e971835c52292e44c | UNIQUE | UNIQUE ("workflowId", name) | | evaluation_config_createdAt_not_null | n | NOT NULL "createdAt" | | evaluation_config_datasetRef_not_null | n | NOT NULL "datasetRef" | | evaluation_config_datasetSource_not_null | n | NOT NULL "datasetSource" | @@ -32,91 +35,88 @@ | evaluation_config_status_not_null | n | NOT NULL status | | evaluation_config_updatedAt_not_null | n | NOT NULL "updatedAt" | | evaluation_config_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_fd7542bb123074760285dc1bbf3 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| PK_59c14dccf8989df94070c2dcfda | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_3c3c99a712e971835c52292e44c | UNIQUE | UNIQUE ("workflowId", name) | ## Indexes | Name | Definition | | ---- | ---------- | +| IDX_fd7542bb123074760285dc1bbf | CREATE INDEX "IDX_fd7542bb123074760285dc1bbf" ON public.evaluation_config USING btree ("workflowId") | | PK_59c14dccf8989df94070c2dcfda | CREATE UNIQUE INDEX "PK_59c14dccf8989df94070c2dcfda" ON public.evaluation_config USING btree (id) | | UQ_3c3c99a712e971835c52292e44c | CREATE UNIQUE INDEX "UQ_3c3c99a712e971835c52292e44c" ON public.evaluation_config USING btree ("workflowId", name) | -| IDX_fd7542bb123074760285dc1bbf | CREATE INDEX "IDX_fd7542bb123074760285dc1bbf" ON public.evaluation_config USING btree ("workflowId") | ## Relations ```mermaid erDiagram -"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL" "public.evaluation_collection" }o--|| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE CASCADE" +"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL" "public.evaluation_config" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.evaluation_config" { - varchar_36_ id - varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource + timestamp_3__with_time_zone createdAt json datasetRef - varchar_255_ startNodeName + varchar_32_ datasetSource varchar_255_ endNodeName - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.test_run" { varchar_36_ id - varchar_36_ workflowId FK - varchar status - varchar errorCode - json errorDetails - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt + varchar_64_ invalidReason json metrics - timestamp_3__with_time_zone createdAt + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status timestamp_3__with_time_zone updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - jsonb evaluationConfigSnapshot - varchar_36_ collectionId FK + varchar_36_ workflowId FK } "public.evaluation_collection" { - varchar_36_ id - varchar_128_ name - text description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - uuid createdById FK - json insightsCache timestamp_3__with_time_zone createdAt + uuid createdById FK + text description + varchar_36_ evaluationConfigId FK + varchar_36_ id + json insightsCache + varchar_128_ name timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt + varchar errorCode + json errorDetails + varchar_36_ evaluationConfigId FK + jsonb evaluationConfigSnapshot + varchar_36_ id + json metrics + timestamp_3__with_time_zone runAt + varchar_255_ runningInstanceId + varchar status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.event_destinations.md b/docs/generated/postgres-schema/public.event_destinations.md index 4a40ea23c62..5ee8d2a60d0 100644 --- a/docs/generated/postgres-schema/public.event_destinations.md +++ b/docs/generated/postgres-schema/public.event_destinations.md @@ -4,9 +4,9 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | | | | -| destination | jsonb | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| destination | jsonb | | false | | | | +| id | uuid | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -16,8 +16,8 @@ | event_destinations_createdAt_not_null | n | NOT NULL "createdAt" | | event_destinations_destination_not_null | n | NOT NULL destination | | event_destinations_id_not_null | n | NOT NULL id | -| event_destinations_updatedAt_not_null | n | NOT NULL "updatedAt" | | event_destinations_pkey | PRIMARY KEY | PRIMARY KEY (id) | +| event_destinations_updatedAt_not_null | n | NOT NULL "updatedAt" | ## Indexes @@ -32,9 +32,9 @@ erDiagram "public.event_destinations" { - uuid id - jsonb destination timestamp_3__with_time_zone createdAt + jsonb destination + uuid id timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.execution_annotation_tags.md b/docs/generated/postgres-schema/public.execution_annotation_tags.md index ccaeea80fe6..da63cb64ac7 100644 --- a/docs/generated/postgres-schema/public.execution_annotation_tags.md +++ b/docs/generated/postgres-schema/public.execution_annotation_tags.md @@ -11,19 +11,19 @@ | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_a3697779b366e131b2bbdae2976 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES annotation_tag_entity(id) ON DELETE CASCADE | +| FK_c1519757391996eb06064f0e7c8 | FOREIGN KEY | FOREIGN KEY ("annotationId") REFERENCES execution_annotations(id) ON DELETE CASCADE | +| PK_979ec03d31294cca484be65d11f | PRIMARY KEY | PRIMARY KEY ("annotationId", "tagId") | | execution_annotation_tags_annotationId_not_null | n | NOT NULL "annotationId" | | execution_annotation_tags_tagId_not_null | n | NOT NULL "tagId" | -| FK_c1519757391996eb06064f0e7c8 | FOREIGN KEY | FOREIGN KEY ("annotationId") REFERENCES execution_annotations(id) ON DELETE CASCADE | -| FK_a3697779b366e131b2bbdae2976 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES annotation_tag_entity(id) ON DELETE CASCADE | -| PK_979ec03d31294cca484be65d11f | PRIMARY KEY | PRIMARY KEY ("annotationId", "tagId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_979ec03d31294cca484be65d11f | CREATE UNIQUE INDEX "PK_979ec03d31294cca484be65d11f" ON public.execution_annotation_tags USING btree ("annotationId", "tagId") | | IDX_a3697779b366e131b2bbdae297 | CREATE INDEX "IDX_a3697779b366e131b2bbdae297" ON public.execution_annotation_tags USING btree ("tagId") | | IDX_c1519757391996eb06064f0e7c | CREATE INDEX "IDX_c1519757391996eb06064f0e7c" ON public.execution_annotation_tags USING btree ("annotationId") | +| PK_979ec03d31294cca484be65d11f | CREATE UNIQUE INDEX "PK_979ec03d31294cca484be65d11f" ON public.execution_annotation_tags USING btree ("annotationId", "tagId") | ## Relations @@ -38,17 +38,17 @@ erDiagram varchar_24_ tagId FK } "public.execution_annotations" { - integer id - integer executionId FK - varchar_6_ vote - text note timestamp_3__with_time_zone createdAt + integer executionId FK + integer id + text note timestamp_3__with_time_zone updatedAt + varchar_6_ vote } "public.annotation_tag_entity" { + timestamp_3__with_time_zone createdAt varchar_16_ id varchar_24_ name - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.execution_annotations.md b/docs/generated/postgres-schema/public.execution_annotations.md index f8f8548f531..9493478e0ad 100644 --- a/docs/generated/postgres-schema/public.execution_annotations.md +++ b/docs/generated/postgres-schema/public.execution_annotations.md @@ -4,70 +4,70 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | integer | nextval('execution_annotations_id_seq'::regclass) | false | [public.execution_annotation_tags](public.execution_annotation_tags.md) | | | -| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | | -| vote | varchar(6) | | true | | | | -| note | text | | true | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | | +| id | integer | nextval('execution_annotations_id_seq'::regclass) | false | [public.execution_annotation_tags](public.execution_annotation_tags.md) | | | +| note | text | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| vote | varchar(6) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_97f863fa83c4786f19565084960 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE | +| PK_7afcf93ffa20c4252869a7c6a23 | PRIMARY KEY | PRIMARY KEY (id) | | execution_annotations_createdAt_not_null | n | NOT NULL "createdAt" | | execution_annotations_executionId_not_null | n | NOT NULL "executionId" | | execution_annotations_id_not_null | n | NOT NULL id | | execution_annotations_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_97f863fa83c4786f19565084960 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE | -| PK_7afcf93ffa20c4252869a7c6a23 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_7afcf93ffa20c4252869a7c6a23 | CREATE UNIQUE INDEX "PK_7afcf93ffa20c4252869a7c6a23" ON public.execution_annotations USING btree (id) | | IDX_97f863fa83c4786f1956508496 | CREATE UNIQUE INDEX "IDX_97f863fa83c4786f1956508496" ON public.execution_annotations USING btree ("executionId") | +| PK_7afcf93ffa20c4252869a7c6a23 | CREATE UNIQUE INDEX "PK_7afcf93ffa20c4252869a7c6a23" ON public.execution_annotations USING btree (id) | ## Relations ```mermaid erDiagram -"public.execution_annotation_tags" }o--|| "public.execution_annotations" : "FOREIGN KEY (#quot;annotationId#quot;) REFERENCES execution_annotations(id) ON DELETE CASCADE" "public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" +"public.execution_annotation_tags" }o--|| "public.execution_annotations" : "FOREIGN KEY (#quot;annotationId#quot;) REFERENCES execution_annotations(id) ON DELETE CASCADE" "public.execution_annotations" { - integer id - integer executionId FK - varchar_6_ vote - text note timestamp_3__with_time_zone createdAt + integer executionId FK + integer id + text note timestamp_3__with_time_zone updatedAt -} -"public.execution_annotation_tags" { - integer annotationId FK - varchar_24_ tagId FK + varchar_6_ vote } "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK varchar_36_ workflowVersionId } +"public.execution_annotation_tags" { + integer annotationId FK + varchar_24_ tagId FK +} ``` --- diff --git a/docs/generated/postgres-schema/public.execution_data.md b/docs/generated/postgres-schema/public.execution_data.md index 114be7ccf99..b85c68a34c2 100644 --- a/docs/generated/postgres-schema/public.execution_data.md +++ b/docs/generated/postgres-schema/public.execution_data.md @@ -4,9 +4,9 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| data | text | | false | | | | | executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | | | workflowData | json | | false | | | | -| data | text | | false | | | | | workflowVersionId | varchar(36) | | true | | | | ## Constraints @@ -15,9 +15,9 @@ | ---- | ---- | ---------- | | execution_data_data_not_null | n | NOT NULL data | | execution_data_executionId_not_null | n | NOT NULL "executionId" | -| execution_data_workflowData_not_null | n | NOT NULL "workflowData" | | execution_data_fk | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE | | execution_data_pkey | PRIMARY KEY | PRIMARY KEY ("executionId") | +| execution_data_workflowData_not_null | n | NOT NULL "workflowData" | ## Indexes @@ -33,28 +33,28 @@ erDiagram "public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" "public.execution_data" { + text data integer executionId FK json workflowData - text data varchar_36_ workflowVersionId } "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK varchar_36_ workflowVersionId } ``` diff --git a/docs/generated/postgres-schema/public.execution_entity.md b/docs/generated/postgres-schema/public.execution_entity.md index eeb2d81d026..7fe7276c0ab 100644 --- a/docs/generated/postgres-schema/public.execution_entity.md +++ b/docs/generated/postgres-schema/public.execution_entity.md @@ -4,22 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | integer | nextval('execution_entity_id_seq'::regclass) | false | [public.execution_data](public.execution_data.md) [public.execution_metadata](public.execution_metadata.md) [public.execution_annotations](public.execution_annotations.md) [public.test_case_execution](public.test_case_execution.md) [public.chat_hub_messages](public.chat_hub_messages.md) | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| deduplicationKey | varchar(255) | | true | | | | +| deletedAt | timestamp(3) with time zone | | true | | | | | finished | boolean | | false | | | | +| id | integer | nextval('execution_entity_id_seq'::regclass) | false | [public.chat_hub_messages](public.chat_hub_messages.md) [public.execution_annotations](public.execution_annotations.md) [public.execution_data](public.execution_data.md) [public.execution_metadata](public.execution_metadata.md) [public.test_case_execution](public.test_case_execution.md) | | | +| jsonSizeBytes | bigint | 0 | false | | | Byte size of the JSON execution data bundle (run data, workflow snapshot, version id); excludes binary data. 0 means unknown. | | mode | varchar | | false | | | | | retryOf | varchar | | true | | | | | retrySuccessId | varchar | | true | | | | | startedAt | timestamp(3) with time zone | | true | | | | -| stoppedAt | timestamp(3) with time zone | | true | | | | -| waitTill | timestamp(3) with time zone | | true | | | | | status | varchar | | false | | | | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| deletedAt | timestamp(3) with time zone | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| stoppedAt | timestamp(3) with time zone | | true | | | | | storedAt | varchar(2) | 'db'::character varying | false | | | | | tracingContext | json | | true | | | | -| deduplicationKey | varchar(255) | | true | | | | -| jsonSizeBytes | bigint | 0 | false | | | Byte size of the JSON execution data bundle (run data, workflow snapshot, version id); excludes binary data. 0 means unknown. | +| waitTill | timestamp(3) with time zone | | true | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | | workflowVersionId | varchar(36) | NULL::character varying | true | | | Version id of the workflow run by this execution; denormalized from the data bundle. | ## Constraints @@ -35,128 +35,128 @@ | execution_entity_storedAt_check | CHECK | CHECK ((("storedAt")::text = ANY ((ARRAY['db'::character varying, 'fs'::character varying, 's3'::character varying])::text[]))) | | execution_entity_storedAt_not_null | n | NOT NULL "storedAt" | | execution_entity_workflowId_not_null | n | NOT NULL "workflowId" | -| pk_e3e63bbf986767844bbe1166d4e | PRIMARY KEY | PRIMARY KEY (id) | | fk_execution_entity_workflow_id | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| pk_e3e63bbf986767844bbe1166d4e | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| pk_e3e63bbf986767844bbe1166d4e | CREATE UNIQUE INDEX pk_e3e63bbf986767844bbe1166d4e ON public.execution_entity USING btree (id) | -| IDX_execution_entity_deletedAt | CREATE INDEX "IDX_execution_entity_deletedAt" ON public.execution_entity USING btree ("deletedAt") | -| idx_execution_entity_workflow_id_started_at | CREATE INDEX idx_execution_entity_workflow_id_started_at ON public.execution_entity USING btree ("workflowId", "startedAt") WHERE (("startedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) | -| idx_execution_entity_wait_till_status_deleted_at | CREATE INDEX idx_execution_entity_wait_till_status_deleted_at ON public.execution_entity USING btree ("waitTill", status, "deletedAt") WHERE (("waitTill" IS NOT NULL) AND ("deletedAt" IS NULL)) | -| idx_execution_entity_stopped_at_status_deleted_at | CREATE INDEX idx_execution_entity_stopped_at_status_deleted_at ON public.execution_entity USING btree ("stoppedAt", status, "deletedAt") WHERE (("stoppedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) | | IDX_execution_entity_deduplicationKey | CREATE UNIQUE INDEX "IDX_execution_entity_deduplicationKey" ON public.execution_entity USING btree ("deduplicationKey") WHERE ("deduplicationKey" IS NOT NULL) | +| IDX_execution_entity_deletedAt | CREATE INDEX "IDX_execution_entity_deletedAt" ON public.execution_entity USING btree ("deletedAt") | | IDX_execution_entity_workflowId_status_id | CREATE INDEX "IDX_execution_entity_workflowId_status_id" ON public.execution_entity USING btree ("workflowId", status, id) WHERE ("deletedAt" IS NULL) | +| idx_execution_entity_stopped_at_status_deleted_at | CREATE INDEX idx_execution_entity_stopped_at_status_deleted_at ON public.execution_entity USING btree ("stoppedAt", status, "deletedAt") WHERE (("stoppedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) | +| idx_execution_entity_wait_till_status_deleted_at | CREATE INDEX idx_execution_entity_wait_till_status_deleted_at ON public.execution_entity USING btree ("waitTill", status, "deletedAt") WHERE (("waitTill" IS NOT NULL) AND ("deletedAt" IS NULL)) | +| idx_execution_entity_workflow_id_started_at | CREATE INDEX idx_execution_entity_workflow_id_started_at ON public.execution_entity USING btree ("workflowId", "startedAt") WHERE (("startedAt" IS NOT NULL) AND ("deletedAt" IS NULL)) | +| pk_e3e63bbf986767844bbe1166d4e | CREATE UNIQUE INDEX pk_e3e63bbf986767844bbe1166d4e ON public.execution_entity USING btree (id) | ## Relations ```mermaid erDiagram +"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" +"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" "public.execution_data" |o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" "public.execution_metadata" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" -"public.execution_annotations" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" "public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" -"public.chat_hub_messages" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" "public.execution_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK varchar_36_ workflowVersionId } +"public.chat_hub_messages" { + uuid agentId FK + json attachments + text content + timestamp_3__with_time_zone createdAt + integer executionId FK + uuid id + varchar_256_ model + varchar_128_ name + uuid previousMessageId FK + varchar_16_ provider + uuid retryOfMessageId FK + uuid revisionOfMessageId FK + uuid sessionId FK + varchar_16_ status + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.execution_annotations" { + timestamp_3__with_time_zone createdAt + integer executionId FK + integer id + text note + timestamp_3__with_time_zone updatedAt + varchar_6_ vote +} "public.execution_data" { + text data integer executionId FK json workflowData - text data varchar_36_ workflowVersionId } "public.execution_metadata" { - integer id integer executionId FK + integer id varchar_255_ key text value } -"public.execution_annotations" { - integer id - integer executionId FK - varchar_6_ vote - text note - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} "public.test_case_execution" { - varchar_36_ id - varchar_36_ testRunId FK - integer executionId FK - varchar status - timestamp_3__with_time_zone runAt timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt varchar errorCode json errorDetails - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json inputs - json outputs - integer runIndex -} -"public.chat_hub_messages" { - uuid id - uuid sessionId FK - uuid previousMessageId FK - uuid revisionOfMessageId FK - uuid retryOfMessageId FK - varchar_16_ type - varchar_128_ name - text content - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK integer executionId FK - timestamp_3__with_time_zone createdAt + varchar_36_ id + json inputs + json metrics + json outputs + timestamp_3__with_time_zone runAt + integer runIndex + varchar status + varchar_36_ testRunId FK timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_16_ status - json attachments } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.execution_metadata.md b/docs/generated/postgres-schema/public.execution_metadata.md index 641f52cdb87..900382f2017 100644 --- a/docs/generated/postgres-schema/public.execution_metadata.md +++ b/docs/generated/postgres-schema/public.execution_metadata.md @@ -4,8 +4,8 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | integer | nextval('execution_metadata_temp_id_seq'::regclass) | false | | | | | executionId | integer | | false | | [public.execution_entity](public.execution_entity.md) | | +| id | integer | nextval('execution_metadata_temp_id_seq'::regclass) | false | | | | | key | varchar(255) | | false | | | | | value | text | | false | | | | @@ -13,19 +13,19 @@ | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_31d0b4c93fb85ced26f6005cda3 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE | +| PK_17a0b6284f8d626aae88e1c16e4 | PRIMARY KEY | PRIMARY KEY (id) | | execution_metadata_temp_executionId_not_null | n | NOT NULL "executionId" | | execution_metadata_temp_id_not_null | n | NOT NULL id | | execution_metadata_temp_key_not_null | n | NOT NULL key | | execution_metadata_temp_value_not_null | n | NOT NULL value | -| FK_31d0b4c93fb85ced26f6005cda3 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE CASCADE | -| PK_17a0b6284f8d626aae88e1c16e4 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_17a0b6284f8d626aae88e1c16e4 | CREATE UNIQUE INDEX "PK_17a0b6284f8d626aae88e1c16e4" ON public.execution_metadata USING btree (id) | | IDX_cec8eea3bf49551482ccb4933e | CREATE UNIQUE INDEX "IDX_cec8eea3bf49551482ccb4933e" ON public.execution_metadata USING btree ("executionId", key) | +| PK_17a0b6284f8d626aae88e1c16e4 | CREATE UNIQUE INDEX "PK_17a0b6284f8d626aae88e1c16e4" ON public.execution_metadata USING btree (id) | ## Relations @@ -35,28 +35,28 @@ erDiagram "public.execution_metadata" }o--|| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE CASCADE" "public.execution_metadata" { - integer id integer executionId FK + integer id varchar_255_ key text value } "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK varchar_36_ workflowVersionId } ``` diff --git a/docs/generated/postgres-schema/public.folder.md b/docs/generated/postgres-schema/public.folder.md index 95769a310b3..ab8fe20d0af 100644 --- a/docs/generated/postgres-schema/public.folder.md +++ b/docs/generated/postgres-schema/public.folder.md @@ -4,87 +4,87 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.workflow_entity](public.workflow_entity.md) [public.folder](public.folder.md) [public.folder_tag](public.folder_tag.md) | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | [public.folder](public.folder.md) [public.folder_tag](public.folder_tag.md) [public.workflow_entity](public.workflow_entity.md) | | | | name | varchar(128) | | false | | | | | parentFolderId | varchar(36) | | true | | [public.folder](public.folder.md) | | | projectId | varchar(36) | | false | | [public.project](public.project.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_804ea52f6729e3940498bd54d78 | FOREIGN KEY | FOREIGN KEY ("parentFolderId") REFERENCES folder(id) ON DELETE CASCADE | +| FK_a8260b0b36939c6247f385b8221 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| PK_6278a41a706740c94c02e288df8 | PRIMARY KEY | PRIMARY KEY (id) | | folder_createdAt_not_null | n | NOT NULL "createdAt" | | folder_id_not_null | n | NOT NULL id | | folder_name_not_null | n | NOT NULL name | | folder_projectId_not_null | n | NOT NULL "projectId" | | folder_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_a8260b0b36939c6247f385b8221 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| FK_804ea52f6729e3940498bd54d78 | FOREIGN KEY | FOREIGN KEY ("parentFolderId") REFERENCES folder(id) ON DELETE CASCADE | -| PK_6278a41a706740c94c02e288df8 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_6278a41a706740c94c02e288df8 | CREATE UNIQUE INDEX "PK_6278a41a706740c94c02e288df8" ON public.folder USING btree (id) | | IDX_14f68deffaf858465715995508 | CREATE UNIQUE INDEX "IDX_14f68deffaf858465715995508" ON public.folder USING btree ("projectId", id) | +| PK_6278a41a706740c94c02e288df8 | CREATE UNIQUE INDEX "PK_6278a41a706740c94c02e288df8" ON public.folder USING btree (id) | ## Relations ```mermaid erDiagram -"public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" "public.folder" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" "public.folder_tag" }o--|| "public.folder" : "FOREIGN KEY (#quot;folderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" +"public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" "public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.folder" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId -} "public.folder_tag" { varchar_36_ folderId FK varchar_36_ tagId FK } +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId +} "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } ``` diff --git a/docs/generated/postgres-schema/public.folder_tag.md b/docs/generated/postgres-schema/public.folder_tag.md index 992409750eb..acbefa092a3 100644 --- a/docs/generated/postgres-schema/public.folder_tag.md +++ b/docs/generated/postgres-schema/public.folder_tag.md @@ -11,11 +11,11 @@ | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_94a60854e06f2897b2e0d39edba | FOREIGN KEY | FOREIGN KEY ("folderId") REFERENCES folder(id) ON DELETE CASCADE | +| FK_dc88164176283de80af47621746 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE | +| PK_27e4e00852f6b06a925a4d83a3e | PRIMARY KEY | PRIMARY KEY ("folderId", "tagId") | | folder_tag_folderId_not_null | n | NOT NULL "folderId" | | folder_tag_tagId_not_null | n | NOT NULL "tagId" | -| FK_dc88164176283de80af47621746 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE | -| FK_94a60854e06f2897b2e0d39edba | FOREIGN KEY | FOREIGN KEY ("folderId") REFERENCES folder(id) ON DELETE CASCADE | -| PK_27e4e00852f6b06a925a4d83a3e | PRIMARY KEY | PRIMARY KEY ("folderId", "tagId") | ## Indexes @@ -36,18 +36,18 @@ erDiagram varchar_36_ tagId FK } "public.folder" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.tag_entity" { - varchar_24_ name timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ id + varchar_24_ name + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.insights_by_period.md b/docs/generated/postgres-schema/public.insights_by_period.md index b88c3eaf7c2..50963b40ba1 100644 --- a/docs/generated/postgres-schema/public.insights_by_period.md +++ b/docs/generated/postgres-schema/public.insights_by_period.md @@ -6,29 +6,29 @@ | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | integer | | false | | | | | metaId | integer | | false | | [public.insights_metadata](public.insights_metadata.md) | | +| periodStart | timestamp(0) with time zone | CURRENT_TIMESTAMP | true | | | | +| periodUnit | integer | | false | | | 0: hour, 1: day, 2: week | | type | integer | | false | | | 0: time_saved_minutes, 1: runtime_milliseconds, 2: success, 3: failure | | value | bigint | | false | | | | -| periodUnit | integer | | false | | | 0: hour, 1: day, 2: week | -| periodStart | timestamp(0) with time zone | CURRENT_TIMESTAMP | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_6414cfed98daabbfdd61a1cfbc0 | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE | +| PK_b606942249b90cc39b0265f0575 | PRIMARY KEY | PRIMARY KEY (id) | | insights_by_period_id_not_null | n | NOT NULL id | | insights_by_period_metaId_not_null | n | NOT NULL "metaId" | | insights_by_period_periodUnit_not_null | n | NOT NULL "periodUnit" | | insights_by_period_type_not_null | n | NOT NULL type | | insights_by_period_value_not_null | n | NOT NULL value | -| FK_6414cfed98daabbfdd61a1cfbc0 | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE | -| PK_b606942249b90cc39b0265f0575 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_b606942249b90cc39b0265f0575 | CREATE UNIQUE INDEX "PK_b606942249b90cc39b0265f0575" ON public.insights_by_period USING btree (id) | | IDX_60b6a84299eeb3f671dfec7693 | CREATE UNIQUE INDEX "IDX_60b6a84299eeb3f671dfec7693" ON public.insights_by_period USING btree ("periodStart", type, "periodUnit", "metaId") | +| PK_b606942249b90cc39b0265f0575 | CREATE UNIQUE INDEX "PK_b606942249b90cc39b0265f0575" ON public.insights_by_period USING btree (id) | ## Relations @@ -40,17 +40,17 @@ erDiagram "public.insights_by_period" { integer id integer metaId FK + timestamp_0__with_time_zone periodStart + integer periodUnit integer type bigint value - integer periodUnit - timestamp_0__with_time_zone periodStart } "public.insights_metadata" { integer metaId - varchar_36_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName + varchar_36_ workflowId FK + varchar_128_ workflowName } ``` diff --git a/docs/generated/postgres-schema/public.insights_metadata.md b/docs/generated/postgres-schema/public.insights_metadata.md index b917c8175b5..51626443d14 100644 --- a/docs/generated/postgres-schema/public.insights_metadata.md +++ b/docs/generated/postgres-schema/public.insights_metadata.md @@ -4,94 +4,94 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| metaId | integer | | false | [public.insights_raw](public.insights_raw.md) [public.insights_by_period](public.insights_by_period.md) | | | -| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | | +| metaId | integer | | false | [public.insights_by_period](public.insights_by_period.md) [public.insights_raw](public.insights_raw.md) | | | | projectId | varchar(36) | | true | | [public.project](public.project.md) | | -| workflowName | varchar(128) | | false | | | | | projectName | varchar(255) | | false | | | | +| workflowId | varchar(36) | | true | | [public.workflow_entity](public.workflow_entity.md) | | +| workflowName | varchar(128) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| insights_metadata_metaId_not_null | n | NOT NULL "metaId" | -| insights_metadata_projectName_not_null | n | NOT NULL "projectName" | -| insights_metadata_workflowName_not_null | n | NOT NULL "workflowName" | | FK_1d8ab99d5861c9388d2dc1cf733 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE SET NULL | | FK_2375a1eda085adb16b24615b69c | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE SET NULL | | PK_f448a94c35218b6208ce20cf5a1 | PRIMARY KEY | PRIMARY KEY ("metaId") | +| insights_metadata_metaId_not_null | n | NOT NULL "metaId" | +| insights_metadata_projectName_not_null | n | NOT NULL "projectName" | +| insights_metadata_workflowName_not_null | n | NOT NULL "workflowName" | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_f448a94c35218b6208ce20cf5a1 | CREATE UNIQUE INDEX "PK_f448a94c35218b6208ce20cf5a1" ON public.insights_metadata USING btree ("metaId") | | IDX_1d8ab99d5861c9388d2dc1cf73 | CREATE UNIQUE INDEX "IDX_1d8ab99d5861c9388d2dc1cf73" ON public.insights_metadata USING btree ("workflowId") | +| PK_f448a94c35218b6208ce20cf5a1 | CREATE UNIQUE INDEX "PK_f448a94c35218b6208ce20cf5a1" ON public.insights_metadata USING btree ("metaId") | ## Relations ```mermaid erDiagram -"public.insights_raw" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" "public.insights_by_period" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" -"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.insights_raw" }o--|| "public.insights_metadata" : "FOREIGN KEY (#quot;metaId#quot;) REFERENCES insights_metadata(#quot;metaId#quot;) ON DELETE CASCADE" "public.insights_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE SET NULL" +"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" "public.insights_metadata" { integer metaId - varchar_36_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName -} -"public.insights_raw" { - integer id - integer metaId FK - integer type - bigint value - timestamp_0__with_time_zone timestamp + varchar_36_ workflowId FK + varchar_128_ workflowName } "public.insights_by_period" { integer id integer metaId FK + timestamp_0__with_time_zone periodStart + integer periodUnit integer type bigint value - integer periodUnit - timestamp_0__with_time_zone periodStart } -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId +"public.insights_raw" { + integer id + integer metaId FK + timestamp_0__with_time_zone timestamp + integer type + bigint value } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.insights_raw.md b/docs/generated/postgres-schema/public.insights_raw.md index a2072e847bd..c422bfb1e37 100644 --- a/docs/generated/postgres-schema/public.insights_raw.md +++ b/docs/generated/postgres-schema/public.insights_raw.md @@ -6,28 +6,28 @@ | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | integer | | false | | | | | metaId | integer | | false | | [public.insights_metadata](public.insights_metadata.md) | | +| timestamp | timestamp(0) with time zone | CURRENT_TIMESTAMP | false | | | | | type | integer | | false | | | 0: time_saved_minutes, 1: runtime_milliseconds, 2: success, 3: failure | | value | bigint | | false | | | | -| timestamp | timestamp(0) with time zone | CURRENT_TIMESTAMP | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_6e2e33741adef2a7c5d66befa4e | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE | +| PK_ec15125755151e3a7e00e00014f | PRIMARY KEY | PRIMARY KEY (id) | | insights_raw_id_not_null | n | NOT NULL id | | insights_raw_metaId_not_null | n | NOT NULL "metaId" | | insights_raw_timestamp_not_null | n | NOT NULL "timestamp" | | insights_raw_type_not_null | n | NOT NULL type | | insights_raw_value_not_null | n | NOT NULL value | -| FK_6e2e33741adef2a7c5d66befa4e | FOREIGN KEY | FOREIGN KEY ("metaId") REFERENCES insights_metadata("metaId") ON DELETE CASCADE | -| PK_ec15125755151e3a7e00e00014f | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_ec15125755151e3a7e00e00014f | CREATE UNIQUE INDEX "PK_ec15125755151e3a7e00e00014f" ON public.insights_raw USING btree (id) | | IDX_insights_raw_timestamp_id | CREATE INDEX "IDX_insights_raw_timestamp_id" ON public.insights_raw USING btree ("timestamp", id) | +| PK_ec15125755151e3a7e00e00014f | CREATE UNIQUE INDEX "PK_ec15125755151e3a7e00e00014f" ON public.insights_raw USING btree (id) | ## Relations @@ -39,16 +39,16 @@ erDiagram "public.insights_raw" { integer id integer metaId FK + timestamp_0__with_time_zone timestamp integer type bigint value - timestamp_0__with_time_zone timestamp } "public.insights_metadata" { integer metaId - varchar_36_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName + varchar_36_ workflowId FK + varchar_128_ workflowName } ``` diff --git a/docs/generated/postgres-schema/public.installed_nodes.md b/docs/generated/postgres-schema/public.installed_nodes.md index 4f583b5d99a..fccae9ff3d1 100644 --- a/docs/generated/postgres-schema/public.installed_nodes.md +++ b/docs/generated/postgres-schema/public.installed_nodes.md @@ -4,21 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| name | varchar(200) | | false | | | | -| type | varchar(200) | | false | | | | | latestVersion | integer | 1 | false | | | | +| name | varchar(200) | | false | | | | | package | varchar(241) | | false | | [public.installed_packages](public.installed_packages.md) | | +| type | varchar(200) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_73f857fc5dce682cef8a99c11dbddbc969618951 | FOREIGN KEY | FOREIGN KEY (package) REFERENCES installed_packages("packageName") ON UPDATE CASCADE ON DELETE CASCADE | +| PK_8ebd28194e4f792f96b5933423fc439df97d9689 | PRIMARY KEY | PRIMARY KEY (name) | | installed_nodes_latestVersion_not_null | n | NOT NULL "latestVersion" | | installed_nodes_name_not_null | n | NOT NULL name | | installed_nodes_package_not_null | n | NOT NULL package | | installed_nodes_type_not_null | n | NOT NULL type | -| FK_73f857fc5dce682cef8a99c11dbddbc969618951 | FOREIGN KEY | FOREIGN KEY (package) REFERENCES installed_packages("packageName") ON UPDATE CASCADE ON DELETE CASCADE | -| PK_8ebd28194e4f792f96b5933423fc439df97d9689 | PRIMARY KEY | PRIMARY KEY (name) | ## Indexes @@ -34,17 +34,17 @@ erDiagram "public.installed_nodes" }o--|| "public.installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages(#quot;packageName#quot;) ON UPDATE CASCADE ON DELETE CASCADE" "public.installed_nodes" { - varchar_200_ name - varchar_200_ type integer latestVersion + varchar_200_ name varchar_241_ package FK + varchar_200_ type } "public.installed_packages" { - varchar_214_ packageName - varchar_50_ installedVersion - varchar_70_ authorName varchar_70_ authorEmail + varchar_70_ authorName timestamp_3__with_time_zone createdAt + varchar_50_ installedVersion + varchar_214_ packageName timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.installed_packages.md b/docs/generated/postgres-schema/public.installed_packages.md index 033ca09a638..8ab4de8802a 100644 --- a/docs/generated/postgres-schema/public.installed_packages.md +++ b/docs/generated/postgres-schema/public.installed_packages.md @@ -4,22 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| packageName | varchar(214) | | false | [public.installed_nodes](public.installed_nodes.md) | | | -| installedVersion | varchar(50) | | false | | | | -| authorName | varchar(70) | | true | | | | | authorEmail | varchar(70) | | true | | | | +| authorName | varchar(70) | | true | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| installedVersion | varchar(50) | | false | | | | +| packageName | varchar(214) | | false | [public.installed_nodes](public.installed_nodes.md) | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_08cc9197c39b028c1e9beca225940576fd1a5804 | PRIMARY KEY | PRIMARY KEY ("packageName") | | installed_packages_createdAt_not_null | n | NOT NULL "createdAt" | | installed_packages_installedVersion_not_null | n | NOT NULL "installedVersion" | | installed_packages_packageName_not_null | n | NOT NULL "packageName" | | installed_packages_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_08cc9197c39b028c1e9beca225940576fd1a5804 | PRIMARY KEY | PRIMARY KEY ("packageName") | ## Indexes @@ -35,18 +35,18 @@ erDiagram "public.installed_nodes" }o--|| "public.installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages(#quot;packageName#quot;) ON UPDATE CASCADE ON DELETE CASCADE" "public.installed_packages" { - varchar_214_ packageName - varchar_50_ installedVersion - varchar_70_ authorName varchar_70_ authorEmail + varchar_70_ authorName timestamp_3__with_time_zone createdAt + varchar_50_ installedVersion + varchar_214_ packageName timestamp_3__with_time_zone updatedAt } "public.installed_nodes" { - varchar_200_ name - varchar_200_ type integer latestVersion + varchar_200_ name varchar_241_ package FK + varchar_200_ type } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_checkpoints.md b/docs/generated/postgres-schema/public.instance_ai_checkpoints.md index 81da6d37e8b..fccf53564d5 100644 --- a/docs/generated/postgres-schema/public.instance_ai_checkpoints.md +++ b/docs/generated/postgres-schema/public.instance_ai_checkpoints.md @@ -4,35 +4,35 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| key | varchar(255) | | false | [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | | Opaque checkpoint key from the agent runtime. | -| runId | varchar(255) | | true | | | Run ID parsed from the checkpoint key when available. | -| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the checkpoint. | -| resourceId | varchar(255) | | true | | | Resource ID recorded by the agent runtime. | -| state | json | | true | | | Serializable agent state snapshot stored as JSON. | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | expiredAt | timestamp(3) with time zone | | true | | | Soft-delete timestamp: null means live; non-null marks the row as a tombstone. | +| key | varchar(255) | | false | [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | | Opaque checkpoint key from the agent runtime. | +| resourceId | varchar(255) | | true | | | Resource ID recorded by the agent runtime. | +| runId | varchar(255) | | true | | | Run ID parsed from the checkpoint key when available. | +| state | json | | true | | | Serializable agent state snapshot stored as JSON. | +| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the checkpoint. | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_2b23f3f24a70bebb990203b011e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| PK_5315a45f0846d1f9d128c18a2ed | PRIMARY KEY | PRIMARY KEY (key) | | instance_ai_checkpoints_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_checkpoints_key_not_null | n | NOT NULL key | | instance_ai_checkpoints_state_tombstone_check | CHECK | CHECK (((("expiredAt" IS NOT NULL) AND (state IS NULL)) OR ("expiredAt" IS NULL))) | | instance_ai_checkpoints_threadId_not_null | n | NOT NULL "threadId" | | instance_ai_checkpoints_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_2b23f3f24a70bebb990203b011e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_5315a45f0846d1f9d128c18a2ed | PRIMARY KEY | PRIMARY KEY (key) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_5315a45f0846d1f9d128c18a2ed | CREATE UNIQUE INDEX "PK_5315a45f0846d1f9d128c18a2ed" ON public.instance_ai_checkpoints USING btree (key) | -| IDX_768189b506cc26c4fe878b87cb | CREATE INDEX "IDX_768189b506cc26c4fe878b87cb" ON public.instance_ai_checkpoints USING btree ("runId") | | IDX_2b23f3f24a70bebb990203b011 | CREATE INDEX "IDX_2b23f3f24a70bebb990203b011" ON public.instance_ai_checkpoints USING btree ("threadId") | +| IDX_768189b506cc26c4fe878b87cb | CREATE INDEX "IDX_768189b506cc26c4fe878b87cb" ON public.instance_ai_checkpoints USING btree ("runId") | | IDX_be9d0eca0b19fb93d4eb74b327 | CREATE INDEX "IDX_be9d0eca0b19fb93d4eb74b327" ON public.instance_ai_checkpoints USING btree ("resourceId") | +| PK_5315a45f0846d1f9d128c18a2ed | CREATE UNIQUE INDEX "PK_5315a45f0846d1f9d128c18a2ed" ON public.instance_ai_checkpoints USING btree (key) | ## Relations @@ -43,37 +43,37 @@ erDiagram "public.instance_ai_checkpoints" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_checkpoints" { - varchar_255_ key - varchar_255_ runId - uuid threadId FK - varchar_255_ resourceId - json state timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt timestamp_3__with_time_zone expiredAt + varchar_255_ key + varchar_255_ resourceId + varchar_255_ runId + json state + uuid threadId FK + timestamp_3__with_time_zone updatedAt } "public.instance_ai_pending_confirmations" { - varchar_36_ requestId - uuid threadId FK - uuid userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId - timestamp_3__with_time_zone expiresAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId + varchar_36_ runId + uuid threadId FK + varchar_64_ toolCallId timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_iteration_logs.md b/docs/generated/postgres-schema/public.instance_ai_iteration_logs.md index a4ec8539e96..896d6c8c2ce 100644 --- a/docs/generated/postgres-schema/public.instance_ai_iteration_logs.md +++ b/docs/generated/postgres-schema/public.instance_ai_iteration_logs.md @@ -4,32 +4,32 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | -| taskKey | varchar | | false | | | | -| entry | text | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| entry | text | | false | | | | +| id | varchar(36) | | false | | | | +| taskKey | varchar | | false | | | | +| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_8bfcc6c51fd3d69b1eae8aebd49 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| PK_21c2b214b44bc6c34a6d3551c90 | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_iteration_logs_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_iteration_logs_entry_not_null | n | NOT NULL entry | | instance_ai_iteration_logs_id_not_null | n | NOT NULL id | | instance_ai_iteration_logs_taskKey_not_null | n | NOT NULL "taskKey" | | instance_ai_iteration_logs_threadId_not_null | n | NOT NULL "threadId" | | instance_ai_iteration_logs_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_8bfcc6c51fd3d69b1eae8aebd49 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_21c2b214b44bc6c34a6d3551c90 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_21c2b214b44bc6c34a6d3551c90 | CREATE UNIQUE INDEX "PK_21c2b214b44bc6c34a6d3551c90" ON public.instance_ai_iteration_logs USING btree (id) | | IDX_02751202c9a2ad75f2d8e14f5e | CREATE INDEX "IDX_02751202c9a2ad75f2d8e14f5e" ON public.instance_ai_iteration_logs USING btree ("threadId", "taskKey", "createdAt") | +| PK_21c2b214b44bc6c34a6d3551c90 | CREATE UNIQUE INDEX "PK_21c2b214b44bc6c34a6d3551c90" ON public.instance_ai_iteration_logs USING btree (id) | ## Relations @@ -39,21 +39,21 @@ erDiagram "public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_iteration_logs" { - varchar_36_ id - uuid threadId FK - varchar taskKey - text entry timestamp_3__with_time_zone createdAt + text entry + varchar_36_ id + varchar taskKey + uuid threadId FK timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_mcp_registry_connections.md b/docs/generated/postgres-schema/public.instance_ai_mcp_registry_connections.md index db321893029..d8e14dd0e31 100644 --- a/docs/generated/postgres-schema/public.instance_ai_mcp_registry_connections.md +++ b/docs/generated/postgres-schema/public.instance_ai_mcp_registry_connections.md @@ -4,35 +4,35 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | credentialId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | | +| id | uuid | | false | | | | | serverSlug | varchar(255) | | false | | [public.mcp_registry_server](public.mcp_registry_server.md) | | | toolFilter | json | | true | | | Optional MCP tool filter per registry connection: { mode: "allow" \| "exclude", tools: string[] } | -| userId | uuid | | false | | [public.user](public.user.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_1d25707354d2012da256eb2ec0a | FOREIGN KEY | FOREIGN KEY ("serverSlug") REFERENCES mcp_registry_server(slug) ON DELETE CASCADE | +| FK_1e826120e7e53ebc4681f026de8 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE | +| FK_8b42c08a531d76410980c639a5b | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_e34e4d15d78eabbe8217e33ef03 | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_mcp_registry_connections_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_mcp_registry_connections_credentialId_not_null | n | NOT NULL "credentialId" | | instance_ai_mcp_registry_connections_id_not_null | n | NOT NULL id | | instance_ai_mcp_registry_connections_serverSlug_not_null | n | NOT NULL "serverSlug" | | instance_ai_mcp_registry_connections_updatedAt_not_null | n | NOT NULL "updatedAt" | | instance_ai_mcp_registry_connections_userId_not_null | n | NOT NULL "userId" | -| FK_8b42c08a531d76410980c639a5b | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_1e826120e7e53ebc4681f026de8 | FOREIGN KEY | FOREIGN KEY ("credentialId") REFERENCES credentials_entity(id) ON DELETE CASCADE | -| FK_1d25707354d2012da256eb2ec0a | FOREIGN KEY | FOREIGN KEY ("serverSlug") REFERENCES mcp_registry_server(slug) ON DELETE CASCADE | -| PK_e34e4d15d78eabbe8217e33ef03 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_e34e4d15d78eabbe8217e33ef03 | CREATE UNIQUE INDEX "PK_e34e4d15d78eabbe8217e33ef03" ON public.instance_ai_mcp_registry_connections USING btree (id) | | IDX_16db3adb7b19df1ee55ff06b27 | CREATE UNIQUE INDEX "IDX_16db3adb7b19df1ee55ff06b27" ON public.instance_ai_mcp_registry_connections USING btree ("userId", "serverSlug", "credentialId") | +| PK_e34e4d15d78eabbe8217e33ef03 | CREATE UNIQUE INDEX "PK_e34e4d15d78eabbe8217e33ef03" ON public.instance_ai_mcp_registry_connections USING btree (id) | ## Relations @@ -44,52 +44,52 @@ erDiagram "public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.instance_ai_mcp_registry_connections" { - uuid id + timestamp_3__with_time_zone createdAt varchar_36_ credentialId FK + uuid id varchar_255_ serverSlug FK json toolFilter - uuid userId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt } "public.mcp_registry_server" { + timestamp_3__with_time_zone createdAt + json data + timestamp_3__without_time_zone registryUpdatedAt varchar_255_ slug varchar_50_ status - varchar_50_ version - timestamp_3__without_time_zone registryUpdatedAt - json data - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + varchar_50_ version } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_messages.md b/docs/generated/postgres-schema/public.instance_ai_messages.md index 26476946d14..735349b2f55 100644 --- a/docs/generated/postgres-schema/public.instance_ai_messages.md +++ b/docs/generated/postgres-schema/public.instance_ai_messages.md @@ -4,35 +4,35 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | | content | text | | false | | | | -| role | varchar(16) | | false | | | | -| type | varchar(32) | | true | | | | -| resourceId | varchar(255) | | true | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | | | | +| resourceId | varchar(255) | | true | | | | +| role | varchar(16) | | false | | | | +| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | +| type | varchar(32) | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_1eeb64cb9d66a927988de759e6e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| PK_156c6f287225e9befe0181bb02b | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_messages_content_not_null | n | NOT NULL content | | instance_ai_messages_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_messages_id_not_null | n | NOT NULL id | | instance_ai_messages_role_not_null | n | NOT NULL role | | instance_ai_messages_threadId_not_null | n | NOT NULL "threadId" | | instance_ai_messages_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_1eeb64cb9d66a927988de759e6e | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_156c6f287225e9befe0181bb02b | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_156c6f287225e9befe0181bb02b | CREATE UNIQUE INDEX "PK_156c6f287225e9befe0181bb02b" ON public.instance_ai_messages USING btree (id) | | IDX_1eeb64cb9d66a927988de759e6 | CREATE INDEX "IDX_1eeb64cb9d66a927988de759e6" ON public.instance_ai_messages USING btree ("threadId") | | IDX_76e212c6867fbaa06bf0decd6f | CREATE INDEX "IDX_76e212c6867fbaa06bf0decd6f" ON public.instance_ai_messages USING btree ("resourceId") | +| PK_156c6f287225e9befe0181bb02b | CREATE UNIQUE INDEX "PK_156c6f287225e9befe0181bb02b" ON public.instance_ai_messages USING btree (id) | ## Relations @@ -42,23 +42,23 @@ erDiagram "public.instance_ai_messages" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_messages" { - varchar_36_ id - uuid threadId FK text content - varchar_16_ role - varchar_32_ type - varchar_255_ resourceId timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_255_ resourceId + varchar_16_ role + uuid threadId FK + varchar_32_ type timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_observation_cursors.md b/docs/generated/postgres-schema/public.instance_ai_observation_cursors.md index eed63efb54b..d3b95998f7e 100644 --- a/docs/generated/postgres-schema/public.instance_ai_observation_cursors.md +++ b/docs/generated/postgres-schema/public.instance_ai_observation_cursors.md @@ -4,23 +4,23 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream checkpointed by this cursor | -| lastObservedMessageId | varchar(36) | | false | | | | -| lastObservedAt | timestamp(3) with time zone | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| lastObservedAt | timestamp(3) with time zone | | false | | | | +| lastObservedMessageId | varchar(36) | | false | | | | +| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream checkpointed by this cursor | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_5b6319b2e9a37c1064a72428f9a | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| PK_5b6319b2e9a37c1064a72428f9a | PRIMARY KEY | PRIMARY KEY ("observationScopeId") | | instance_ai_observation_cursors_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_observation_cursors_lastObservedAt_not_null | n | NOT NULL "lastObservedAt" | | instance_ai_observation_cursors_lastObservedMessageId_not_null | n | NOT NULL "lastObservedMessageId" | | instance_ai_observation_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" | | instance_ai_observation_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_5b6319b2e9a37c1064a72428f9a | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_5b6319b2e9a37c1064a72428f9a | PRIMARY KEY | PRIMARY KEY ("observationScopeId") | ## Indexes @@ -36,20 +36,20 @@ erDiagram "public.instance_ai_observation_cursors" |o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_observation_cursors" { - uuid observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + uuid observationScopeId FK timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_observation_locks.md b/docs/generated/postgres-schema/public.instance_ai_observation_locks.md index d8c36162e2c..c6c7da52fd6 100644 --- a/docs/generated/postgres-schema/public.instance_ai_observation_locks.md +++ b/docs/generated/postgres-schema/public.instance_ai_observation_locks.md @@ -4,11 +4,11 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| heldUntil | timestamp(3) with time zone | | false | | | | +| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID | | observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream locked for observation tasks | | taskKind | varchar(20) | | false | | | | -| holderId | varchar(64) | | false | | | Ephemeral background-task lock owner token, not a user ID | -| heldUntil | timestamp(3) with time zone | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -16,14 +16,14 @@ | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_instance_ai_observation_locks_taskKind | CHECK | CHECK ((("taskKind")::text = ANY ((ARRAY['observer'::character varying, 'reflector'::character varying])::text[]))) | +| FK_103e2e5f454860b28ea05a82c74 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| PK_fc491dd378b9448655c3c683f85 | PRIMARY KEY | PRIMARY KEY ("observationScopeId", "taskKind") | | instance_ai_observation_locks_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_observation_locks_heldUntil_not_null | n | NOT NULL "heldUntil" | | instance_ai_observation_locks_holderId_not_null | n | NOT NULL "holderId" | | instance_ai_observation_locks_observationScopeId_not_null | n | NOT NULL "observationScopeId" | | instance_ai_observation_locks_taskKind_not_null | n | NOT NULL "taskKind" | | instance_ai_observation_locks_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_103e2e5f454860b28ea05a82c74 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_fc491dd378b9448655c3c683f85 | PRIMARY KEY | PRIMARY KEY ("observationScopeId", "taskKind") | ## Indexes @@ -39,21 +39,21 @@ erDiagram "public.instance_ai_observation_locks" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_observation_locks" { + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId uuid observationScopeId FK varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_observational_memory.md b/docs/generated/postgres-schema/public.instance_ai_observational_memory.md index 12751c2634c..76b1bd765f7 100644 --- a/docs/generated/postgres-schema/public.instance_ai_observational_memory.md +++ b/docs/generated/postgres-schema/public.instance_ai_observational_memory.md @@ -4,43 +4,45 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| lookupKey | varchar(255) | | false | | | | -| scope | varchar(16) | | false | | | | -| threadId | uuid | | true | | [public.instance_ai_threads](public.instance_ai_threads.md) | | -| resourceId | varchar(255) | | false | | | | | activeObservations | text | ''::text | false | | | | -| originType | varchar(32) | | false | | | | -| config | text | | false | | | | -| generationCount | integer | 0 | false | | | | -| lastObservedAt | timestamp(3) with time zone | | true | | | | -| pendingMessageTokens | integer | 0 | false | | | | -| totalTokensObserved | integer | 0 | false | | | | -| observationTokenCount | integer | 0 | false | | | | -| isObserving | boolean | false | false | | | | -| isReflecting | boolean | false | false | | | | -| observedMessageIds | json | | true | | | | -| observedTimezone | varchar | | true | | | | -| bufferedObservations | text | | true | | | | -| bufferedObservationTokens | integer | | true | | | | | bufferedMessageIds | json | | true | | | | -| bufferedReflection | text | | true | | | | -| bufferedReflectionTokens | integer | | true | | | | -| bufferedReflectionInputTokens | integer | | true | | | | -| reflectedObservationLineCount | integer | | true | | | | | bufferedObservationChunks | json | | true | | | | +| bufferedObservationTokens | integer | | true | | | | +| bufferedObservations | text | | true | | | | +| bufferedReflection | text | | true | | | | +| bufferedReflectionInputTokens | integer | | true | | | | +| bufferedReflectionTokens | integer | | true | | | | +| config | text | | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| generationCount | integer | 0 | false | | | | +| id | varchar(36) | | false | | | | | isBufferingObservation | boolean | false | false | | | | | isBufferingReflection | boolean | false | false | | | | -| lastBufferedAtTokens | integer | 0 | false | | | | +| isObserving | boolean | false | false | | | | +| isReflecting | boolean | false | false | | | | | lastBufferedAtTime | timestamp(3) with time zone | | true | | | | +| lastBufferedAtTokens | integer | 0 | false | | | | +| lastObservedAt | timestamp(3) with time zone | | true | | | | +| lookupKey | varchar(255) | | false | | | | | metadata | json | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| observationTokenCount | integer | 0 | false | | | | +| observedMessageIds | json | | true | | | | +| observedTimezone | varchar | | true | | | | +| originType | varchar(32) | | false | | | | +| pendingMessageTokens | integer | 0 | false | | | | +| reflectedObservationLineCount | integer | | true | | | | +| resourceId | varchar(255) | | false | | | | +| scope | varchar(16) | | false | | | | +| threadId | uuid | | true | | [public.instance_ai_threads](public.instance_ai_threads.md) | | +| totalTokensObserved | integer | 0 | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_34018c303885cd37093458e6409 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE SET NULL | +| PK_7192dd00cddba039bf1d3e6a098 | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_observational_memor_isBufferingObservation_not_null | n | NOT NULL "isBufferingObservation" | | instance_ai_observational_memory_activeObservations_not_null | n | NOT NULL "activeObservations" | | instance_ai_observational_memory_config_not_null | n | NOT NULL config | @@ -59,16 +61,14 @@ | instance_ai_observational_memory_scope_not_null | n | NOT NULL scope | | instance_ai_observational_memory_totalTokensObserved_not_null | n | NOT NULL "totalTokensObserved" | | instance_ai_observational_memory_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_34018c303885cd37093458e6409 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE SET NULL | -| PK_7192dd00cddba039bf1d3e6a098 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_7192dd00cddba039bf1d3e6a098 | CREATE UNIQUE INDEX "PK_7192dd00cddba039bf1d3e6a098" ON public.instance_ai_observational_memory USING btree (id) | | IDX_92f13cb6bc694227e069447f7b | CREATE INDEX "IDX_92f13cb6bc694227e069447f7b" ON public.instance_ai_observational_memory USING btree ("lookupKey") | | IDX_a680ac96aae02dc887bbaac512 | CREATE UNIQUE INDEX "IDX_a680ac96aae02dc887bbaac512" ON public.instance_ai_observational_memory USING btree (scope, "threadId", "resourceId") | +| PK_7192dd00cddba039bf1d3e6a098 | CREATE UNIQUE INDEX "PK_7192dd00cddba039bf1d3e6a098" ON public.instance_ai_observational_memory USING btree (id) | ## Relations @@ -78,47 +78,47 @@ erDiagram "public.instance_ai_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL" "public.instance_ai_observational_memory" { - varchar_36_ id - varchar_255_ lookupKey - varchar_16_ scope - uuid threadId FK - varchar_255_ resourceId text activeObservations - varchar_32_ originType - text config - integer generationCount - timestamp_3__with_time_zone lastObservedAt - integer pendingMessageTokens - integer totalTokensObserved - integer observationTokenCount - boolean isObserving - boolean isReflecting - json observedMessageIds - varchar observedTimezone - text bufferedObservations - integer bufferedObservationTokens json bufferedMessageIds - text bufferedReflection - integer bufferedReflectionTokens - integer bufferedReflectionInputTokens - integer reflectedObservationLineCount json bufferedObservationChunks + integer bufferedObservationTokens + text bufferedObservations + text bufferedReflection + integer bufferedReflectionInputTokens + integer bufferedReflectionTokens + text config + timestamp_3__with_time_zone createdAt + integer generationCount + varchar_36_ id boolean isBufferingObservation boolean isBufferingReflection - integer lastBufferedAtTokens + boolean isObserving + boolean isReflecting timestamp_3__with_time_zone lastBufferedAtTime + integer lastBufferedAtTokens + timestamp_3__with_time_zone lastObservedAt + varchar_255_ lookupKey json metadata - timestamp_3__with_time_zone createdAt + integer observationTokenCount + json observedMessageIds + varchar observedTimezone + varchar_32_ originType + integer pendingMessageTokens + integer reflectedObservationLineCount + varchar_255_ resourceId + varchar_16_ scope + uuid threadId FK + integer totalTokensObserved timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_observations.md b/docs/generated/postgres-schema/public.instance_ai_observations.md index 2cbe003dde6..644bf8a37c1 100644 --- a/docs/generated/postgres-schema/public.instance_ai_observations.md +++ b/docs/generated/postgres-schema/public.instance_ai_observations.md @@ -4,15 +4,15 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | id | varchar(36) | | false | [public.instance_ai_observations](public.instance_ai_observations.md) | | Application-generated n8n string ID, not a database UUID | -| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream for this observation log | | marker | varchar(16) | | false | | | | -| text | text | | false | | | | +| observationScopeId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | instance_ai_threads.id source stream for this observation log | | parentId | varchar(36) | | true | | [public.instance_ai_observations](public.instance_ai_observations.md) | | -| tokenCount | integer | 0 | false | | | | | status | varchar(16) | | false | | | | | supersededBy | varchar(36) | | true | | [public.instance_ai_observations](public.instance_ai_observations.md) | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| text | text | | false | | | | +| tokenCount | integer | 0 | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints @@ -21,6 +21,10 @@ | ---- | ---- | ---------- | | CHK_instance_ai_observations_marker | CHECK | CHECK (((marker)::text = ANY ((ARRAY['critical'::character varying, 'important'::character varying, 'info'::character varying, 'completion'::character varying])::text[]))) | | CHK_instance_ai_observations_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'superseded'::character varying, 'dropped'::character varying])::text[]))) | +| FK_a80e0ee839a2f10ba4b86e19998 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES instance_ai_observations(id) | +| FK_d54fc84a6c8ac91b5e0db0378a4 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| FK_daef2195a4a846eb70eed15e039 | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES instance_ai_observations(id) | +| PK_4d9b514cdf0f0b577650caf2ac2 | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_observations_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_observations_id_not_null | n | NOT NULL id | | instance_ai_observations_marker_not_null | n | NOT NULL marker | @@ -29,19 +33,15 @@ | instance_ai_observations_text_not_null | n | NOT NULL text | | instance_ai_observations_tokenCount_not_null | n | NOT NULL "tokenCount" | | instance_ai_observations_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_d54fc84a6c8ac91b5e0db0378a4 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| FK_a80e0ee839a2f10ba4b86e19998 | FOREIGN KEY | FOREIGN KEY ("supersededBy") REFERENCES instance_ai_observations(id) | -| FK_daef2195a4a846eb70eed15e039 | FOREIGN KEY | FOREIGN KEY ("parentId") REFERENCES instance_ai_observations(id) | -| PK_4d9b514cdf0f0b577650caf2ac2 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_4d9b514cdf0f0b577650caf2ac2 | CREATE UNIQUE INDEX "PK_4d9b514cdf0f0b577650caf2ac2" ON public.instance_ai_observations USING btree (id) | | IDX_0d5db648188d338df7fb2a8064 | CREATE INDEX "IDX_0d5db648188d338df7fb2a8064" ON public.instance_ai_observations USING btree ("observationScopeId", status, "createdAt", id) | -| IDX_daef2195a4a846eb70eed15e03 | CREATE INDEX "IDX_daef2195a4a846eb70eed15e03" ON public.instance_ai_observations USING btree ("parentId") | | IDX_a80e0ee839a2f10ba4b86e1999 | CREATE INDEX "IDX_a80e0ee839a2f10ba4b86e1999" ON public.instance_ai_observations USING btree ("supersededBy") | +| IDX_daef2195a4a846eb70eed15e03 | CREATE INDEX "IDX_daef2195a4a846eb70eed15e03" ON public.instance_ai_observations USING btree ("parentId") | +| PK_4d9b514cdf0f0b577650caf2ac2 | CREATE UNIQUE INDEX "PK_4d9b514cdf0f0b577650caf2ac2" ON public.instance_ai_observations USING btree (id) | ## Relations @@ -53,25 +53,25 @@ erDiagram "public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_observations" { + timestamp_3__with_time_zone createdAt varchar_36_ id - uuid observationScopeId FK varchar_16_ marker - text text + uuid observationScopeId FK varchar_36_ parentId FK - integer tokenCount varchar_16_ status varchar_36_ supersededBy FK - timestamp_3__with_time_zone createdAt + text text + integer tokenCount timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_pending_confirmations.md b/docs/generated/postgres-schema/public.instance_ai_pending_confirmations.md index 4b669775af3..36e06f0ff2b 100644 --- a/docs/generated/postgres-schema/public.instance_ai_pending_confirmations.md +++ b/docs/generated/postgres-schema/public.instance_ai_pending_confirmations.md @@ -4,24 +4,28 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| requestId | varchar(36) | | false | | | HITL confirmation request identifier. | -| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the confirmation. | -| userId | uuid | | false | | [public.user](public.user.md) | User who is expected to confirm or cancel. | -| kind | varchar(16) | | false | | | 'suspended' (resumable from checkpoint) or 'inline' (orchestrator-held Promise). | -| runId | varchar(36) | | false | | | External run ID; reused on resume for SSE correlation. | -| toolCallId | varchar(64) | | true | | | Suspended tool call awaiting confirmation. | -| messageGroupId | varchar(36) | | true | | | SSE event correlation group. | | checkpointKey | varchar(255) | | true | | [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) | FK to instance_ai_checkpoints.key; also the SDK runId used to resume. | | checkpointTaskId | varchar(36) | | true | | | Set when the suspended run was a planned-task checkpoint follow-up. | -| expiresAt | timestamp(3) with time zone | | true | | | TTL for the leader-only sweep; null disables auto-expiry. | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| expiresAt | timestamp(3) with time zone | | true | | | TTL for the leader-only sweep; null disables auto-expiry. | +| kind | varchar(16) | | false | | | 'suspended' (resumable from checkpoint) or 'inline' (orchestrator-held Promise). | +| messageGroupId | varchar(36) | | true | | | SSE event correlation group. | +| requestId | varchar(36) | | false | | | HITL confirmation request identifier. | +| runId | varchar(36) | | false | | | External run ID; reused on resume for SSE correlation. | +| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | Instance AI thread that owns the confirmation. | +| toolCallId | varchar(64) | | true | | | Suspended tool call awaiting confirmation. | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | User who is expected to confirm or cancel. | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_instance_ai_pending_confirmations_kind | CHECK | CHECK (((kind)::text = ANY ((ARRAY['suspended'::character varying, 'inline'::character varying])::text[]))) | +| FK_0babdf6e3b897a86fe4678355eb | FOREIGN KEY | FOREIGN KEY ("checkpointKey") REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE | +| FK_ba67ee8dc311830a2eea89b6e96 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| FK_df5fd25c8bbfd2b042602600d8e | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_25c38179c8d45095b168adfff80 | PRIMARY KEY | PRIMARY KEY ("requestId") | | instance_ai_pending_confirmations_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_pending_confirmations_kind_not_null | n | NOT NULL kind | | instance_ai_pending_confirmations_requestId_not_null | n | NOT NULL "requestId" | @@ -29,79 +33,75 @@ | instance_ai_pending_confirmations_threadId_not_null | n | NOT NULL "threadId" | | instance_ai_pending_confirmations_updatedAt_not_null | n | NOT NULL "updatedAt" | | instance_ai_pending_confirmations_userId_not_null | n | NOT NULL "userId" | -| FK_df5fd25c8bbfd2b042602600d8e | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_ba67ee8dc311830a2eea89b6e96 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| FK_0babdf6e3b897a86fe4678355eb | FOREIGN KEY | FOREIGN KEY ("checkpointKey") REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE | -| PK_25c38179c8d45095b168adfff80 | PRIMARY KEY | PRIMARY KEY ("requestId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_25c38179c8d45095b168adfff80 | CREATE UNIQUE INDEX "PK_25c38179c8d45095b168adfff80" ON public.instance_ai_pending_confirmations USING btree ("requestId") | -| IDX_ba67ee8dc311830a2eea89b6e9 | CREATE INDEX "IDX_ba67ee8dc311830a2eea89b6e9" ON public.instance_ai_pending_confirmations USING btree ("threadId") | -| IDX_df5fd25c8bbfd2b042602600d8 | CREATE INDEX "IDX_df5fd25c8bbfd2b042602600d8" ON public.instance_ai_pending_confirmations USING btree ("userId") | | IDX_0babdf6e3b897a86fe4678355e | CREATE INDEX "IDX_0babdf6e3b897a86fe4678355e" ON public.instance_ai_pending_confirmations USING btree ("checkpointKey") | +| IDX_ba67ee8dc311830a2eea89b6e9 | CREATE INDEX "IDX_ba67ee8dc311830a2eea89b6e9" ON public.instance_ai_pending_confirmations USING btree ("threadId") | | IDX_d7a4aba7440449865e2b924377 | CREATE INDEX "IDX_d7a4aba7440449865e2b924377" ON public.instance_ai_pending_confirmations USING btree ("expiresAt") | +| IDX_df5fd25c8bbfd2b042602600d8 | CREATE INDEX "IDX_df5fd25c8bbfd2b042602600d8" ON public.instance_ai_pending_confirmations USING btree ("userId") | +| PK_25c38179c8d45095b168adfff80 | CREATE UNIQUE INDEX "PK_25c38179c8d45095b168adfff80" ON public.instance_ai_pending_confirmations USING btree ("requestId") | ## Relations ```mermaid erDiagram +"public.instance_ai_pending_confirmations" }o--o| "public.instance_ai_checkpoints" : "FOREIGN KEY (#quot;checkpointKey#quot;) REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE" "public.instance_ai_pending_confirmations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.instance_ai_pending_confirmations" }o--o| "public.instance_ai_checkpoints" : "FOREIGN KEY (#quot;checkpointKey#quot;) REFERENCES instance_ai_checkpoints(key) ON DELETE CASCADE" "public.instance_ai_pending_confirmations" { - varchar_36_ requestId - uuid threadId FK - uuid userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId - timestamp_3__with_time_zone expiresAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId + varchar_36_ runId + uuid threadId FK + varchar_64_ toolCallId + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.instance_ai_checkpoints" { + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiredAt + varchar_255_ key + varchar_255_ resourceId + varchar_255_ runId + json state + uuid threadId FK timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"public.instance_ai_checkpoints" { - varchar_255_ key - varchar_255_ runId - uuid threadId FK - varchar_255_ resourceId - json state - timestamp_3__with_time_zone createdAt + json settings timestamp_3__with_time_zone updatedAt - timestamp_3__with_time_zone expiredAt } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_resources.md b/docs/generated/postgres-schema/public.instance_ai_resources.md index bca6c5cf9c3..bfe1ec00b2c 100644 --- a/docs/generated/postgres-schema/public.instance_ai_resources.md +++ b/docs/generated/postgres-schema/public.instance_ai_resources.md @@ -4,20 +4,20 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(255) | | false | | | | -| workingMemory | text | | true | | | | -| metadata | json | | true | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(255) | | false | | | | +| metadata | json | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workingMemory | text | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_45b5b0b6f715dae4292b86603d8 | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_resources_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_resources_id_not_null | n | NOT NULL id | | instance_ai_resources_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_45b5b0b6f715dae4292b86603d8 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -32,11 +32,11 @@ erDiagram "public.instance_ai_resources" { - varchar_255_ id - text workingMemory - json metadata timestamp_3__with_time_zone createdAt + varchar_255_ id + json metadata timestamp_3__with_time_zone updatedAt + text workingMemory } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_run_snapshots.md b/docs/generated/postgres-schema/public.instance_ai_run_snapshots.md index 2aff5176c7c..bfa6db30318 100644 --- a/docs/generated/postgres-schema/public.instance_ai_run_snapshots.md +++ b/docs/generated/postgres-schema/public.instance_ai_run_snapshots.md @@ -4,37 +4,37 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | -| runId | varchar(36) | | false | | | | -| messageGroupId | varchar(36) | | true | | | | -| runIds | json | | true | | | | -| tree | text | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | langsmithRunId | varchar(36) | | true | | | LangSmith run ID (UUID v4, e.g. "f47ac10b-58cc-4372-a567-0e02b2c3d479"). | | langsmithTraceId | varchar(36) | | true | | | LangSmith trace ID (UUID v4, e.g. "f47ac10b-58cc-4372-a567-0e02b2c3d479"). | -| traceId | varchar(64) | | true | | | OpenTelemetry trace ID for the root Instance AI run. | +| messageGroupId | varchar(36) | | true | | | | +| runId | varchar(36) | | false | | | | +| runIds | json | | true | | | | | spanId | varchar(64) | | true | | | OpenTelemetry span ID for the root Instance AI run. | +| threadId | uuid | | false | | [public.instance_ai_threads](public.instance_ai_threads.md) | | +| traceId | varchar(64) | | true | | | OpenTelemetry trace ID for the root Instance AI run. | +| tree | text | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_2f63fa21d09d7918f347ddbdf70 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | +| PK_0a5fc9690a84950ebf1416fb146 | PRIMARY KEY | PRIMARY KEY ("threadId", "runId") | | instance_ai_run_snapshots_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_run_snapshots_runId_not_null | n | NOT NULL "runId" | | instance_ai_run_snapshots_threadId_not_null | n | NOT NULL "threadId" | | instance_ai_run_snapshots_tree_not_null | n | NOT NULL tree | | instance_ai_run_snapshots_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_2f63fa21d09d7918f347ddbdf70 | FOREIGN KEY | FOREIGN KEY ("threadId") REFERENCES instance_ai_threads(id) ON DELETE CASCADE | -| PK_0a5fc9690a84950ebf1416fb146 | PRIMARY KEY | PRIMARY KEY ("threadId", "runId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_0a5fc9690a84950ebf1416fb146 | CREATE UNIQUE INDEX "PK_0a5fc9690a84950ebf1416fb146" ON public.instance_ai_run_snapshots USING btree ("threadId", "runId") | -| IDX_d926c16c2ad9728cb9a81790c0 | CREATE INDEX "IDX_d926c16c2ad9728cb9a81790c0" ON public.instance_ai_run_snapshots USING btree ("threadId", "messageGroupId") | | IDX_d3a2bc880e7a8626802e5474ad | CREATE INDEX "IDX_d3a2bc880e7a8626802e5474ad" ON public.instance_ai_run_snapshots USING btree ("threadId", "createdAt") | +| IDX_d926c16c2ad9728cb9a81790c0 | CREATE INDEX "IDX_d926c16c2ad9728cb9a81790c0" ON public.instance_ai_run_snapshots USING btree ("threadId", "messageGroupId") | +| PK_0a5fc9690a84950ebf1416fb146 | CREATE UNIQUE INDEX "PK_0a5fc9690a84950ebf1416fb146" ON public.instance_ai_run_snapshots USING btree ("threadId", "runId") | ## Relations @@ -44,26 +44,26 @@ erDiagram "public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_run_snapshots" { - uuid threadId FK - varchar_36_ runId - varchar_36_ messageGroupId - json runIds - text tree timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ langsmithRunId varchar_36_ langsmithTraceId - varchar_64_ traceId + varchar_36_ messageGroupId + varchar_36_ runId + json runIds varchar_64_ spanId + uuid threadId FK + varchar_64_ traceId + text tree + timestamp_3__with_time_zone updatedAt } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_threads.md b/docs/generated/postgres-schema/public.instance_ai_threads.md index b5c692e557e..627e3ab5da0 100644 --- a/docs/generated/postgres-schema/public.instance_ai_threads.md +++ b/docs/generated/postgres-schema/public.instance_ai_threads.md @@ -4,193 +4,193 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | | false | [public.instance_ai_messages](public.instance_ai_messages.md) [public.instance_ai_observational_memory](public.instance_ai_observational_memory.md) [public.instance_ai_run_snapshots](public.instance_ai_run_snapshots.md) [public.instance_ai_iteration_logs](public.instance_ai_iteration_logs.md) [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) [public.instance_ai_observations](public.instance_ai_observations.md) [public.instance_ai_observation_cursors](public.instance_ai_observation_cursors.md) [public.instance_ai_observation_locks](public.instance_ai_observation_locks.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | uuid | | false | [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) [public.instance_ai_checkpoints](public.instance_ai_checkpoints.md) [public.instance_ai_iteration_logs](public.instance_ai_iteration_logs.md) [public.instance_ai_messages](public.instance_ai_messages.md) [public.instance_ai_observation_cursors](public.instance_ai_observation_cursors.md) [public.instance_ai_observation_locks](public.instance_ai_observation_locks.md) [public.instance_ai_observational_memory](public.instance_ai_observational_memory.md) [public.instance_ai_observations](public.instance_ai_observations.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.instance_ai_run_snapshots](public.instance_ai_run_snapshots.md) | | | +| metadata | json | | true | | | | +| projectId | varchar(36) | | false | | [public.project](public.project.md) | Project this thread is scoped to | | resourceId | varchar(255) | | false | | | | | title | text | ''::text | false | | | | -| metadata | json | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| projectId | varchar(36) | | false | | [public.project](public.project.md) | Project this thread is scoped to | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_instance_ai_threads_projectId | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| PK_35575100e45cdedeb89ae0643e9 | PRIMARY KEY | PRIMARY KEY (id) | | instance_ai_threads_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_threads_id_not_null | n | NOT NULL id | | instance_ai_threads_projectId_not_null | n | NOT NULL "projectId" | | instance_ai_threads_resourceId_not_null | n | NOT NULL "resourceId" | | instance_ai_threads_title_not_null | n | NOT NULL title | | instance_ai_threads_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_instance_ai_threads_projectId | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| PK_35575100e45cdedeb89ae0643e9 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_35575100e45cdedeb89ae0643e9 | CREATE UNIQUE INDEX "PK_35575100e45cdedeb89ae0643e9" ON public.instance_ai_threads USING btree (id) | | IDX_f36dea4d38fe92e0e8f44d5a56 | CREATE INDEX "IDX_f36dea4d38fe92e0e8f44d5a56" ON public.instance_ai_threads USING btree ("resourceId") | | IDX_instance_ai_threads_projectId | CREATE INDEX "IDX_instance_ai_threads_projectId" ON public.instance_ai_threads USING btree ("projectId") | +| PK_35575100e45cdedeb89ae0643e9 | CREATE UNIQUE INDEX "PK_35575100e45cdedeb89ae0643e9" ON public.instance_ai_threads USING btree (id) | ## Relations ```mermaid erDiagram -"public.instance_ai_messages" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL" -"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.ai_builder_temporary_workflow" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_checkpoints" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" -"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_iteration_logs" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_messages" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_observation_cursors" |o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_observation_locks" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_observational_memory" }o--o| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE SET NULL" +"public.instance_ai_observations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_pending_confirmations" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" +"public.instance_ai_run_snapshots" }o--|| "public.instance_ai_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES instance_ai_threads(id) ON DELETE CASCADE" "public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_36_ projectId FK -} -"public.instance_ai_messages" { - varchar_36_ id - uuid threadId FK - text content - varchar_16_ role - varchar_32_ type - varchar_255_ resourceId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_observational_memory" { - varchar_36_ id - varchar_255_ lookupKey - varchar_16_ scope - uuid threadId FK - varchar_255_ resourceId - text activeObservations - varchar_32_ originType - text config - integer generationCount - timestamp_3__with_time_zone lastObservedAt - integer pendingMessageTokens - integer totalTokensObserved - integer observationTokenCount - boolean isObserving - boolean isReflecting - json observedMessageIds - varchar observedTimezone - text bufferedObservations - integer bufferedObservationTokens - json bufferedMessageIds - text bufferedReflection - integer bufferedReflectionTokens - integer bufferedReflectionInputTokens - integer reflectedObservationLineCount - json bufferedObservationChunks - boolean isBufferingObservation - boolean isBufferingReflection - integer lastBufferedAtTokens - timestamp_3__with_time_zone lastBufferedAtTime - json metadata - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.instance_ai_run_snapshots" { - uuid threadId FK - varchar_36_ runId - varchar_36_ messageGroupId - json runIds - text tree - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_36_ langsmithRunId - varchar_36_ langsmithTraceId - varchar_64_ traceId - varchar_64_ spanId -} -"public.instance_ai_iteration_logs" { - varchar_36_ id - uuid threadId FK - varchar taskKey - text entry - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.ai_builder_temporary_workflow" { - varchar_36_ workflowId FK - uuid threadId FK timestamp_3__with_time_zone createdAt + uuid threadId FK timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.instance_ai_checkpoints" { - varchar_255_ key - varchar_255_ runId - uuid threadId FK - varchar_255_ resourceId - json state timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt timestamp_3__with_time_zone expiredAt + varchar_255_ key + varchar_255_ resourceId + varchar_255_ runId + json state + uuid threadId FK + timestamp_3__with_time_zone updatedAt } -"public.instance_ai_observations" { - varchar_36_ id - uuid observationScopeId FK - varchar_16_ marker - text text - varchar_36_ parentId FK - integer tokenCount - varchar_16_ status - varchar_36_ supersededBy FK +"public.instance_ai_iteration_logs" { timestamp_3__with_time_zone createdAt + text entry + varchar_36_ id + varchar taskKey + uuid threadId FK + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_messages" { + text content + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_255_ resourceId + varchar_16_ role + uuid threadId FK + varchar_32_ type timestamp_3__with_time_zone updatedAt } "public.instance_ai_observation_cursors" { - uuid observationScopeId FK - varchar_36_ lastObservedMessageId - timestamp_3__with_time_zone lastObservedAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone lastObservedAt + varchar_36_ lastObservedMessageId + uuid observationScopeId FK timestamp_3__with_time_zone updatedAt } "public.instance_ai_observation_locks" { + timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone heldUntil + varchar_64_ holderId uuid observationScopeId FK varchar_20_ taskKind - varchar_64_ holderId - timestamp_3__with_time_zone heldUntil + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_observational_memory" { + text activeObservations + json bufferedMessageIds + json bufferedObservationChunks + integer bufferedObservationTokens + text bufferedObservations + text bufferedReflection + integer bufferedReflectionInputTokens + integer bufferedReflectionTokens + text config timestamp_3__with_time_zone createdAt + integer generationCount + varchar_36_ id + boolean isBufferingObservation + boolean isBufferingReflection + boolean isObserving + boolean isReflecting + timestamp_3__with_time_zone lastBufferedAtTime + integer lastBufferedAtTokens + timestamp_3__with_time_zone lastObservedAt + varchar_255_ lookupKey + json metadata + integer observationTokenCount + json observedMessageIds + varchar observedTimezone + varchar_32_ originType + integer pendingMessageTokens + integer reflectedObservationLineCount + varchar_255_ resourceId + varchar_16_ scope + uuid threadId FK + integer totalTokensObserved + timestamp_3__with_time_zone updatedAt +} +"public.instance_ai_observations" { + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_16_ marker + uuid observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + text text + integer tokenCount timestamp_3__with_time_zone updatedAt } "public.instance_ai_pending_confirmations" { - varchar_36_ requestId - uuid threadId FK - uuid userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId - timestamp_3__with_time_zone expiresAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId + varchar_36_ runId + uuid threadId FK + varchar_64_ toolCallId + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.instance_ai_run_snapshots" { + timestamp_3__with_time_zone createdAt + varchar_36_ langsmithRunId + varchar_36_ langsmithTraceId + varchar_36_ messageGroupId + varchar_36_ runId + json runIds + varchar_64_ spanId + uuid threadId FK + varchar_64_ traceId + text tree timestamp_3__with_time_zone updatedAt } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } ``` diff --git a/docs/generated/postgres-schema/public.instance_ai_workflow_snapshots.md b/docs/generated/postgres-schema/public.instance_ai_workflow_snapshots.md index 3bcb39ef852..fe173d917cd 100644 --- a/docs/generated/postgres-schema/public.instance_ai_workflow_snapshots.md +++ b/docs/generated/postgres-schema/public.instance_ai_workflow_snapshots.md @@ -4,31 +4,31 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| runId | varchar(36) | | false | | | | -| workflowName | varchar(255) | | false | | | | -| resourceId | varchar(255) | | true | | | | -| status | varchar | | true | | | | -| snapshot | text | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| resourceId | varchar(255) | | true | | | | +| runId | varchar(36) | | false | | | | +| snapshot | text | | false | | | | +| status | varchar | | true | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowName | varchar(255) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_93f2696eb321dfe1d7defe7073f | PRIMARY KEY | PRIMARY KEY ("runId", "workflowName") | | instance_ai_workflow_snapshots_createdAt_not_null | n | NOT NULL "createdAt" | | instance_ai_workflow_snapshots_runId_not_null | n | NOT NULL "runId" | | instance_ai_workflow_snapshots_snapshot_not_null | n | NOT NULL snapshot | | instance_ai_workflow_snapshots_updatedAt_not_null | n | NOT NULL "updatedAt" | | instance_ai_workflow_snapshots_workflowName_not_null | n | NOT NULL "workflowName" | -| PK_93f2696eb321dfe1d7defe7073f | PRIMARY KEY | PRIMARY KEY ("runId", "workflowName") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_93f2696eb321dfe1d7defe7073f | CREATE UNIQUE INDEX "PK_93f2696eb321dfe1d7defe7073f" ON public.instance_ai_workflow_snapshots USING btree ("runId", "workflowName") | | IDX_a371ee6b8e0ebb5635f8baa46d | CREATE INDEX "IDX_a371ee6b8e0ebb5635f8baa46d" ON public.instance_ai_workflow_snapshots USING btree ("workflowName", status) | +| PK_93f2696eb321dfe1d7defe7073f | CREATE UNIQUE INDEX "PK_93f2696eb321dfe1d7defe7073f" ON public.instance_ai_workflow_snapshots USING btree ("runId", "workflowName") | ## Relations @@ -37,13 +37,13 @@ erDiagram "public.instance_ai_workflow_snapshots" { - varchar_36_ runId - varchar_255_ workflowName - varchar_255_ resourceId - varchar status - text snapshot timestamp_3__with_time_zone createdAt + varchar_255_ resourceId + varchar_36_ runId + text snapshot + varchar status timestamp_3__with_time_zone updatedAt + varchar_255_ workflowName } ``` diff --git a/docs/generated/postgres-schema/public.instance_version_history.md b/docs/generated/postgres-schema/public.instance_version_history.md index e7d8313d57b..36a4dd579e1 100644 --- a/docs/generated/postgres-schema/public.instance_version_history.md +++ b/docs/generated/postgres-schema/public.instance_version_history.md @@ -4,22 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | id | integer | nextval('instance_version_history_id_seq'::regclass) | false | | | | | major | integer | | false | | | | | minor | integer | | false | | | | | patch | integer | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_874f58cb616935bf49d9dbd67e9 | PRIMARY KEY | PRIMARY KEY (id) | | instance_version_history_createdAt_not_null | n | NOT NULL "createdAt" | | instance_version_history_id_not_null | n | NOT NULL id | | instance_version_history_major_not_null | n | NOT NULL major | | instance_version_history_minor_not_null | n | NOT NULL minor | | instance_version_history_patch_not_null | n | NOT NULL patch | -| PK_874f58cb616935bf49d9dbd67e9 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -34,11 +34,11 @@ erDiagram "public.instance_version_history" { + timestamp_3__with_time_zone createdAt integer id integer major integer minor integer patch - timestamp_3__with_time_zone createdAt } ``` diff --git a/docs/generated/postgres-schema/public.invalid_auth_token.md b/docs/generated/postgres-schema/public.invalid_auth_token.md index d28639e19bd..e7be5289387 100644 --- a/docs/generated/postgres-schema/public.invalid_auth_token.md +++ b/docs/generated/postgres-schema/public.invalid_auth_token.md @@ -4,16 +4,16 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| token | varchar(512) | | false | | | | | expiresAt | timestamp(3) with time zone | | false | | | | +| token | varchar(512) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_5779069b7235b256d91f7af1a15 | PRIMARY KEY | PRIMARY KEY (token) | | invalid_auth_token_expiresAt_not_null | n | NOT NULL "expiresAt" | | invalid_auth_token_token_not_null | n | NOT NULL token | -| PK_5779069b7235b256d91f7af1a15 | PRIMARY KEY | PRIMARY KEY (token) | ## Indexes @@ -28,8 +28,8 @@ erDiagram "public.invalid_auth_token" { - varchar_512_ token timestamp_3__with_time_zone expiresAt + varchar_512_ token } ``` diff --git a/docs/generated/postgres-schema/public.mcp_registry_server.md b/docs/generated/postgres-schema/public.mcp_registry_server.md index dd24260fd52..b179f373334 100644 --- a/docs/generated/postgres-schema/public.mcp_registry_server.md +++ b/docs/generated/postgres-schema/public.mcp_registry_server.md @@ -4,19 +4,20 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| data | json | '{}'::json | false | | | JSON object containing server metadata (icons, remotes, tools, etc.) | +| registryUpdatedAt | timestamp(3) without time zone | | false | | | | | slug | varchar(255) | | false | [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | | | | status | varchar(50) | | false | | | Server status in the MCP registry. Deprecated servers are not surfaced to users. | -| version | varchar(50) | | false | | | | -| registryUpdatedAt | timestamp(3) without time zone | | false | | | | -| data | json | '{}'::json | false | | | JSON object containing server metadata (icons, remotes, tools, etc.) | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| version | varchar(50) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_tmp_mcp_registry_server_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['active'::character varying, 'deprecated'::character varying])::text[]))) | +| PK_12fd89a1fb8489513b0a91f5d31 | PRIMARY KEY | PRIMARY KEY (slug) | | tmp_mcp_registry_server_createdAt_not_null | n | NOT NULL "createdAt" | | tmp_mcp_registry_server_data_not_null | n | NOT NULL data | | tmp_mcp_registry_server_registryUpdatedAt_not_null | n | NOT NULL "registryUpdatedAt" | @@ -24,7 +25,6 @@ | tmp_mcp_registry_server_status_not_null | n | NOT NULL status | | tmp_mcp_registry_server_updatedAt_not_null | n | NOT NULL "updatedAt" | | tmp_mcp_registry_server_version_not_null | n | NOT NULL version | -| PK_12fd89a1fb8489513b0a91f5d31 | PRIMARY KEY | PRIMARY KEY (slug) | ## Indexes @@ -40,22 +40,22 @@ erDiagram "public.instance_ai_mcp_registry_connections" }o--|| "public.mcp_registry_server" : "FOREIGN KEY (#quot;serverSlug#quot;) REFERENCES mcp_registry_server(slug) ON DELETE CASCADE" "public.mcp_registry_server" { + timestamp_3__with_time_zone createdAt + json data + timestamp_3__without_time_zone registryUpdatedAt varchar_255_ slug varchar_50_ status - varchar_50_ version - timestamp_3__without_time_zone registryUpdatedAt - json data - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + varchar_50_ version } "public.instance_ai_mcp_registry_connections" { - uuid id + timestamp_3__with_time_zone createdAt varchar_36_ credentialId FK + uuid id varchar_255_ serverSlug FK json toolFilter - uuid userId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + uuid userId FK } ``` diff --git a/docs/generated/postgres-schema/public.oauth_access_tokens.md b/docs/generated/postgres-schema/public.oauth_access_tokens.md index 25ec88420f4..fca472ccbd9 100644 --- a/docs/generated/postgres-schema/public.oauth_access_tokens.md +++ b/docs/generated/postgres-schema/public.oauth_access_tokens.md @@ -4,20 +4,20 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| token | varchar | | false | | | | | clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | | +| token | varchar | | false | | | | | userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| oauth_access_tokens_clientId_not_null | n | NOT NULL "clientId" | -| oauth_access_tokens_token_not_null | n | NOT NULL token | -| oauth_access_tokens_userId_not_null | n | NOT NULL "userId" | | FK_7234a36d8e49a1fa85095328845 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | | FK_78b26968132b7e5e45b75876481 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE | | PK_dcd71f96a5d5f4bf79e67d322bf | PRIMARY KEY | PRIMARY KEY (token) | +| oauth_access_tokens_clientId_not_null | n | NOT NULL "clientId" | +| oauth_access_tokens_token_not_null | n | NOT NULL token | +| oauth_access_tokens_userId_not_null | n | NOT NULL "userId" | ## Indexes @@ -34,37 +34,37 @@ erDiagram "public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_access_tokens" { - varchar token varchar clientId FK + varchar token uuid userId FK } "public.oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + timestamp_3__with_time_zone createdAt + json grantTypes varchar id varchar_255_ name json redirectUris - json grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.oauth_authorization_codes.md b/docs/generated/postgres-schema/public.oauth_authorization_codes.md index a05232abf72..6ee13ccbf37 100644 --- a/docs/generated/postgres-schema/public.oauth_authorization_codes.md +++ b/docs/generated/postgres-schema/public.oauth_authorization_codes.md @@ -4,24 +4,27 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| code | varchar(255) | | false | | | | | clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | | -| userId | uuid | | false | | [public.user](public.user.md) | | -| redirectUri | varchar | | false | | | | +| code | varchar(255) | | false | | | | | codeChallenge | varchar | | false | | | | | codeChallengeMethod | varchar(255) | | false | | | | -| expiresAt | bigint | | false | | | Unix timestamp in milliseconds | -| state | varchar | | true | | | | -| used | boolean | false | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| expiresAt | bigint | | false | | | Unix timestamp in milliseconds | +| redirectUri | varchar | | false | | | | | resource | varchar | | true | | | RFC 8707 resource indicator URI (e.g. https://n8n.example.com/mcp-server/http). NULL = legacy flow predating resource indicator support; defaults to the instance canonical MCP resource URL. | | scope | json | '["tool:listWorkflows","tool:getWorkflowDetails"]'::json | false | | | OAuth scopes granted for this authorization code | +| state | varchar | | true | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| used | boolean | false | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_64d965bd072ea24fb6da55468cd | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE | +| FK_aa8d3560484944c19bdf79ffa16 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_fb91ab932cfbd694061501cc20f | PRIMARY KEY | PRIMARY KEY (code) | | oauth_authorization_codes_clientId_not_null | n | NOT NULL "clientId" | | oauth_authorization_codes_codeChallengeMethod_not_null | n | NOT NULL "codeChallengeMethod" | | oauth_authorization_codes_codeChallenge_not_null | n | NOT NULL "codeChallenge" | @@ -33,9 +36,6 @@ | oauth_authorization_codes_updatedAt_not_null | n | NOT NULL "updatedAt" | | oauth_authorization_codes_used_not_null | n | NOT NULL used | | oauth_authorization_codes_userId_not_null | n | NOT NULL "userId" | -| FK_aa8d3560484944c19bdf79ffa16 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_64d965bd072ea24fb6da55468cd | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE | -| PK_fb91ab932cfbd694061501cc20f | PRIMARY KEY | PRIMARY KEY (code) | ## Indexes @@ -52,47 +52,47 @@ erDiagram "public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_authorization_codes" { - varchar_255_ code varchar clientId FK - uuid userId FK - varchar redirectUri + varchar_255_ code varchar codeChallenge varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + bigint expiresAt + varchar redirectUri varchar resource json scope + varchar state + timestamp_3__with_time_zone updatedAt + boolean used + uuid userId FK } "public.oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + timestamp_3__with_time_zone createdAt + json grantTypes varchar id varchar_255_ name json redirectUris - json grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.oauth_clients.md b/docs/generated/postgres-schema/public.oauth_clients.md index 5c979acf970..048d6174523 100644 --- a/docs/generated/postgres-schema/public.oauth_clients.md +++ b/docs/generated/postgres-schema/public.oauth_clients.md @@ -4,20 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) | | | -| name | varchar(255) | | false | | | | -| redirectUris | json | | false | | | | -| grantTypes | json | | false | | | | | clientSecret | varchar(255) | | true | | | | | clientSecretExpiresAt | bigint | | true | | | | -| tokenEndpointAuthMethod | varchar(255) | 'none'::character varying | false | | | Possible values: none, client_secret_basic or client_secret_post | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| grantTypes | json | | false | | | | +| id | varchar | | false | [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) | | | +| name | varchar(255) | | false | | | | +| redirectUris | json | | false | | | | +| tokenEndpointAuthMethod | varchar(255) | 'none'::character varying | false | | | Possible values: none, client_secret_basic or client_secret_post | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_c4759172d3431bae6f04e678e0d | PRIMARY KEY | PRIMARY KEY (id) | | oauth_clients_createdAt_not_null | n | NOT NULL "createdAt" | | oauth_clients_grantTypes_not_null | n | NOT NULL "grantTypes" | | oauth_clients_id_not_null | n | NOT NULL id | @@ -25,7 +26,6 @@ | oauth_clients_redirectUris_not_null | n | NOT NULL "redirectUris" | | oauth_clients_tokenEndpointAuthMethod_not_null | n | NOT NULL "tokenEndpointAuthMethod" | | oauth_clients_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_c4759172d3431bae6f04e678e0d | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -38,56 +38,56 @@ ```mermaid erDiagram -"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" "public.oauth_access_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" +"public.oauth_authorization_codes" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" "public.oauth_refresh_tokens" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" "public.oauth_user_consents" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" "public.oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + timestamp_3__with_time_zone createdAt + json grantTypes varchar id varchar_255_ name json redirectUris - json grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } -"public.oauth_authorization_codes" { - varchar_255_ code - varchar clientId FK - uuid userId FK - varchar redirectUri - varchar codeChallenge - varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar resource - json scope -} "public.oauth_access_tokens" { - varchar token varchar clientId FK + varchar token + uuid userId FK +} +"public.oauth_authorization_codes" { + varchar clientId FK + varchar_255_ code + varchar codeChallenge + varchar_255_ codeChallengeMethod + timestamp_3__with_time_zone createdAt + bigint expiresAt + varchar redirectUri + varchar resource + json scope + varchar state + timestamp_3__with_time_zone updatedAt + boolean used uuid userId FK } "public.oauth_refresh_tokens" { - varchar_255_ token varchar clientId FK - uuid userId FK - bigint expiresAt timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + bigint expiresAt json scope + varchar_255_ token + timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.oauth_user_consents" { - integer id - uuid userId FK varchar clientId FK bigint grantedAt + integer id + uuid userId FK } ``` diff --git a/docs/generated/postgres-schema/public.oauth_refresh_tokens.md b/docs/generated/postgres-schema/public.oauth_refresh_tokens.md index d197b96b675..cafa6fe353d 100644 --- a/docs/generated/postgres-schema/public.oauth_refresh_tokens.md +++ b/docs/generated/postgres-schema/public.oauth_refresh_tokens.md @@ -4,18 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| token | varchar(255) | | false | | | | | clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | | -| userId | uuid | | false | | [public.user](public.user.md) | | -| expiresAt | bigint | | false | | | Unix timestamp in milliseconds | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| expiresAt | bigint | | false | | | Unix timestamp in milliseconds | | scope | json | '["tool:listWorkflows","tool:getWorkflowDetails"]'::json | false | | | OAuth scopes granted for this refresh token | +| token | varchar(255) | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_a699f3ed9fd0c1b19bc2608ac53 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| FK_b388696ce4d8be7ffbe8d3e4b69 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE | +| PK_74abaed0b30711b6532598b0392 | PRIMARY KEY | PRIMARY KEY (token) | | oauth_refresh_tokens_clientId_not_null | n | NOT NULL "clientId" | | oauth_refresh_tokens_createdAt_not_null | n | NOT NULL "createdAt" | | oauth_refresh_tokens_expiresAt_not_null | n | NOT NULL "expiresAt" | @@ -23,9 +26,6 @@ | oauth_refresh_tokens_token_not_null | n | NOT NULL token | | oauth_refresh_tokens_updatedAt_not_null | n | NOT NULL "updatedAt" | | oauth_refresh_tokens_userId_not_null | n | NOT NULL "userId" | -| FK_a699f3ed9fd0c1b19bc2608ac53 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_b388696ce4d8be7ffbe8d3e4b69 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE | -| PK_74abaed0b30711b6532598b0392 | PRIMARY KEY | PRIMARY KEY (token) | ## Indexes @@ -42,41 +42,41 @@ erDiagram "public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_refresh_tokens" { - varchar_255_ token varchar clientId FK - uuid userId FK - bigint expiresAt timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + bigint expiresAt json scope + varchar_255_ token + timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + timestamp_3__with_time_zone createdAt + json grantTypes varchar id varchar_255_ name json redirectUris - json grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.oauth_user_consents.md b/docs/generated/postgres-schema/public.oauth_user_consents.md index 24ca640c955..941d21584a1 100644 --- a/docs/generated/postgres-schema/public.oauth_user_consents.md +++ b/docs/generated/postgres-schema/public.oauth_user_consents.md @@ -4,23 +4,23 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | integer | | false | | | | -| userId | uuid | | false | | [public.user](public.user.md) | | | clientId | varchar | | false | | [public.oauth_clients](public.oauth_clients.md) | | | grantedAt | bigint | | false | | | Unix timestamp in milliseconds | +| id | integer | | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| oauth_user_consents_clientId_not_null | n | NOT NULL "clientId" | -| oauth_user_consents_grantedAt_not_null | n | NOT NULL "grantedAt" | -| oauth_user_consents_id_not_null | n | NOT NULL id | -| oauth_user_consents_userId_not_null | n | NOT NULL "userId" | | FK_21e6c3c2d78a097478fae6aaefa | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | | FK_a651acea2f6c97f8c4514935486 | FOREIGN KEY | FOREIGN KEY ("clientId") REFERENCES oauth_clients(id) ON DELETE CASCADE | | PK_85b9ada746802c8993103470f05 | PRIMARY KEY | PRIMARY KEY (id) | | UQ_083721d99ce8db4033e2958ebb4 | UNIQUE | UNIQUE ("userId", "clientId") | +| oauth_user_consents_clientId_not_null | n | NOT NULL "clientId" | +| oauth_user_consents_grantedAt_not_null | n | NOT NULL "grantedAt" | +| oauth_user_consents_id_not_null | n | NOT NULL id | +| oauth_user_consents_userId_not_null | n | NOT NULL "userId" | ## Indexes @@ -34,41 +34,41 @@ ```mermaid erDiagram -"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_user_consents" }o--|| "public.oauth_clients" : "FOREIGN KEY (#quot;clientId#quot;) REFERENCES oauth_clients(id) ON DELETE CASCADE" +"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.oauth_user_consents" { - integer id - uuid userId FK varchar clientId FK bigint grantedAt -} -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK + integer id + uuid userId FK } "public.oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + timestamp_3__with_time_zone createdAt + json grantTypes varchar id varchar_255_ name json redirectUris - json grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod + timestamp_3__with_time_zone updatedAt +} +"public.user" { timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.processed_data.md b/docs/generated/postgres-schema/public.processed_data.md index 879c413397f..c2a34513103 100644 --- a/docs/generated/postgres-schema/public.processed_data.md +++ b/docs/generated/postgres-schema/public.processed_data.md @@ -4,23 +4,23 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | | context | varchar(255) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | value | text | | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_06a69a7032c97a763c2c7599464 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_ca04b9d8dc72de268fe07a65773 | PRIMARY KEY | PRIMARY KEY ("workflowId", context) | | processed_data_context_not_null | n | NOT NULL context | | processed_data_createdAt_not_null | n | NOT NULL "createdAt" | | processed_data_updatedAt_not_null | n | NOT NULL "updatedAt" | | processed_data_value_not_null | n | NOT NULL value | | processed_data_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_06a69a7032c97a763c2c7599464 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| PK_ca04b9d8dc72de268fe07a65773 | PRIMARY KEY | PRIMARY KEY ("workflowId", context) | ## Indexes @@ -36,33 +36,33 @@ erDiagram "public.processed_data" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.processed_data" { - varchar_36_ workflowId FK varchar_255_ context timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt text value + varchar_36_ workflowId FK } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.project.md b/docs/generated/postgres-schema/public.project.md index 217482e044e..62d17ac49ba 100644 --- a/docs/generated/postgres-schema/public.project.md +++ b/docs/generated/postgres-schema/public.project.md @@ -4,20 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.variables](public.variables.md) [public.project_relation](public.project_relation.md) [public.shared_credentials](public.shared_credentials.md) [public.shared_workflow](public.shared_workflow.md) [public.folder](public.folder.md) [public.insights_metadata](public.insights_metadata.md) [public.data_table](public.data_table.md) [public.project_secrets_provider_access](public.project_secrets_provider_access.md) [public.role_mapping_rule_project](public.role_mapping_rule_project.md) [public.instance_ai_threads](public.instance_ai_threads.md) [public.agents](public.agents.md) [public.agent_execution_threads](public.agent_execution_threads.md) | | | -| name | varchar(255) | | false | | | | -| type | varchar(36) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| icon | json | | true | | | | -| description | varchar(512) | | true | | | | | creatorId | uuid | | true | | [public.user](public.user.md) | ID of the user who created the project | | customTelemetryTags | json | '[]'::json | false | | | | +| description | varchar(512) | | true | | | | +| icon | json | | true | | | | +| id | varchar(36) | | false | [public.agent_execution_threads](public.agent_execution_threads.md) [public.agents](public.agents.md) [public.data_table](public.data_table.md) [public.folder](public.folder.md) [public.insights_metadata](public.insights_metadata.md) [public.instance_ai_threads](public.instance_ai_threads.md) [public.project_relation](public.project_relation.md) [public.project_secrets_provider_access](public.project_secrets_provider_access.md) [public.role_mapping_rule_project](public.role_mapping_rule_project.md) [public.shared_credentials](public.shared_credentials.md) [public.shared_workflow](public.shared_workflow.md) [public.variables](public.variables.md) | | | +| name | varchar(255) | | false | | | | +| type | varchar(36) | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_4d68b1358bb5b766d3e78f32f57 | PRIMARY KEY | PRIMARY KEY (id) | | project_createdAt_not_null | n | NOT NULL "createdAt" | | project_customTelemetryTags_not_null | n | NOT NULL "customTelemetryTags" | | project_id_not_null | n | NOT NULL id | @@ -25,7 +26,6 @@ | project_type_not_null | n | NOT NULL type | | project_updatedAt_not_null | n | NOT NULL "updatedAt" | | projects_creatorId_foreign | FOREIGN KEY | FOREIGN KEY ("creatorId") REFERENCES "user"(id) ON DELETE SET NULL | -| PK_4d68b1358bb5b766d3e78f32f57 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -38,150 +38,150 @@ ```mermaid erDiagram -"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.folder" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.insights_metadata" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE SET NULL" -"public.data_table" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.project_secrets_provider_access" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.instance_ai_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.agents" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.agent_execution_threads" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon +} +"public.user" { + timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt +} +"public.agent_execution_threads" { + varchar_36_ agentId FK + varchar_255_ agentName + timestamp_3__with_time_zone createdAt + varchar_8_ emoji + varchar_128_ id + varchar_36_ parentAgentId + varchar_128_ parentThreadId + varchar_255_ projectId FK + integer sessionNumber + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title + integer totalCompletionTokens + double_precision totalCost + integer totalDuration + integer totalPromptTokens + timestamp_3__with_time_zone updatedAt +} +"public.agents" { + varchar_36_ activeVersionId FK + timestamp_3__with_time_zone createdAt varchar_512_ description - uuid creatorId FK - json customTelemetryTags -} -"public.variables" { - varchar_50_ key - varchar_50_ type - text value varchar_36_ id - varchar_36_ projectId FK -} -"public.project_relation" { - varchar_36_ projectId FK - uuid userId FK - varchar role FK - timestamp_3__with_time_zone createdAt + json integrations + varchar_128_ name + varchar_255_ projectId FK + json schema + json skills + json tools timestamp_3__with_time_zone updatedAt + varchar_36_ versionId } -"public.shared_credentials" { - varchar_36_ credentialsId FK - varchar_36_ projectId FK - text role +"public.data_table" { timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.shared_workflow" { - varchar_36_ workflowId FK + varchar_36_ id + varchar_128_ name varchar_36_ projectId FK - text role - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.folder" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.insights_metadata" { integer metaId - varchar_36_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName -} -"public.data_table" { - varchar_36_ id - varchar_128_ name - varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.project_secrets_provider_access" { - integer secretsProviderConnectionId FK - varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_128_ role -} -"public.role_mapping_rule_project" { - varchar_16_ roleMappingRuleId FK - varchar_36_ projectId FK + varchar_36_ workflowId FK + varchar_128_ workflowName } "public.instance_ai_threads" { + timestamp_3__with_time_zone createdAt uuid id + json metadata + varchar_36_ projectId FK varchar_255_ resourceId text title - json metadata - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt +} +"public.project_relation" { + timestamp_3__with_time_zone createdAt varchar_36_ projectId FK + varchar role FK + timestamp_3__with_time_zone updatedAt + uuid userId FK } -"public.agents" { +"public.project_secrets_provider_access" { + timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + varchar_128_ role + integer secretsProviderConnectionId FK + timestamp_3__with_time_zone updatedAt +} +"public.role_mapping_rule_project" { + varchar_36_ projectId FK + varchar_16_ roleMappingRuleId FK +} +"public.shared_credentials" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialsId FK + varchar_36_ projectId FK + text role + timestamp_3__with_time_zone updatedAt +} +"public.shared_workflow" { + timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + text role + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.variables" { varchar_36_ id - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - json integrations - json schema - json tools - json skills - varchar_36_ versionId - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_36_ activeVersionId FK -} -"public.agent_execution_threads" { - varchar_128_ id - varchar_36_ agentId FK - varchar_255_ agentName - varchar_255_ projectId FK - integer sessionNumber - integer totalPromptTokens - integer totalCompletionTokens - double_precision totalCost - integer totalDuration - varchar_255_ title - varchar_8_ emoji - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId -} -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK + varchar_50_ key + varchar_36_ projectId FK + varchar_50_ type + text value } ``` diff --git a/docs/generated/postgres-schema/public.project_relation.md b/docs/generated/postgres-schema/public.project_relation.md index e5fa7883802..d6e00a2bcb7 100644 --- a/docs/generated/postgres-schema/public.project_relation.md +++ b/docs/generated/postgres-schema/public.project_relation.md @@ -4,33 +4,33 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| projectId | varchar(36) | | false | | [public.project](public.project.md) | | -| userId | uuid | | false | | [public.user](public.user.md) | | -| role | varchar | | false | | [public.role](public.role.md) | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| projectId | varchar(36) | | false | | [public.project](public.project.md) | | +| role | varchar | | false | | [public.role](public.role.md) | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_5f0643f6717905a05164090dde7 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| FK_61448d56d61802b5dfde5cdb002 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| FK_c6b99592dc96b0d836d7a21db91 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) | +| PK_1caaa312a5d7184a003be0f0cb6 | PRIMARY KEY | PRIMARY KEY ("projectId", "userId") | | project_relation_createdAt_not_null | n | NOT NULL "createdAt" | | project_relation_projectId_not_null | n | NOT NULL "projectId" | | project_relation_role_not_null | n | NOT NULL role | | project_relation_updatedAt_not_null | n | NOT NULL "updatedAt" | | project_relation_userId_not_null | n | NOT NULL "userId" | -| FK_5f0643f6717905a05164090dde7 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_61448d56d61802b5dfde5cdb002 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| PK_1caaa312a5d7184a003be0f0cb6 | PRIMARY KEY | PRIMARY KEY ("projectId", "userId") | -| FK_c6b99592dc96b0d836d7a21db91 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_1caaa312a5d7184a003be0f0cb6 | CREATE UNIQUE INDEX "PK_1caaa312a5d7184a003be0f0cb6" ON public.project_relation USING btree ("projectId", "userId") | -| IDX_61448d56d61802b5dfde5cdb00 | CREATE INDEX "IDX_61448d56d61802b5dfde5cdb00" ON public.project_relation USING btree ("projectId") | | IDX_5f0643f6717905a05164090dde | CREATE INDEX "IDX_5f0643f6717905a05164090dde" ON public.project_relation USING btree ("userId") | +| IDX_61448d56d61802b5dfde5cdb00 | CREATE INDEX "IDX_61448d56d61802b5dfde5cdb00" ON public.project_relation USING btree ("projectId") | +| PK_1caaa312a5d7184a003be0f0cb6 | CREATE UNIQUE INDEX "PK_1caaa312a5d7184a003be0f0cb6" ON public.project_relation USING btree ("projectId", "userId") | | project_relation_role_idx | CREATE INDEX project_relation_role_idx ON public.project_relation USING btree (role) | | project_relation_role_project_idx | CREATE INDEX project_relation_role_project_idx ON public.project_relation USING btree ("projectId", role) | @@ -40,51 +40,51 @@ erDiagram "public.project_relation" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" -"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.project_relation" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug)" +"public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.project_relation" { - varchar_36_ projectId FK - uuid userId FK - varchar role FK timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + varchar role FK timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags -} -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK } "public.role" { - varchar_128_ slug - text displayName - text description - text roleType - boolean systemRole timestamp_3__with_time_zone createdAt + text description + text displayName + text roleType + varchar_128_ slug + boolean systemRole + timestamp_3__with_time_zone updatedAt +} +"public.user" { + timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.project_secrets_provider_access.md b/docs/generated/postgres-schema/public.project_secrets_provider_access.md index 17c38c1f572..c26f934b93f 100644 --- a/docs/generated/postgres-schema/public.project_secrets_provider_access.md +++ b/docs/generated/postgres-schema/public.project_secrets_provider_access.md @@ -4,25 +4,25 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| secretsProviderConnectionId | integer | | false | | [public.secrets_provider_connection](public.secrets_provider_connection.md) | | -| projectId | varchar(36) | | false | | [public.project](public.project.md) | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| projectId | varchar(36) | | false | | [public.project](public.project.md) | | | role | varchar(128) | 'secretsProviderConnection:user'::character varying | false | | | | +| secretsProviderConnectionId | integer | | false | | [public.secrets_provider_connection](public.secrets_provider_connection.md) | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_project_secrets_provider_access_role | CHECK | CHECK (((role)::text = ANY ((ARRAY['secretsProviderConnection:owner'::character varying, 'secretsProviderConnection:user'::character varying])::text[]))) | +| FK_18e5c27d2524b1638b292904e48 | FOREIGN KEY | FOREIGN KEY ("secretsProviderConnectionId") REFERENCES secrets_provider_connection(id) ON DELETE CASCADE | +| FK_bd264b81209355b543878deedb1 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| PK_0402b7fcec5415246656f102f83 | PRIMARY KEY | PRIMARY KEY ("secretsProviderConnectionId", "projectId") | | project_secrets_provider_ac_secretsProviderConnectionI_not_null | n | NOT NULL "secretsProviderConnectionId" | | project_secrets_provider_access_createdAt_not_null | n | NOT NULL "createdAt" | | project_secrets_provider_access_projectId_not_null | n | NOT NULL "projectId" | | project_secrets_provider_access_role_not_null | n | NOT NULL role | | project_secrets_provider_access_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_bd264b81209355b543878deedb1 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| FK_18e5c27d2524b1638b292904e48 | FOREIGN KEY | FOREIGN KEY ("secretsProviderConnectionId") REFERENCES secrets_provider_connection(id) ON DELETE CASCADE | -| PK_0402b7fcec5415246656f102f83 | PRIMARY KEY | PRIMARY KEY ("secretsProviderConnectionId", "projectId") | ## Indexes @@ -35,35 +35,35 @@ ```mermaid erDiagram -"public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE" "public.project_secrets_provider_access" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE" "public.project_secrets_provider_access" { - integer secretsProviderConnectionId FK + timestamp_3__with_time_zone createdAt varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_128_ role -} -"public.secrets_provider_connection" { - integer id - varchar_128_ providerKey - varchar_36_ type - text encryptedSettings - boolean isEnabled - timestamp_3__with_time_zone createdAt + integer secretsProviderConnectionId FK timestamp_3__with_time_zone updatedAt } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags +} +"public.secrets_provider_connection" { + timestamp_3__with_time_zone createdAt + text encryptedSettings + integer id + boolean isEnabled + varchar_128_ providerKey + varchar_36_ type + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.role.md b/docs/generated/postgres-schema/public.role.md index ab1fcf84168..2a6792b2453 100644 --- a/docs/generated/postgres-schema/public.role.md +++ b/docs/generated/postgres-schema/public.role.md @@ -4,85 +4,85 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| slug | varchar(128) | | false | [public.user](public.user.md) [public.project_relation](public.project_relation.md) [public.role_scope](public.role_scope.md) [public.role_mapping_rule](public.role_mapping_rule.md) | | Unique identifier of the role for example: "global:owner" | -| displayName | text | | true | | | Name used to display in the UI | -| description | text | | true | | | Text describing the scope in more detail of users | -| roleType | text | | true | | | Type of the role, e.g., global, project, or workflow | -| systemRole | boolean | false | false | | | Indicates if the role is managed by the system and cannot be edited | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| description | text | | true | | | Text describing the scope in more detail of users | +| displayName | text | | true | | | Name used to display in the UI | +| roleType | text | | true | | | Type of the role, e.g., global, project, or workflow | +| slug | varchar(128) | | false | [public.project_relation](public.project_relation.md) [public.role_mapping_rule](public.role_mapping_rule.md) [public.role_scope](public.role_scope.md) [public.user](public.user.md) | | Unique identifier of the role for example: "global:owner" | +| systemRole | boolean | false | false | | | Indicates if the role is managed by the system and cannot be edited | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_35c9b140caaf6da09cfabb0d675 | PRIMARY KEY | PRIMARY KEY (slug) | | role_createdAt_not_null | n | NOT NULL "createdAt" | | role_slug_not_null | n | NOT NULL slug | | role_systemRole_not_null | n | NOT NULL "systemRole" | | role_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_35c9b140caaf6da09cfabb0d675 | PRIMARY KEY | PRIMARY KEY (slug) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_35c9b140caaf6da09cfabb0d675 | CREATE UNIQUE INDEX "PK_35c9b140caaf6da09cfabb0d675" ON public.role USING btree (slug) | | IDX_UniqueRoleDisplayName | CREATE UNIQUE INDEX "IDX_UniqueRoleDisplayName" ON public.role USING btree ("displayName") | +| PK_35c9b140caaf6da09cfabb0d675 | CREATE UNIQUE INDEX "PK_35c9b140caaf6da09cfabb0d675" ON public.role USING btree (slug) | ## Relations ```mermaid erDiagram -"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)" "public.project_relation" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug)" -"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" "public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" +"public.role_scope" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" +"public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)" "public.role" { - varchar_128_ slug - text displayName + timestamp_3__with_time_zone createdAt text description + text displayName text roleType + varchar_128_ slug boolean systemRole - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } -"public.user" { - uuid id - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar_255_ password - json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK -} "public.project_relation" { - varchar_36_ projectId FK - uuid userId FK - varchar role FK timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + varchar role FK + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.role_mapping_rule" { + timestamp_3__with_time_zone createdAt + text expression + varchar_16_ id + integer order + varchar_128_ role FK + varchar_64_ type timestamp_3__with_time_zone updatedAt } "public.role_scope" { varchar_128_ roleSlug FK varchar_128_ scopeSlug FK } -"public.role_mapping_rule" { - varchar_16_ id - text expression - varchar_128_ role FK - varchar_64_ type - integer order +"public.user" { timestamp_3__with_time_zone createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + uuid id + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret + varchar_255_ password + json personalizationAnswers + varchar_128_ roleSlug FK + json settings timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.role_mapping_rule.md b/docs/generated/postgres-schema/public.role_mapping_rule.md index deba0a8e86b..b5ababde582 100644 --- a/docs/generated/postgres-schema/public.role_mapping_rule.md +++ b/docs/generated/postgres-schema/public.role_mapping_rule.md @@ -4,18 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(16) | | false | [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | expression | text | | false | | | | +| id | varchar(16) | | false | [public.role_mapping_rule_project](public.role_mapping_rule_project.md) | | | +| order | integer | | false | | | | | role | varchar(128) | | false | | [public.role](public.role.md) | | | type | varchar(64) | | false | | | Expected values: 'instance' (maps to a global role) or 'project' (maps to a project role; projects linked via role_mapping_rule_project). | -| order | integer | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_bb66e404c35996b0d6946177501 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE | +| PK_d772c8ec1a89b52d31c882bc560 | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_b33ac896ad3099fc8de36fdc1c4 | UNIQUE | UNIQUE (type, "order") | | role_mapping_rule_createdAt_not_null | n | NOT NULL "createdAt" | | role_mapping_rule_expression_not_null | n | NOT NULL expression | | role_mapping_rule_id_not_null | n | NOT NULL id | @@ -23,17 +26,14 @@ | role_mapping_rule_role_not_null | n | NOT NULL role | | role_mapping_rule_type_not_null | n | NOT NULL type | | role_mapping_rule_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_bb66e404c35996b0d6946177501 | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE | -| PK_d772c8ec1a89b52d31c882bc560 | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_b33ac896ad3099fc8de36fdc1c4 | UNIQUE | UNIQUE (type, "order") | ## Indexes | Name | Definition | | ---- | ---------- | +| IDX_bb66e404c35996b0d694617750 | CREATE INDEX "IDX_bb66e404c35996b0d694617750" ON public.role_mapping_rule USING btree (role) | | PK_d772c8ec1a89b52d31c882bc560 | CREATE UNIQUE INDEX "PK_d772c8ec1a89b52d31c882bc560" ON public.role_mapping_rule USING btree (id) | | UQ_b33ac896ad3099fc8de36fdc1c4 | CREATE UNIQUE INDEX "UQ_b33ac896ad3099fc8de36fdc1c4" ON public.role_mapping_rule USING btree (type, "order") | -| IDX_bb66e404c35996b0d694617750 | CREATE INDEX "IDX_bb66e404c35996b0d694617750" ON public.role_mapping_rule USING btree (role) | ## Relations @@ -44,25 +44,25 @@ erDiagram "public.role_mapping_rule" }o--|| "public.role" : "FOREIGN KEY (role) REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE" "public.role_mapping_rule" { - varchar_16_ id + timestamp_3__with_time_zone createdAt text expression + varchar_16_ id + integer order varchar_128_ role FK varchar_64_ type - integer order - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.role_mapping_rule_project" { - varchar_16_ roleMappingRuleId FK varchar_36_ projectId FK + varchar_16_ roleMappingRuleId FK } "public.role" { - varchar_128_ slug - text displayName - text description - text roleType - boolean systemRole timestamp_3__with_time_zone createdAt + text description + text displayName + text roleType + varchar_128_ slug + boolean systemRole timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.role_mapping_rule_project.md b/docs/generated/postgres-schema/public.role_mapping_rule_project.md index f3778f7345a..7d8b4899277 100644 --- a/docs/generated/postgres-schema/public.role_mapping_rule_project.md +++ b/docs/generated/postgres-schema/public.role_mapping_rule_project.md @@ -4,57 +4,57 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| roleMappingRuleId | varchar(16) | | false | | [public.role_mapping_rule](public.role_mapping_rule.md) | | | projectId | varchar(36) | | false | | [public.project](public.project.md) | | +| roleMappingRuleId | varchar(16) | | false | | [public.role_mapping_rule](public.role_mapping_rule.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| role_mapping_rule_project_projectId_not_null | n | NOT NULL "projectId" | -| role_mapping_rule_project_roleMappingRuleId_not_null | n | NOT NULL "roleMappingRuleId" | | FK_35a78869286c65d9330d02b88f5 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | | FK_dd7ce4dfa09e95b36a626bd9de3 | FOREIGN KEY | FOREIGN KEY ("roleMappingRuleId") REFERENCES role_mapping_rule(id) ON DELETE CASCADE | | PK_198c5b5aea509d139274efcaf9a | PRIMARY KEY | PRIMARY KEY ("roleMappingRuleId", "projectId") | +| role_mapping_rule_project_projectId_not_null | n | NOT NULL "projectId" | +| role_mapping_rule_project_roleMappingRuleId_not_null | n | NOT NULL "roleMappingRuleId" | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_198c5b5aea509d139274efcaf9a | CREATE UNIQUE INDEX "PK_198c5b5aea509d139274efcaf9a" ON public.role_mapping_rule_project USING btree ("roleMappingRuleId", "projectId") | | IDX_35a78869286c65d9330d02b88f | CREATE INDEX "IDX_35a78869286c65d9330d02b88f" ON public.role_mapping_rule_project USING btree ("projectId") | +| PK_198c5b5aea509d139274efcaf9a | CREATE UNIQUE INDEX "PK_198c5b5aea509d139274efcaf9a" ON public.role_mapping_rule_project USING btree ("roleMappingRuleId", "projectId") | ## Relations ```mermaid erDiagram -"public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE" "public.role_mapping_rule_project" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.role_mapping_rule_project" }o--|| "public.role_mapping_rule" : "FOREIGN KEY (#quot;roleMappingRuleId#quot;) REFERENCES role_mapping_rule(id) ON DELETE CASCADE" "public.role_mapping_rule_project" { - varchar_16_ roleMappingRuleId FK varchar_36_ projectId FK -} -"public.role_mapping_rule" { - varchar_16_ id - text expression - varchar_128_ role FK - varchar_64_ type - integer order - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_16_ roleMappingRuleId FK } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags +} +"public.role_mapping_rule" { + timestamp_3__with_time_zone createdAt + text expression + varchar_16_ id + integer order + varchar_128_ role FK + varchar_64_ type + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.role_scope.md b/docs/generated/postgres-schema/public.role_scope.md index 58ad3d18253..4a587a2259c 100644 --- a/docs/generated/postgres-schema/public.role_scope.md +++ b/docs/generated/postgres-schema/public.role_scope.md @@ -11,18 +11,18 @@ | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_role | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE | +| FK_scope | FOREIGN KEY | FOREIGN KEY ("scopeSlug") REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE | +| PK_role_scope | PRIMARY KEY | PRIMARY KEY ("roleSlug", "scopeSlug") | | role_scope_roleSlug_not_null | n | NOT NULL "roleSlug" | | role_scope_scopeSlug_not_null | n | NOT NULL "scopeSlug" | -| FK_scope | FOREIGN KEY | FOREIGN KEY ("scopeSlug") REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE | -| FK_role | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) ON UPDATE CASCADE ON DELETE CASCADE | -| PK_role_scope | PRIMARY KEY | PRIMARY KEY ("roleSlug", "scopeSlug") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_role_scope | CREATE UNIQUE INDEX "PK_role_scope" ON public.role_scope USING btree ("roleSlug", "scopeSlug") | | IDX_role_scope_scopeSlug | CREATE INDEX "IDX_role_scope_scopeSlug" ON public.role_scope USING btree ("scopeSlug") | +| PK_role_scope | CREATE UNIQUE INDEX "PK_role_scope" ON public.role_scope USING btree ("roleSlug", "scopeSlug") | ## Relations @@ -37,18 +37,18 @@ erDiagram varchar_128_ scopeSlug FK } "public.role" { - varchar_128_ slug - text displayName - text description - text roleType - boolean systemRole timestamp_3__with_time_zone createdAt + text description + text displayName + text roleType + varchar_128_ slug + boolean systemRole timestamp_3__with_time_zone updatedAt } "public.scope" { - varchar_128_ slug - text displayName text description + text displayName + varchar_128_ slug } ``` diff --git a/docs/generated/postgres-schema/public.scope.md b/docs/generated/postgres-schema/public.scope.md index 1b5e1ab3c1a..208e447d5ea 100644 --- a/docs/generated/postgres-schema/public.scope.md +++ b/docs/generated/postgres-schema/public.scope.md @@ -4,16 +4,16 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| slug | varchar(128) | | false | [public.role_scope](public.role_scope.md) | | Unique identifier of the scope for example: "project:create" | -| displayName | text | | true | | | Name used to display in the UI | | description | text | | true | | | Text describing the scope in more detail of users | +| displayName | text | | true | | | Name used to display in the UI | +| slug | varchar(128) | | false | [public.role_scope](public.role_scope.md) | | Unique identifier of the scope for example: "project:create" | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| scope_slug_not_null | n | NOT NULL slug | | PK_bfc45df0481abd7f355d6187da1 | PRIMARY KEY | PRIMARY KEY (slug) | +| scope_slug_not_null | n | NOT NULL slug | ## Indexes @@ -29,9 +29,9 @@ erDiagram "public.role_scope" }o--|| "public.scope" : "FOREIGN KEY (#quot;scopeSlug#quot;) REFERENCES scope(slug) ON UPDATE CASCADE ON DELETE CASCADE" "public.scope" { - varchar_128_ slug - text displayName text description + text displayName + varchar_128_ slug } "public.role_scope" { varchar_128_ roleSlug FK diff --git a/docs/generated/postgres-schema/public.secrets_provider_connection.md b/docs/generated/postgres-schema/public.secrets_provider_connection.md index 56847b99555..960d145a80d 100644 --- a/docs/generated/postgres-schema/public.secrets_provider_connection.md +++ b/docs/generated/postgres-schema/public.secrets_provider_connection.md @@ -4,18 +4,19 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| encryptedSettings | text | | false | | | | | id | integer | | false | [public.project_secrets_provider_access](public.project_secrets_provider_access.md) | | | +| isEnabled | boolean | false | false | | | | | providerKey | varchar(128) | | false | | | | | type | varchar(36) | | false | | | Type of secrets provider. Possible values: awsSecretsManager, gcpSecretsManager, vault, azureKeyVault, infisical | -| encryptedSettings | text | | false | | | | -| isEnabled | boolean | false | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_4350ae85e76f9ba7df1370acb5d | PRIMARY KEY | PRIMARY KEY (id) | | secrets_provider_connection_createdAt_not_null | n | NOT NULL "createdAt" | | secrets_provider_connection_encryptedSettings_not_null | n | NOT NULL "encryptedSettings" | | secrets_provider_connection_id_not_null | n | NOT NULL id | @@ -23,14 +24,13 @@ | secrets_provider_connection_providerKey_not_null | n | NOT NULL "providerKey" | | secrets_provider_connection_type_not_null | n | NOT NULL type | | secrets_provider_connection_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_4350ae85e76f9ba7df1370acb5d | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_4350ae85e76f9ba7df1370acb5d | CREATE UNIQUE INDEX "PK_4350ae85e76f9ba7df1370acb5d" ON public.secrets_provider_connection USING btree (id) | | IDX_secrets_provider_connection_providerKey | CREATE UNIQUE INDEX "IDX_secrets_provider_connection_providerKey" ON public.secrets_provider_connection USING btree ("providerKey") | +| PK_4350ae85e76f9ba7df1370acb5d | CREATE UNIQUE INDEX "PK_4350ae85e76f9ba7df1370acb5d" ON public.secrets_provider_connection USING btree (id) | ## Relations @@ -40,20 +40,20 @@ erDiagram "public.project_secrets_provider_access" }o--|| "public.secrets_provider_connection" : "FOREIGN KEY (#quot;secretsProviderConnectionId#quot;) REFERENCES secrets_provider_connection(id) ON DELETE CASCADE" "public.secrets_provider_connection" { + timestamp_3__with_time_zone createdAt + text encryptedSettings integer id + boolean isEnabled varchar_128_ providerKey varchar_36_ type - text encryptedSettings - boolean isEnabled - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.project_secrets_provider_access" { - integer secretsProviderConnectionId FK - varchar_36_ projectId FK timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_36_ projectId FK varchar_128_ role + integer secretsProviderConnectionId FK + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.settings.md b/docs/generated/postgres-schema/public.settings.md index 694b27811e1..ca703d8d6a8 100644 --- a/docs/generated/postgres-schema/public.settings.md +++ b/docs/generated/postgres-schema/public.settings.md @@ -5,17 +5,17 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | key | varchar(255) | | false | | | | -| value | text | | false | | | | | loadOnStartup | boolean | false | false | | | | +| value | text | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_dc0fe14e6d9943f268e7b119f69ab8bd | PRIMARY KEY | PRIMARY KEY (key) | | settings_key_not_null | n | NOT NULL key | | settings_loadOnStartup_not_null | n | NOT NULL "loadOnStartup" | | settings_value_not_null | n | NOT NULL value | -| PK_dc0fe14e6d9943f268e7b119f69ab8bd | PRIMARY KEY | PRIMARY KEY (key) | ## Indexes @@ -31,8 +31,8 @@ erDiagram "public.settings" { varchar_255_ key - text value boolean loadOnStartup + text value } ``` diff --git a/docs/generated/postgres-schema/public.shared_credentials.md b/docs/generated/postgres-schema/public.shared_credentials.md index 7a58dfbd6fd..dce378cf39b 100644 --- a/docs/generated/postgres-schema/public.shared_credentials.md +++ b/docs/generated/postgres-schema/public.shared_credentials.md @@ -4,24 +4,24 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | credentialsId | varchar(36) | | false | | [public.credentials_entity](public.credentials_entity.md) | | | projectId | varchar(36) | | false | | [public.project](public.project.md) | | | role | text | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_416f66fc846c7c442970c094ccf | FOREIGN KEY | FOREIGN KEY ("credentialsId") REFERENCES credentials_entity(id) ON DELETE CASCADE | +| FK_812c2852270da1247756e77f5a4 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| PK_8ef3a59796a228913f251779cff | PRIMARY KEY | PRIMARY KEY ("credentialsId", "projectId") | | shared_credentials_2_createdAt_not_null | n | NOT NULL "createdAt" | | shared_credentials_2_credentialsId_not_null | n | NOT NULL "credentialsId" | | shared_credentials_2_projectId_not_null | n | NOT NULL "projectId" | | shared_credentials_2_role_not_null | n | NOT NULL role | | shared_credentials_2_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_416f66fc846c7c442970c094ccf | FOREIGN KEY | FOREIGN KEY ("credentialsId") REFERENCES credentials_entity(id) ON DELETE CASCADE | -| FK_812c2852270da1247756e77f5a4 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| PK_8ef3a59796a228913f251779cff | PRIMARY KEY | PRIMARY KEY ("credentialsId", "projectId") | ## Indexes @@ -38,35 +38,35 @@ erDiagram "public.shared_credentials" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.shared_credentials" { + timestamp_3__with_time_zone createdAt varchar_36_ credentialsId FK varchar_36_ projectId FK text role - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } "public.credentials_entity" { - varchar_128_ name - text data - varchar_128_ type timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + text data varchar_36_ id - boolean isManaged boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_128_ type + timestamp_3__with_time_zone updatedAt } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } ``` diff --git a/docs/generated/postgres-schema/public.shared_workflow.md b/docs/generated/postgres-schema/public.shared_workflow.md index a6548a75b0b..dcec3824f72 100644 --- a/docs/generated/postgres-schema/public.shared_workflow.md +++ b/docs/generated/postgres-schema/public.shared_workflow.md @@ -4,79 +4,79 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | projectId | varchar(36) | | false | | [public.project](public.project.md) | | | role | text | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_a45ea5f27bcfdc21af9b4188560 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | +| FK_daa206a04983d47d0a9c34649ce | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_5ba87620386b847201c9531c58f | PRIMARY KEY | PRIMARY KEY ("workflowId", "projectId") | | shared_workflow_2_createdAt_not_null | n | NOT NULL "createdAt" | | shared_workflow_2_projectId_not_null | n | NOT NULL "projectId" | | shared_workflow_2_role_not_null | n | NOT NULL role | | shared_workflow_2_updatedAt_not_null | n | NOT NULL "updatedAt" | | shared_workflow_2_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_daa206a04983d47d0a9c34649ce | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| FK_a45ea5f27bcfdc21af9b4188560 | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | -| PK_5ba87620386b847201c9531c58f | PRIMARY KEY | PRIMARY KEY ("workflowId", "projectId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_5ba87620386b847201c9531c58f | CREATE UNIQUE INDEX "PK_5ba87620386b847201c9531c58f" ON public.shared_workflow USING btree ("workflowId", "projectId") | | IDX_shared_workflow_projectId | CREATE INDEX "IDX_shared_workflow_projectId" ON public.shared_workflow USING btree ("projectId") | +| PK_5ba87620386b847201c9531c58f | CREATE UNIQUE INDEX "PK_5ba87620386b847201c9531c58f" ON public.shared_workflow USING btree ("workflowId", "projectId") | ## Relations ```mermaid erDiagram -"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.shared_workflow" }o--|| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" +"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.shared_workflow" { - varchar_36_ workflowId FK + timestamp_3__with_time_zone createdAt varchar_36_ projectId FK text role - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId + varchar_36_ workflowId FK } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.tag_entity.md b/docs/generated/postgres-schema/public.tag_entity.md index e6814a7b30e..726e98a298e 100644 --- a/docs/generated/postgres-schema/public.tag_entity.md +++ b/docs/generated/postgres-schema/public.tag_entity.md @@ -4,10 +4,10 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| name | varchar(24) | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | [public.folder_tag](public.folder_tag.md) [public.workflows_tags](public.workflows_tags.md) | | | +| name | varchar(24) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| id | varchar(36) | | false | [public.workflows_tags](public.workflows_tags.md) [public.folder_tag](public.folder_tag.md) | | | ## Constraints @@ -16,8 +16,8 @@ | tag_entity_createdAt_not_null | n | NOT NULL "createdAt" | | tag_entity_id_not_null1 | n | NOT NULL id | | tag_entity_name_not_null | n | NOT NULL name | -| tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" | | tag_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) | +| tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" | ## Indexes @@ -32,23 +32,23 @@ ```mermaid erDiagram -"public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" "public.folder_tag" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" +"public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" "public.tag_entity" { - varchar_24_ name timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ id -} -"public.workflows_tags" { - varchar_36_ workflowId FK - varchar_36_ tagId FK + varchar_24_ name + timestamp_3__with_time_zone updatedAt } "public.folder_tag" { varchar_36_ folderId FK varchar_36_ tagId FK } +"public.workflows_tags" { + varchar_36_ tagId FK + varchar_36_ workflowId FK +} ``` --- diff --git a/docs/generated/postgres-schema/public.test_case_execution.md b/docs/generated/postgres-schema/public.test_case_execution.md index 8f0b62e5b63..7881cfa1bf0 100644 --- a/docs/generated/postgres-schema/public.test_case_execution.md +++ b/docs/generated/postgres-schema/public.test_case_execution.md @@ -4,100 +4,100 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| testRunId | varchar(36) | | false | | [public.test_run](public.test_run.md) | | -| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | | -| status | varchar | | false | | | | -| runAt | timestamp(3) with time zone | | true | | | | | completedAt | timestamp(3) with time zone | | true | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | errorCode | varchar | | true | | | | | errorDetails | json | | true | | | | -| metrics | json | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| executionId | integer | | true | | [public.execution_entity](public.execution_entity.md) | | +| id | varchar(36) | | false | | | | | inputs | json | | true | | | | +| metrics | json | | true | | | | | outputs | json | | true | | | | +| runAt | timestamp(3) with time zone | | true | | | | | runIndex | integer | | true | | | | +| status | varchar | | false | | | | +| testRunId | varchar(36) | | false | | [public.test_run](public.test_run.md) | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_8e4b4774db42f1e6dda3452b2af | FOREIGN KEY | FOREIGN KEY ("testRunId") REFERENCES test_run(id) ON DELETE CASCADE | +| FK_e48965fac35d0f5b9e7f51d8c44 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL | +| PK_90c121f77a78a6580e94b794bce | PRIMARY KEY | PRIMARY KEY (id) | | test_case_execution_createdAt_not_null | n | NOT NULL "createdAt" | | test_case_execution_id_not_null | n | NOT NULL id | | test_case_execution_status_not_null | n | NOT NULL status | | test_case_execution_testRunId_not_null | n | NOT NULL "testRunId" | | test_case_execution_updatedAt_not_null | n | NOT NULL "updatedAt" | -| FK_e48965fac35d0f5b9e7f51d8c44 | FOREIGN KEY | FOREIGN KEY ("executionId") REFERENCES execution_entity(id) ON DELETE SET NULL | -| FK_8e4b4774db42f1e6dda3452b2af | FOREIGN KEY | FOREIGN KEY ("testRunId") REFERENCES test_run(id) ON DELETE CASCADE | -| PK_90c121f77a78a6580e94b794bce | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_90c121f77a78a6580e94b794bce | CREATE UNIQUE INDEX "PK_90c121f77a78a6580e94b794bce" ON public.test_case_execution USING btree (id) | | IDX_8e4b4774db42f1e6dda3452b2a | CREATE INDEX "IDX_8e4b4774db42f1e6dda3452b2a" ON public.test_case_execution USING btree ("testRunId") | +| PK_90c121f77a78a6580e94b794bce | CREATE UNIQUE INDEX "PK_90c121f77a78a6580e94b794bce" ON public.test_case_execution USING btree (id) | ## Relations ```mermaid erDiagram -"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE" "public.test_case_execution" }o--o| "public.execution_entity" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES execution_entity(id) ON DELETE SET NULL" +"public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE" "public.test_case_execution" { - varchar_36_ id - varchar_36_ testRunId FK + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt + varchar errorCode + json errorDetails integer executionId FK - varchar status - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - varchar errorCode - json errorDetails - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json inputs - json outputs - integer runIndex -} -"public.test_run" { varchar_36_ id - varchar_36_ workflowId FK - varchar status - varchar errorCode - json errorDetails - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt + json inputs json metrics - timestamp_3__with_time_zone createdAt + json outputs + timestamp_3__with_time_zone runAt + integer runIndex + varchar status + varchar_36_ testRunId FK timestamp_3__with_time_zone updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - jsonb evaluationConfigSnapshot - varchar_36_ collectionId FK } "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} +"public.test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt + varchar errorCode + json errorDetails + varchar_36_ evaluationConfigId FK + jsonb evaluationConfigSnapshot + varchar_36_ id + json metrics + timestamp_3__with_time_zone runAt + varchar_255_ runningInstanceId + varchar status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK varchar_36_ workflowVersionId } ``` diff --git a/docs/generated/postgres-schema/public.test_run.md b/docs/generated/postgres-schema/public.test_run.md index 218a05660dc..636103eb3da 100644 --- a/docs/generated/postgres-schema/public.test_run.md +++ b/docs/generated/postgres-schema/public.test_run.md @@ -4,137 +4,137 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.test_case_execution](public.test_case_execution.md) | | | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| status | varchar | | false | | | | +| cancelRequested | boolean | false | false | | | | +| collectionId | varchar(36) | | true | | [public.evaluation_collection](public.evaluation_collection.md) | | +| completedAt | timestamp(3) with time zone | | true | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | errorCode | varchar | | true | | | | | errorDetails | json | | true | | | | -| runAt | timestamp(3) with time zone | | true | | | | -| completedAt | timestamp(3) with time zone | | true | | | | -| metrics | json | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| runningInstanceId | varchar(255) | | true | | | | -| cancelRequested | boolean | false | false | | | | -| workflowVersionId | varchar(36) | | true | | | | | evaluationConfigId | varchar(36) | | true | | [public.evaluation_config](public.evaluation_config.md) | | | evaluationConfigSnapshot | jsonb | | true | | | | -| collectionId | varchar(36) | | true | | [public.evaluation_collection](public.evaluation_collection.md) | | +| id | varchar(36) | | false | [public.test_case_execution](public.test_case_execution.md) | | | +| metrics | json | | true | | | | +| runAt | timestamp(3) with time zone | | true | | | | +| runningInstanceId | varchar(255) | | true | | | | +| status | varchar | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | +| workflowVersionId | varchar(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_d6870d3b6e4c185d33926f423c8 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| FK_test_run_collection_id | FOREIGN KEY | FOREIGN KEY ("collectionId") REFERENCES evaluation_collection(id) ON DELETE SET NULL | +| FK_test_run_evaluation_config_id | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE SET NULL | +| PK_011c050f566e9db509a0fadb9b9 | PRIMARY KEY | PRIMARY KEY (id) | | test_run_cancelRequested_not_null | n | NOT NULL "cancelRequested" | | test_run_createdAt_not_null | n | NOT NULL "createdAt" | | test_run_id_not_null | n | NOT NULL id | | test_run_status_not_null | n | NOT NULL status | | test_run_updatedAt_not_null | n | NOT NULL "updatedAt" | | test_run_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_d6870d3b6e4c185d33926f423c8 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| PK_011c050f566e9db509a0fadb9b9 | PRIMARY KEY | PRIMARY KEY (id) | -| FK_test_run_evaluation_config_id | FOREIGN KEY | FOREIGN KEY ("evaluationConfigId") REFERENCES evaluation_config(id) ON DELETE SET NULL | -| FK_test_run_collection_id | FOREIGN KEY | FOREIGN KEY ("collectionId") REFERENCES evaluation_collection(id) ON DELETE SET NULL | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_011c050f566e9db509a0fadb9b9 | CREATE UNIQUE INDEX "PK_011c050f566e9db509a0fadb9b9" ON public.test_run USING btree (id) | | IDX_d6870d3b6e4c185d33926f423c | CREATE INDEX "IDX_d6870d3b6e4c185d33926f423c" ON public.test_run USING btree ("workflowId") | -| IDX_test_run_evaluationConfigId | CREATE INDEX "IDX_test_run_evaluationConfigId" ON public.test_run USING btree ("evaluationConfigId") | | IDX_test_run_collectionId | CREATE INDEX "IDX_test_run_collectionId" ON public.test_run USING btree ("collectionId") | +| IDX_test_run_evaluationConfigId | CREATE INDEX "IDX_test_run_evaluationConfigId" ON public.test_run USING btree ("evaluationConfigId") | +| PK_011c050f566e9db509a0fadb9b9 | CREATE UNIQUE INDEX "PK_011c050f566e9db509a0fadb9b9" ON public.test_run USING btree (id) | ## Relations ```mermaid erDiagram +"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL" +"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL" "public.test_case_execution" }o--|| "public.test_run" : "FOREIGN KEY (#quot;testRunId#quot;) REFERENCES test_run(id) ON DELETE CASCADE" "public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.test_run" }o--o| "public.evaluation_config" : "FOREIGN KEY (#quot;evaluationConfigId#quot;) REFERENCES evaluation_config(id) ON DELETE SET NULL" -"public.test_run" }o--o| "public.evaluation_collection" : "FOREIGN KEY (#quot;collectionId#quot;) REFERENCES evaluation_collection(id) ON DELETE SET NULL" "public.test_run" { - varchar_36_ id - varchar_36_ workflowId FK - varchar status + boolean cancelRequested + varchar_36_ collectionId FK + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt varchar errorCode json errorDetails - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId varchar_36_ evaluationConfigId FK jsonb evaluationConfigSnapshot - varchar_36_ collectionId FK -} -"public.test_case_execution" { varchar_36_ id - varchar_36_ testRunId FK - integer executionId FK - varchar status + json metrics timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - varchar errorCode - json errorDetails - json metrics - timestamp_3__with_time_zone createdAt + varchar_255_ runningInstanceId + varchar status timestamp_3__with_time_zone updatedAt - json inputs - json outputs - integer runIndex -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId -} -"public.evaluation_config" { - varchar_36_ id varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - json datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_36_ workflowVersionId } "public.evaluation_collection" { - varchar_36_ id - varchar_128_ name - text description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - uuid createdById FK - json insightsCache timestamp_3__with_time_zone createdAt + uuid createdById FK + text description + varchar_36_ evaluationConfigId FK + varchar_36_ id + json insightsCache + varchar_128_ name timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.evaluation_config" { + timestamp_3__with_time_zone createdAt + json datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id + varchar_64_ invalidReason + json metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.test_case_execution" { + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt + varchar errorCode + json errorDetails + integer executionId FK + varchar_36_ id + json inputs + json metrics + json outputs + timestamp_3__with_time_zone runAt + integer runIndex + varchar status + varchar_36_ testRunId FK + timestamp_3__with_time_zone updatedAt +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.token_exchange_jti.md b/docs/generated/postgres-schema/public.token_exchange_jti.md index 942c1b17bd9..68528411898 100644 --- a/docs/generated/postgres-schema/public.token_exchange_jti.md +++ b/docs/generated/postgres-schema/public.token_exchange_jti.md @@ -4,18 +4,18 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| jti | varchar(255) | | false | | | | -| expiresAt | timestamp(3) with time zone | | false | | | | | createdAt | timestamp(3) with time zone | | false | | | | +| expiresAt | timestamp(3) with time zone | | false | | | | +| jti | varchar(255) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_d8e8a6f737d530fdd2dd716e89c | PRIMARY KEY | PRIMARY KEY (jti) | | token_exchange_jti_createdAt_not_null | n | NOT NULL "createdAt" | | token_exchange_jti_expiresAt_not_null | n | NOT NULL "expiresAt" | | token_exchange_jti_jti_not_null | n | NOT NULL jti | -| PK_d8e8a6f737d530fdd2dd716e89c | PRIMARY KEY | PRIMARY KEY (jti) | ## Indexes @@ -30,9 +30,9 @@ erDiagram "public.token_exchange_jti" { - varchar_255_ jti - timestamp_3__with_time_zone expiresAt timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiresAt + varchar_255_ jti } ``` diff --git a/docs/generated/postgres-schema/public.trusted_key.md b/docs/generated/postgres-schema/public.trusted_key.md index 20763d54bd1..99477e77837 100644 --- a/docs/generated/postgres-schema/public.trusted_key.md +++ b/docs/generated/postgres-schema/public.trusted_key.md @@ -4,21 +4,21 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| sourceId | varchar(36) | | false | | [public.trusted_key_source](public.trusted_key_source.md) | | -| kid | varchar(255) | | false | | | | -| data | text | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| data | text | | false | | | | +| kid | varchar(255) | | false | | | | +| sourceId | varchar(36) | | false | | [public.trusted_key_source](public.trusted_key_source.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_8c2938d746943dd8f608d23c891 | FOREIGN KEY | FOREIGN KEY ("sourceId") REFERENCES trusted_key_source(id) ON DELETE CASCADE | +| PK_dc7d93798f3dbb6959f974c97e1 | PRIMARY KEY | PRIMARY KEY ("sourceId", kid) | | trusted_key_createdAt_not_null | n | NOT NULL "createdAt" | | trusted_key_data_not_null | n | NOT NULL data | | trusted_key_kid_not_null | n | NOT NULL kid | | trusted_key_sourceId_not_null | n | NOT NULL "sourceId" | -| FK_8c2938d746943dd8f608d23c891 | FOREIGN KEY | FOREIGN KEY ("sourceId") REFERENCES trusted_key_source(id) ON DELETE CASCADE | -| PK_dc7d93798f3dbb6959f974c97e1 | PRIMARY KEY | PRIMARY KEY ("sourceId", kid) | ## Indexes @@ -34,19 +34,19 @@ erDiagram "public.trusted_key" }o--|| "public.trusted_key_source" : "FOREIGN KEY (#quot;sourceId#quot;) REFERENCES trusted_key_source(id) ON DELETE CASCADE" "public.trusted_key" { - varchar_36_ sourceId FK - varchar_255_ kid - text data timestamp_3__with_time_zone createdAt + text data + varchar_255_ kid + varchar_36_ sourceId FK } "public.trusted_key_source" { - varchar_36_ id - varchar_32_ type text config - varchar_32_ status + timestamp_3__with_time_zone createdAt + varchar_36_ id text lastError timestamp_3__with_time_zone lastRefreshedAt - timestamp_3__with_time_zone createdAt + varchar_32_ status + varchar_32_ type timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.trusted_key_source.md b/docs/generated/postgres-schema/public.trusted_key_source.md index a932403421d..053221e3bb6 100644 --- a/docs/generated/postgres-schema/public.trusted_key_source.md +++ b/docs/generated/postgres-schema/public.trusted_key_source.md @@ -4,26 +4,26 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [public.trusted_key](public.trusted_key.md) | | | -| type | varchar(32) | | false | | | | | config | text | | false | | | | -| status | varchar(32) | 'pending'::character varying | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | [public.trusted_key](public.trusted_key.md) | | | | lastError | text | | true | | | | | lastRefreshedAt | timestamp(3) with time zone | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| status | varchar(32) | 'pending'::character varying | false | | | | +| type | varchar(32) | | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_99e8908ce2c2cdccce487db7fc6 | PRIMARY KEY | PRIMARY KEY (id) | | trusted_key_source_config_not_null | n | NOT NULL config | | trusted_key_source_createdAt_not_null | n | NOT NULL "createdAt" | | trusted_key_source_id_not_null | n | NOT NULL id | | trusted_key_source_status_not_null | n | NOT NULL status | | trusted_key_source_type_not_null | n | NOT NULL type | | trusted_key_source_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_99e8908ce2c2cdccce487db7fc6 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -39,20 +39,20 @@ erDiagram "public.trusted_key" }o--|| "public.trusted_key_source" : "FOREIGN KEY (#quot;sourceId#quot;) REFERENCES trusted_key_source(id) ON DELETE CASCADE" "public.trusted_key_source" { - varchar_36_ id - varchar_32_ type text config - varchar_32_ status + timestamp_3__with_time_zone createdAt + varchar_36_ id text lastError timestamp_3__with_time_zone lastRefreshedAt - timestamp_3__with_time_zone createdAt + varchar_32_ status + varchar_32_ type timestamp_3__with_time_zone updatedAt } "public.trusted_key" { - varchar_36_ sourceId FK - varchar_255_ kid - text data timestamp_3__with_time_zone createdAt + text data + varchar_255_ kid + varchar_36_ sourceId FK } ``` diff --git a/docs/generated/postgres-schema/public.user.md b/docs/generated/postgres-schema/public.user.md index c8e53006977..a6fa4a685cd 100644 --- a/docs/generated/postgres-schema/public.user.md +++ b/docs/generated/postgres-schema/public.user.md @@ -4,35 +4,35 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | uuid | gen_random_uuid() | false | [public.auth_identity](public.auth_identity.md) [public.project](public.project.md) [public.project_relation](public.project_relation.md) [public.user_api_keys](public.user_api_keys.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.chat_hub_tools](public.chat_hub_tools.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.user_favorites](public.user_favorites.md) [public.evaluation_collection](public.evaluation_collection.md) [public.agent_history](public.agent_history.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| disabled | boolean | false | false | | | | | email | varchar(255) | | true | | | | | firstName | varchar(32) | | true | | | | +| id | uuid | gen_random_uuid() | false | [public.agent_history](public.agent_history.md) [public.auth_identity](public.auth_identity.md) [public.chat_hub_agents](public.chat_hub_agents.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_tools](public.chat_hub_tools.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.evaluation_collection](public.evaluation_collection.md) [public.instance_ai_mcp_registry_connections](public.instance_ai_mcp_registry_connections.md) [public.instance_ai_pending_confirmations](public.instance_ai_pending_confirmations.md) [public.oauth_access_tokens](public.oauth_access_tokens.md) [public.oauth_authorization_codes](public.oauth_authorization_codes.md) [public.oauth_refresh_tokens](public.oauth_refresh_tokens.md) [public.oauth_user_consents](public.oauth_user_consents.md) [public.project](public.project.md) [public.project_relation](public.project_relation.md) [public.user_api_keys](public.user_api_keys.md) [public.user_favorites](public.user_favorites.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.workflow_publish_history](public.workflow_publish_history.md) | | | +| lastActiveAt | date | | true | | | | | lastName | varchar(32) | | true | | | | +| mfaEnabled | boolean | false | false | | | | +| mfaRecoveryCodes | text | | true | | | | +| mfaSecret | text | | true | | | | | password | varchar(255) | | true | | | | | personalizationAnswers | json | | true | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| settings | json | | true | | | | -| disabled | boolean | false | false | | | | -| mfaEnabled | boolean | false | false | | | | -| mfaSecret | text | | true | | | | -| mfaRecoveryCodes | text | | true | | | | -| lastActiveAt | date | | true | | | | | roleSlug | varchar(128) | 'global:member'::character varying | false | | [public.role](public.role.md) | | +| settings | json | | true | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_eaea92ee7bfb9c1b6cd01505d56 | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) | +| PK_ea8f538c94b6e352418254ed6474a81f | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_e12875dfb3b1d92d7d7c5377e2 | UNIQUE | UNIQUE (email) | | user_createdAt_not_null | n | NOT NULL "createdAt" | | user_disabled_not_null | n | NOT NULL disabled | | user_id_not_null | n | NOT NULL id | | user_mfaEnabled_not_null | n | NOT NULL "mfaEnabled" | | user_roleSlug_not_null | n | NOT NULL "roleSlug" | | user_updatedAt_not_null | n | NOT NULL "updatedAt" | -| PK_ea8f538c94b6e352418254ed6474a81f | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_e12875dfb3b1d92d7d7c5377e2 | UNIQUE | UNIQUE (email) | -| FK_eaea92ee7bfb9c1b6cd01505d56 | FOREIGN KEY | FOREIGN KEY ("roleSlug") REFERENCES role(slug) | ## Indexes @@ -47,241 +47,241 @@ ```mermaid erDiagram +"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" "public.auth_identity" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id)" +"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.project" }o--o| "public.user" : "FOREIGN KEY (#quot;creatorId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" "public.project_relation" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_sessions" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_agents" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.oauth_authorization_codes" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.oauth_access_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.oauth_refresh_tokens" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.oauth_user_consents" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.dynamic_credential_user_entry" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.chat_hub_tools" }o--|| "public.user" : "FOREIGN KEY (#quot;ownerId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.user_favorites" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.evaluation_collection" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.agent_history" }o--o| "public.user" : "FOREIGN KEY (#quot;publishedById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" -"public.instance_ai_pending_confirmations" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" -"public.instance_ai_mcp_registry_connections" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" "public.user" }o--|| "public.role" : "FOREIGN KEY (#quot;roleSlug#quot;) REFERENCES role(slug)" "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"public.auth_identity" { - uuid userId FK - varchar_255_ providerId - varchar_32_ providerType - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.project" { - varchar_36_ id - varchar_255_ name - varchar_36_ type - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags -} -"public.project_relation" { - varchar_36_ projectId FK - uuid userId FK - varchar role FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.user_api_keys" { - varchar_36_ id - uuid userId FK - varchar_100_ label - varchar apiKey - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json scopes - varchar audience - timestamp_3__with_time_zone lastUsedAt -} -"public.chat_hub_sessions" { - uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_128_ agentName - varchar_16_ type -} -"public.chat_hub_agents" { - uuid id - varchar_256_ name - varchar_512_ description - text systemPrompt - uuid ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json icon - json files - json suggestedPrompts -} -"public.oauth_authorization_codes" { - varchar_255_ code - varchar clientId FK - uuid userId FK - varchar redirectUri - varchar codeChallenge - varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar resource - json scope -} -"public.oauth_access_tokens" { - varchar token - varchar clientId FK - uuid userId FK -} -"public.oauth_refresh_tokens" { - varchar_255_ token - varchar clientId FK - uuid userId FK - bigint expiresAt - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json scope -} -"public.oauth_user_consents" { - integer id - uuid userId FK - varchar clientId FK - bigint grantedAt -} -"public.workflow_publish_history" { - integer id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - uuid userId FK - timestamp_3__with_time_zone createdAt -} -"public.dynamic_credential_user_entry" { - varchar_16_ credentialId FK - uuid userId FK - varchar_16_ resolverId FK - text data - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.chat_hub_tools" { - uuid id - varchar_255_ name - varchar_255_ type - double_precision typeVersion - uuid ownerId FK - json definition - boolean enabled - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt -} -"public.workflow_builder_session" { - uuid id - varchar_36_ workflowId FK - uuid userId FK - json messages - text previousSummary - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ activeVersionCardId - varchar_255_ resumeAfterRestoreMessageId -} -"public.user_favorites" { - integer id - uuid userId FK - varchar_255_ resourceId - varchar_64_ resourceType -} -"public.evaluation_collection" { - varchar_36_ id - varchar_128_ name - text description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - uuid createdById FK - json insightsCache - timestamp_3__with_time_zone createdAt + json settings timestamp_3__with_time_zone updatedAt } "public.agent_history" { - varchar_36_ versionId varchar_36_ agentId FK - json schema - json tools - json skills - uuid publishedById FK varchar_255_ author timestamp_3__with_time_zone createdAt + uuid publishedById FK + json schema + json skills + json tools + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId +} +"public.auth_identity" { + timestamp_3__with_time_zone createdAt + varchar_255_ providerId + varchar_32_ providerType + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.chat_hub_agents" { + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + varchar_512_ description + json files + json icon + uuid id + varchar_64_ model + varchar_256_ name + uuid ownerId FK + varchar_16_ provider + json suggestedPrompts + text systemPrompt timestamp_3__with_time_zone updatedAt } -"public.instance_ai_pending_confirmations" { - varchar_36_ requestId - uuid threadId FK - uuid userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId - varchar_255_ checkpointKey FK - varchar_36_ checkpointTaskId - timestamp_3__with_time_zone expiresAt +"public.chat_hub_sessions" { + uuid agentId FK + varchar_128_ agentName timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_tools" { + timestamp_3__with_time_zone createdAt + json definition + boolean enabled + uuid id + varchar_255_ name + uuid ownerId FK + varchar_255_ type + double_precision typeVersion + timestamp_3__with_time_zone updatedAt +} +"public.dynamic_credential_user_entry" { + timestamp_3__with_time_zone createdAt + varchar_16_ credentialId FK + text data + varchar_16_ resolverId FK + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.evaluation_collection" { + timestamp_3__with_time_zone createdAt + uuid createdById FK + text description + varchar_36_ evaluationConfigId FK + varchar_36_ id + json insightsCache + varchar_128_ name + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.instance_ai_mcp_registry_connections" { - uuid id + timestamp_3__with_time_zone createdAt varchar_36_ credentialId FK + uuid id varchar_255_ serverSlug FK json toolFilter + timestamp_3__with_time_zone updatedAt uuid userId FK +} +"public.instance_ai_pending_confirmations" { + varchar_255_ checkpointKey FK + varchar_36_ checkpointTaskId timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId + varchar_36_ runId + uuid threadId FK + varchar_64_ toolCallId + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.oauth_access_tokens" { + varchar clientId FK + varchar token + uuid userId FK +} +"public.oauth_authorization_codes" { + varchar clientId FK + varchar_255_ code + varchar codeChallenge + varchar_255_ codeChallengeMethod + timestamp_3__with_time_zone createdAt + bigint expiresAt + varchar redirectUri + varchar resource + json scope + varchar state + timestamp_3__with_time_zone updatedAt + boolean used + uuid userId FK +} +"public.oauth_refresh_tokens" { + varchar clientId FK + timestamp_3__with_time_zone createdAt + bigint expiresAt + json scope + varchar_255_ token + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.oauth_user_consents" { + varchar clientId FK + bigint grantedAt + integer id + uuid userId FK +} +"public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon + varchar_36_ id + varchar_255_ name + varchar_36_ type timestamp_3__with_time_zone updatedAt } -"public.role" { - varchar_128_ slug - text displayName - text description - text roleType - boolean systemRole +"public.project_relation" { timestamp_3__with_time_zone createdAt + varchar_36_ projectId FK + varchar role FK + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.user_api_keys" { + varchar apiKey + varchar audience + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_100_ label + timestamp_3__with_time_zone lastUsedAt + json scopes + timestamp_3__with_time_zone updatedAt + uuid userId FK +} +"public.user_favorites" { + integer id + varchar_255_ resourceId + varchar_64_ resourceType + uuid userId FK +} +"public.workflow_builder_session" { + varchar_255_ activeVersionCardId + timestamp_3__with_time_zone createdAt + uuid id + json messages + text previousSummary + varchar_255_ resumeAfterRestoreMessageId + timestamp_3__with_time_zone updatedAt + uuid userId FK + varchar_36_ workflowId FK +} +"public.workflow_publish_history" { + timestamp_3__with_time_zone createdAt + varchar_36_ event + integer id + uuid userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK +} +"public.role" { + timestamp_3__with_time_zone createdAt + text description + text displayName + text roleType + varchar_128_ slug + boolean systemRole timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.user_api_keys.md b/docs/generated/postgres-schema/public.user_api_keys.md index c7e1a190c92..947de36e556 100644 --- a/docs/generated/postgres-schema/public.user_api_keys.md +++ b/docs/generated/postgres-schema/public.user_api_keys.md @@ -4,20 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| userId | uuid | | false | | [public.user](public.user.md) | | -| label | varchar(100) | | false | | | | | apiKey | varchar | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| scopes | json | | true | | | | | audience | varchar | 'public-api'::character varying | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| id | varchar(36) | | false | | | | +| label | varchar(100) | | false | | | | | lastUsedAt | timestamp(3) with time zone | | true | | | | +| scopes | json | | true | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_e131705cbbc8fb589889b02d457 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_978fa5caa3468f463dac9d92e69 | PRIMARY KEY | PRIMARY KEY (id) | | user_api_keys_apiKey_not_null | n | NOT NULL "apiKey" | | user_api_keys_audience_not_null | n | NOT NULL audience | | user_api_keys_createdAt_not_null | n | NOT NULL "createdAt" | @@ -25,16 +27,14 @@ | user_api_keys_label_not_null | n | NOT NULL label | | user_api_keys_updatedAt_not_null | n | NOT NULL "updatedAt" | | user_api_keys_userId_not_null | n | NOT NULL "userId" | -| FK_e131705cbbc8fb589889b02d457 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| PK_978fa5caa3468f463dac9d92e69 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_978fa5caa3468f463dac9d92e69 | CREATE UNIQUE INDEX "PK_978fa5caa3468f463dac9d92e69" ON public.user_api_keys USING btree (id) | -| IDX_63d7bbae72c767cf162d459fcc | CREATE UNIQUE INDEX "IDX_63d7bbae72c767cf162d459fcc" ON public.user_api_keys USING btree ("userId", label) | | IDX_1ef35bac35d20bdae979d917a3 | CREATE UNIQUE INDEX "IDX_1ef35bac35d20bdae979d917a3" ON public.user_api_keys USING btree ("apiKey") | +| IDX_63d7bbae72c767cf162d459fcc | CREATE UNIQUE INDEX "IDX_63d7bbae72c767cf162d459fcc" ON public.user_api_keys USING btree ("userId", label) | +| PK_978fa5caa3468f463dac9d92e69 | CREATE UNIQUE INDEX "PK_978fa5caa3468f463dac9d92e69" ON public.user_api_keys USING btree (id) | ## Relations @@ -44,32 +44,32 @@ erDiagram "public.user_api_keys" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" "public.user_api_keys" { - varchar_36_ id - uuid userId FK - varchar_100_ label varchar apiKey - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json scopes varchar audience + timestamp_3__with_time_zone createdAt + varchar_36_ id + varchar_100_ label timestamp_3__with_time_zone lastUsedAt + json scopes + timestamp_3__with_time_zone updatedAt + uuid userId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.user_favorites.md b/docs/generated/postgres-schema/public.user_favorites.md index 5cd7dc0b82a..e41f2dcc634 100644 --- a/docs/generated/postgres-schema/public.user_favorites.md +++ b/docs/generated/postgres-schema/public.user_favorites.md @@ -5,30 +5,30 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | integer | | false | | | | -| userId | uuid | | false | | [public.user](public.user.md) | | | resourceId | varchar(255) | | false | | | | | resourceType | varchar(64) | | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_1dd5c393ad0517be3c31a7af836 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| PK_6c472a19a7423cfbbf6b7c75939 | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_cf6ae658ead9ffc124723413c65 | UNIQUE | UNIQUE ("userId", "resourceId", "resourceType") | | user_favorites_id_not_null | n | NOT NULL id | | user_favorites_resourceId_not_null | n | NOT NULL "resourceId" | | user_favorites_resourceType_not_null | n | NOT NULL "resourceType" | | user_favorites_userId_not_null | n | NOT NULL "userId" | -| FK_1dd5c393ad0517be3c31a7af836 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| PK_6c472a19a7423cfbbf6b7c75939 | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_cf6ae658ead9ffc124723413c65 | UNIQUE | UNIQUE ("userId", "resourceId", "resourceType") | ## Indexes | Name | Definition | | ---- | ---------- | +| IDX_1d11050a381548c42c32cc25c4 | CREATE INDEX "IDX_1d11050a381548c42c32cc25c4" ON public.user_favorites USING btree ("resourceType", "resourceId") | +| IDX_1dd5c393ad0517be3c31a7af83 | CREATE INDEX "IDX_1dd5c393ad0517be3c31a7af83" ON public.user_favorites USING btree ("userId") | | PK_6c472a19a7423cfbbf6b7c75939 | CREATE UNIQUE INDEX "PK_6c472a19a7423cfbbf6b7c75939" ON public.user_favorites USING btree (id) | | UQ_cf6ae658ead9ffc124723413c65 | CREATE UNIQUE INDEX "UQ_cf6ae658ead9ffc124723413c65" ON public.user_favorites USING btree ("userId", "resourceId", "resourceType") | -| IDX_1dd5c393ad0517be3c31a7af83 | CREATE INDEX "IDX_1dd5c393ad0517be3c31a7af83" ON public.user_favorites USING btree ("userId") | -| IDX_1d11050a381548c42c32cc25c4 | CREATE INDEX "IDX_1d11050a381548c42c32cc25c4" ON public.user_favorites USING btree ("resourceType", "resourceId") | ## Relations @@ -39,26 +39,26 @@ erDiagram "public.user_favorites" { integer id - uuid userId FK varchar_255_ resourceId varchar_64_ resourceType + uuid userId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.variables.md b/docs/generated/postgres-schema/public.variables.md index f76c4ac2e1b..08b5db36b52 100644 --- a/docs/generated/postgres-schema/public.variables.md +++ b/docs/generated/postgres-schema/public.variables.md @@ -4,30 +4,30 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| id | varchar(36) | | false | | | | | key | varchar(50) | | false | | | | +| projectId | varchar(36) | | true | | [public.project](public.project.md) | | | type | varchar(50) | 'string'::character varying | false | | | | | value | text | | true | | | | -| id | varchar(36) | | false | | | | -| projectId | varchar(36) | | true | | [public.project](public.project.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_42f6c766f9f9d2edcc15bdd6e9b | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | | variables_id_not_null1 | n | NOT NULL id | | variables_key_not_null | n | NOT NULL key | +| variables_pkey | PRIMARY KEY | PRIMARY KEY (id) | | variables_type_not_null | n | NOT NULL type | | variables_value_max_len | CHECK | CHECK (((value IS NULL) OR (char_length(value) <= 1000))) | -| variables_pkey | PRIMARY KEY | PRIMARY KEY (id) | -| FK_42f6c766f9f9d2edcc15bdd6e9b | FOREIGN KEY | FOREIGN KEY ("projectId") REFERENCES project(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | +| variables_global_key_unique | CREATE UNIQUE INDEX variables_global_key_unique ON public.variables USING btree (key) WHERE ("projectId" IS NULL) | | variables_pkey | CREATE UNIQUE INDEX variables_pkey ON public.variables USING btree (id) | | variables_project_key_unique | CREATE UNIQUE INDEX variables_project_key_unique ON public.variables USING btree ("projectId", key) WHERE ("projectId" IS NOT NULL) | -| variables_global_key_unique | CREATE UNIQUE INDEX variables_global_key_unique ON public.variables USING btree (key) WHERE ("projectId" IS NULL) | ## Relations @@ -37,22 +37,22 @@ erDiagram "public.variables" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE" "public.variables" { + varchar_36_ id varchar_50_ key + varchar_36_ projectId FK varchar_50_ type text value - varchar_36_ id - varchar_36_ projectId FK } "public.project" { + timestamp_3__with_time_zone createdAt + uuid creatorId FK + json customTelemetryTags + varchar_512_ description + json icon varchar_36_ id varchar_255_ name varchar_36_ type - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json icon - varchar_512_ description - uuid creatorId FK - json customTelemetryTags } ``` diff --git a/docs/generated/postgres-schema/public.webhook_entity.md b/docs/generated/postgres-schema/public.webhook_entity.md index 461d186973c..eb0f2a6087b 100644 --- a/docs/generated/postgres-schema/public.webhook_entity.md +++ b/docs/generated/postgres-schema/public.webhook_entity.md @@ -4,23 +4,23 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| webhookPath | varchar | | false | | | | | method | varchar | | false | | | | | node | varchar | | false | | | | -| webhookId | varchar | | true | | | | | pathLength | integer | | true | | | | +| webhookId | varchar | | true | | | | +| webhookPath | varchar | | false | | | | | workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| PK_b21ace2e13596ccd87dc9bf4ea6 | PRIMARY KEY | PRIMARY KEY ("webhookPath", method) | +| fk_webhook_entity_workflow_id | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | | webhook_entity_method_not_null | n | NOT NULL method | | webhook_entity_node_not_null | n | NOT NULL node | | webhook_entity_webhookPath_not_null | n | NOT NULL "webhookPath" | | webhook_entity_workflowId_not_null1 | n | NOT NULL "workflowId" | -| PK_b21ace2e13596ccd87dc9bf4ea6 | PRIMARY KEY | PRIMARY KEY ("webhookPath", method) | -| fk_webhook_entity_workflow_id | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | ## Indexes @@ -37,34 +37,34 @@ erDiagram "public.webhook_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.webhook_entity" { - varchar webhookPath varchar method varchar node - varchar webhookId integer pathLength + varchar webhookId + varchar webhookPath varchar_36_ workflowId FK } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.workflow_builder_session.md b/docs/generated/postgres-schema/public.workflow_builder_session.md index 0fb775be5c0..5952dc14580 100644 --- a/docs/generated/postgres-schema/public.workflow_builder_session.md +++ b/docs/generated/postgres-schema/public.workflow_builder_session.md @@ -4,30 +4,30 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| activeVersionCardId | varchar(255) | | true | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | id | uuid | | false | | | | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| userId | uuid | | false | | [public.user](public.user.md) | | | messages | json | '[]'::json | false | | | | | previousSummary | text | | true | | | Summary of prior conversation from compaction (/compact or auto-compact) | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| activeVersionCardId | varchar(255) | | true | | | | | resumeAfterRestoreMessageId | varchar(255) | | true | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| userId | uuid | | false | | [public.user](public.user.md) | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_00290cdeee4d4d7db84709be936 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | +| FK_7983c618db48f47bf5a4cc1e1e4 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_e69ef0d385986e273423b0e8695 | PRIMARY KEY | PRIMARY KEY (id) | +| UQ_ec2aa73632932d485a1d5192ce1 | UNIQUE | UNIQUE ("workflowId", "userId") | | workflow_builder_session_createdAt_not_null | n | NOT NULL "createdAt" | | workflow_builder_session_id_not_null | n | NOT NULL id | | workflow_builder_session_messages_not_null | n | NOT NULL messages | | workflow_builder_session_updatedAt_not_null | n | NOT NULL "updatedAt" | | workflow_builder_session_userId_not_null | n | NOT NULL "userId" | | workflow_builder_session_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_00290cdeee4d4d7db84709be936 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE CASCADE | -| FK_7983c618db48f47bf5a4cc1e1e4 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| PK_e69ef0d385986e273423b0e8695 | PRIMARY KEY | PRIMARY KEY (id) | -| UQ_ec2aa73632932d485a1d5192ce1 | UNIQUE | UNIQUE ("workflowId", "userId") | ## Indexes @@ -41,58 +41,58 @@ ```mermaid erDiagram -"public.workflow_builder_session" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_builder_session" }o--|| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE CASCADE" +"public.workflow_builder_session" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_builder_session" { + varchar_255_ activeVersionCardId + timestamp_3__with_time_zone createdAt uuid id - varchar_36_ workflowId FK - uuid userId FK json messages text previousSummary - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ activeVersionCardId varchar_255_ resumeAfterRestoreMessageId -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId + uuid userId FK + varchar_36_ workflowId FK } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.workflow_dependency.md b/docs/generated/postgres-schema/public.workflow_dependency.md index 3ed65448a8c..525c5b8e358 100644 --- a/docs/generated/postgres-schema/public.workflow_dependency.md +++ b/docs/generated/postgres-schema/public.workflow_dependency.md @@ -4,20 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| dependencyInfo | json | | true | | | Additional info about the dependency, interpreted based on type | +| dependencyKey | varchar(255) | | false | | | ID or name of the dependency | +| dependencyType | varchar(32) | | false | | | Type of dependency: "credential", "nodeType", "webhookPath", or "workflowCall" | | id | integer | | false | | | | +| indexVersionId | smallint | 1 | false | | | Version of the index structure | +| publishedVersionId | varchar(36) | | true | | | | | workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | | workflowVersionId | integer | | false | | | Version of the workflow | -| dependencyType | varchar(32) | | false | | | Type of dependency: "credential", "nodeType", "webhookPath", or "workflowCall" | -| dependencyKey | varchar(255) | | false | | | ID or name of the dependency | -| dependencyInfo | json | | true | | | Additional info about the dependency, interpreted based on type | -| indexVersionId | smallint | 1 | false | | | Version of the index structure | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| publishedVersionId | varchar(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_a4ff2d9b9628ea988fa9e7d0bf8 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_52325e34cd7a2f0f67b0f3cad65 | PRIMARY KEY | PRIMARY KEY (id) | | workflow_dependency_createdAt_not_null | n | NOT NULL "createdAt" | | workflow_dependency_dependencyKey_not_null | n | NOT NULL "dependencyKey" | | workflow_dependency_dependencyType_not_null | n | NOT NULL "dependencyType" | @@ -25,18 +27,16 @@ | workflow_dependency_indexVersionId_not_null | n | NOT NULL "indexVersionId" | | workflow_dependency_workflowId_not_null | n | NOT NULL "workflowId" | | workflow_dependency_workflowVersionId_not_null | n | NOT NULL "workflowVersionId" | -| FK_a4ff2d9b9628ea988fa9e7d0bf8 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| PK_52325e34cd7a2f0f67b0f3cad65 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_52325e34cd7a2f0f67b0f3cad65 | CREATE UNIQUE INDEX "PK_52325e34cd7a2f0f67b0f3cad65" ON public.workflow_dependency USING btree (id) | | IDX_a4ff2d9b9628ea988fa9e7d0bf | CREATE INDEX "IDX_a4ff2d9b9628ea988fa9e7d0bf" ON public.workflow_dependency USING btree ("workflowId") | -| IDX_e7fe1cfda990c14a445937d0b9 | CREATE INDEX "IDX_e7fe1cfda990c14a445937d0b9" ON public.workflow_dependency USING btree ("dependencyType") | | IDX_e48a201071ab85d9d09119d640 | CREATE INDEX "IDX_e48a201071ab85d9d09119d640" ON public.workflow_dependency USING btree ("dependencyKey") | +| IDX_e7fe1cfda990c14a445937d0b9 | CREATE INDEX "IDX_e7fe1cfda990c14a445937d0b9" ON public.workflow_dependency USING btree ("dependencyType") | | IDX_workflow_dependency_publishedVersionId | CREATE INDEX "IDX_workflow_dependency_publishedVersionId" ON public.workflow_dependency USING btree ("publishedVersionId") | +| PK_52325e34cd7a2f0f67b0f3cad65 | CREATE UNIQUE INDEX "PK_52325e34cd7a2f0f67b0f3cad65" ON public.workflow_dependency USING btree (id) | ## Relations @@ -46,37 +46,37 @@ erDiagram "public.workflow_dependency" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_dependency" { + timestamp_3__with_time_zone createdAt + json dependencyInfo + varchar_255_ dependencyKey + varchar_32_ dependencyType integer id + smallint indexVersionId + varchar_36_ publishedVersionId varchar_36_ workflowId FK integer workflowVersionId - varchar_32_ dependencyType - varchar_255_ dependencyKey - json dependencyInfo - smallint indexVersionId - timestamp_3__with_time_zone createdAt - varchar_36_ publishedVersionId } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.workflow_entity.md b/docs/generated/postgres-schema/public.workflow_entity.md index e873bbf0414..2cc74b0ba5f 100644 --- a/docs/generated/postgres-schema/public.workflow_entity.md +++ b/docs/generated/postgres-schema/public.workflow_entity.md @@ -4,31 +4,33 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| name | varchar(128) | | false | | | | | active | boolean | | false | | | | -| nodes | json | | false | | | | +| activeVersionId | varchar(36) | | true | | [public.workflow_history](public.workflow_history.md) | | | connections | json | | false | | | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| settings | json | | true | | | | -| staticData | json | | true | | | | -| pinData | json | | true | | | | -| versionId | character(36) | | false | | | | -| triggerCount | integer | 0 | false | | | | -| id | varchar(36) | | false | [public.execution_entity](public.execution_entity.md) [public.webhook_entity](public.webhook_entity.md) [public.workflows_tags](public.workflows_tags.md) [public.workflow_history](public.workflow_history.md) [public.shared_workflow](public.shared_workflow.md) [public.processed_data](public.processed_data.md) [public.insights_metadata](public.insights_metadata.md) [public.test_run](public.test_run.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.chat_hub_messages](public.chat_hub_messages.md) [public.workflow_dependency](public.workflow_dependency.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.workflow_published_version](public.workflow_published_version.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) [public.evaluation_config](public.evaluation_config.md) [public.evaluation_collection](public.evaluation_collection.md) | | | -| meta | json | | true | | | | -| parentFolderId | varchar(36) | NULL::character varying | true | | [public.folder](public.folder.md) | | -| isArchived | boolean | false | false | | | | -| versionCounter | integer | 1 | false | | | | | description | text | | true | | | | -| activeVersionId | varchar(36) | | true | | [public.workflow_history](public.workflow_history.md) | | +| id | varchar(36) | | false | [public.ai_builder_temporary_workflow](public.ai_builder_temporary_workflow.md) [public.chat_hub_messages](public.chat_hub_messages.md) [public.chat_hub_sessions](public.chat_hub_sessions.md) [public.evaluation_collection](public.evaluation_collection.md) [public.evaluation_config](public.evaluation_config.md) [public.execution_entity](public.execution_entity.md) [public.insights_metadata](public.insights_metadata.md) [public.processed_data](public.processed_data.md) [public.shared_workflow](public.shared_workflow.md) [public.test_run](public.test_run.md) [public.webhook_entity](public.webhook_entity.md) [public.workflow_builder_session](public.workflow_builder_session.md) [public.workflow_dependency](public.workflow_dependency.md) [public.workflow_history](public.workflow_history.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.workflow_published_version](public.workflow_published_version.md) [public.workflows_tags](public.workflows_tags.md) | | | +| isArchived | boolean | false | false | | | | +| meta | json | | true | | | | +| name | varchar(128) | | false | | | | | nodeGroups | json | '[]'::json | false | | | | +| nodes | json | | false | | | | +| parentFolderId | varchar(36) | NULL::character varying | true | | [public.folder](public.folder.md) | | +| pinData | json | | true | | | | +| settings | json | | true | | | | | sourceWorkflowId | varchar | | true | | | | +| staticData | json | | true | | | | +| triggerCount | integer | 0 | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| versionCounter | integer | 1 | false | | | | +| versionId | character(36) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_08d6c67b7f722b0039d9d5ed620 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES workflow_history("versionId") ON DELETE RESTRICT | +| fk_workflow_parent_folder | FOREIGN KEY | FOREIGN KEY ("parentFolderId") REFERENCES folder(id) ON DELETE CASCADE | | workflow_entity_active_not_null | n | NOT NULL active | | workflow_entity_connections_not_null | n | NOT NULL connections | | workflow_entity_createdAt_not_null | n | NOT NULL "createdAt" | @@ -37,22 +39,20 @@ | workflow_entity_name_not_null | n | NOT NULL name | | workflow_entity_nodeGroups_not_null | n | NOT NULL "nodeGroups" | | workflow_entity_nodes_not_null | n | NOT NULL nodes | +| workflow_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) | | workflow_entity_triggerCount_not_null | n | NOT NULL "triggerCount" | | workflow_entity_updatedAt_not_null | n | NOT NULL "updatedAt" | | workflow_entity_versionCounter_not_null | n | NOT NULL "versionCounter" | | workflow_entity_versionId_not_null | n | NOT NULL "versionId" | -| workflow_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) | -| FK_08d6c67b7f722b0039d9d5ed620 | FOREIGN KEY | FOREIGN KEY ("activeVersionId") REFERENCES workflow_history("versionId") ON DELETE RESTRICT | -| fk_workflow_parent_folder | FOREIGN KEY | FOREIGN KEY ("parentFolderId") REFERENCES folder(id) ON DELETE CASCADE | ## Indexes | Name | Definition | | ---- | ---------- | -| pk_workflow_entity_id | CREATE UNIQUE INDEX pk_workflow_entity_id ON public.workflow_entity USING btree (id) | -| workflow_entity_pkey | CREATE UNIQUE INDEX workflow_entity_pkey ON public.workflow_entity USING btree (id) | | IDX_workflow_entity_name | CREATE INDEX "IDX_workflow_entity_name" ON public.workflow_entity USING btree (name) | | IDX_workflow_entity_sourceWorkflowId | CREATE INDEX "IDX_workflow_entity_sourceWorkflowId" ON public.workflow_entity USING btree ("sourceWorkflowId") WHERE ("sourceWorkflowId" IS NOT NULL) | +| pk_workflow_entity_id | CREATE UNIQUE INDEX pk_workflow_entity_id ON public.workflow_entity USING btree (id) | +| workflow_entity_pkey | CREATE UNIQUE INDEX workflow_entity_pkey ON public.workflow_entity USING btree (id) | ## Triggers @@ -65,238 +65,238 @@ ```mermaid erDiagram -"public.execution_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.webhook_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflows_tags" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflow_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.processed_data" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" -"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.chat_hub_sessions" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.workflow_entity" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" +"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.chat_hub_messages" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.chat_hub_sessions" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.evaluation_collection" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.evaluation_config" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.execution_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.insights_metadata" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE SET NULL" +"public.processed_data" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.shared_workflow" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.test_run" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.webhook_entity" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_builder_session" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_dependency" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflow_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_publish_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_published_version" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT" -"public.workflow_builder_session" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.ai_builder_temporary_workflow" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.evaluation_config" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.evaluation_collection" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" +"public.workflows_tags" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_entity" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE CASCADE" -"public.workflow_entity" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId +} +"public.workflow_history" { + varchar_255_ authors + boolean autosaved + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_128_ name + json nodeGroups + json nodes + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId + varchar_36_ workflowId FK +} +"public.ai_builder_temporary_workflow" { + timestamp_3__with_time_zone createdAt + uuid threadId FK + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_messages" { + uuid agentId FK + json attachments + text content + timestamp_3__with_time_zone createdAt + integer executionId FK + uuid id + varchar_256_ model + varchar_128_ name + uuid previousMessageId FK + varchar_16_ provider + uuid retryOfMessageId FK + uuid revisionOfMessageId FK + uuid sessionId FK + varchar_16_ status + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.chat_hub_sessions" { + uuid agentId FK + varchar_128_ agentName + timestamp_3__with_time_zone createdAt + varchar_36_ credentialId FK + uuid id + timestamp_3__with_time_zone lastMessageAt + varchar_256_ model + uuid ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.evaluation_collection" { + timestamp_3__with_time_zone createdAt + uuid createdById FK + text description + varchar_36_ evaluationConfigId FK + varchar_36_ id + json insightsCache + varchar_128_ name + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.evaluation_config" { + timestamp_3__with_time_zone createdAt + json datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id + varchar_64_ invalidReason + json metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.execution_entity" { - integer id + timestamp_3__with_time_zone createdAt + varchar_255_ deduplicationKey + timestamp_3__with_time_zone deletedAt boolean finished + integer id + bigint jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId timestamp_3__with_time_zone startedAt - timestamp_3__with_time_zone stoppedAt - timestamp_3__with_time_zone waitTill varchar status - varchar_36_ workflowId FK - timestamp_3__with_time_zone deletedAt - timestamp_3__with_time_zone createdAt + timestamp_3__with_time_zone stoppedAt varchar_2_ storedAt json tracingContext - varchar_255_ deduplicationKey - bigint jsonSizeBytes + timestamp_3__with_time_zone waitTill + varchar_36_ workflowId FK varchar_36_ workflowVersionId } -"public.webhook_entity" { - varchar webhookPath - varchar method - varchar node - varchar webhookId - integer pathLength - varchar_36_ workflowId FK -} -"public.workflows_tags" { - varchar_36_ workflowId FK - varchar_36_ tagId FK -} -"public.workflow_history" { - varchar_36_ versionId - varchar_36_ workflowId FK - varchar_255_ authors - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json nodes - json connections - varchar_128_ name - boolean autosaved - text description - json nodeGroups -} -"public.shared_workflow" { - varchar_36_ workflowId FK +"public.insights_metadata" { + integer metaId varchar_36_ projectId FK - text role - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt + varchar_255_ projectName + varchar_36_ workflowId FK + varchar_128_ workflowName } "public.processed_data" { - varchar_36_ workflowId FK varchar_255_ context timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt text value -} -"public.insights_metadata" { - integer metaId varchar_36_ workflowId FK +} +"public.shared_workflow" { + timestamp_3__with_time_zone createdAt varchar_36_ projectId FK - varchar_128_ workflowName - varchar_255_ projectName + text role + timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } "public.test_run" { - varchar_36_ id - varchar_36_ workflowId FK - varchar status + boolean cancelRequested + varchar_36_ collectionId FK + timestamp_3__with_time_zone completedAt + timestamp_3__with_time_zone createdAt varchar errorCode json errorDetails - timestamp_3__with_time_zone runAt - timestamp_3__with_time_zone completedAt - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId varchar_36_ evaluationConfigId FK jsonb evaluationConfigSnapshot - varchar_36_ collectionId FK -} -"public.chat_hub_sessions" { - uuid id - varchar_256_ title - uuid ownerId FK - timestamp_3__with_time_zone lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_256_ model - varchar_36_ workflowId FK - timestamp_3__with_time_zone createdAt + varchar_36_ id + json metrics + timestamp_3__with_time_zone runAt + varchar_255_ runningInstanceId + varchar status timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_128_ agentName - varchar_16_ type -} -"public.chat_hub_messages" { - uuid id - uuid sessionId FK - uuid previousMessageId FK - uuid revisionOfMessageId FK - uuid retryOfMessageId FK - varchar_16_ type - varchar_128_ name - text content - varchar_16_ provider - varchar_256_ model varchar_36_ workflowId FK - integer executionId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - uuid agentId FK - varchar_16_ status - json attachments + varchar_36_ workflowVersionId } -"public.workflow_dependency" { - integer id +"public.webhook_entity" { + varchar method + varchar node + integer pathLength + varchar webhookId + varchar webhookPath varchar_36_ workflowId FK - integer workflowVersionId - varchar_32_ dependencyType - varchar_255_ dependencyKey - json dependencyInfo - smallint indexVersionId - timestamp_3__with_time_zone createdAt - varchar_36_ publishedVersionId -} -"public.workflow_publish_history" { - integer id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - uuid userId FK - timestamp_3__with_time_zone createdAt -} -"public.workflow_published_version" { - varchar_36_ workflowId FK - varchar_36_ publishedVersionId FK - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt } "public.workflow_builder_session" { + varchar_255_ activeVersionCardId + timestamp_3__with_time_zone createdAt uuid id - varchar_36_ workflowId FK - uuid userId FK json messages text previousSummary - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - varchar_255_ activeVersionCardId varchar_255_ resumeAfterRestoreMessageId -} -"public.ai_builder_temporary_workflow" { - varchar_36_ workflowId FK - uuid threadId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt -} -"public.evaluation_config" { - varchar_36_ id + uuid userId FK varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - json datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - json metrics - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt } -"public.evaluation_collection" { - varchar_36_ id - varchar_128_ name - text description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - uuid createdById FK - json insightsCache +"public.workflow_dependency" { timestamp_3__with_time_zone createdAt + json dependencyInfo + varchar_255_ dependencyKey + varchar_32_ dependencyType + integer id + smallint indexVersionId + varchar_36_ publishedVersionId + varchar_36_ workflowId FK + integer workflowVersionId +} +"public.workflow_publish_history" { + timestamp_3__with_time_zone createdAt + varchar_36_ event + integer id + uuid userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK +} +"public.workflow_published_version" { + timestamp_3__with_time_zone createdAt + varchar_36_ publishedVersionId FK timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK +} +"public.workflows_tags" { + varchar_36_ tagId FK + varchar_36_ workflowId FK } "public.folder" { + timestamp_3__with_time_zone createdAt varchar_36_ id varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt } ``` diff --git a/docs/generated/postgres-schema/public.workflow_history.md b/docs/generated/postgres-schema/public.workflow_history.md index c27dd759bd2..e832f5883a1 100644 --- a/docs/generated/postgres-schema/public.workflow_history.md +++ b/docs/generated/postgres-schema/public.workflow_history.md @@ -4,22 +4,24 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| authors | varchar(255) | | false | | | | +| autosaved | boolean | false | false | | | | +| connections | json | | false | | | | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| description | text | | true | | | | +| name | varchar(128) | | true | | | | +| nodeGroups | json | '[]'::json | false | | | | +| nodes | json | | false | | | | +| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | versionId | varchar(36) | | false | [public.workflow_entity](public.workflow_entity.md) [public.workflow_publish_history](public.workflow_publish_history.md) [public.workflow_published_version](public.workflow_published_version.md) | | | | workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| authors | varchar(255) | | false | | | | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | -| nodes | json | | false | | | | -| connections | json | | false | | | | -| name | varchar(128) | | true | | | | -| autosaved | boolean | false | false | | | | -| description | text | | true | | | | -| nodeGroups | json | '[]'::json | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_1e31657f5fe46816c34be7c1b4b | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_b6572dd6173e4cd06fe79937b58 | PRIMARY KEY | PRIMARY KEY ("versionId") | | workflow_history_authors_not_null | n | NOT NULL authors | | workflow_history_autosaved_not_null | n | NOT NULL autosaved | | workflow_history_connections_not_null | n | NOT NULL connections | @@ -29,15 +31,13 @@ | workflow_history_updatedAt_not_null | n | NOT NULL "updatedAt" | | workflow_history_versionId_not_null | n | NOT NULL "versionId" | | workflow_history_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_1e31657f5fe46816c34be7c1b4b | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| PK_b6572dd6173e4cd06fe79937b58 | PRIMARY KEY | PRIMARY KEY ("versionId") | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_b6572dd6173e4cd06fe79937b58 | CREATE UNIQUE INDEX "PK_b6572dd6173e4cd06fe79937b58" ON public.workflow_history USING btree ("versionId") | | IDX_1e31657f5fe46816c34be7c1b4 | CREATE INDEX "IDX_1e31657f5fe46816c34be7c1b4" ON public.workflow_history USING btree ("workflowId") | +| PK_b6572dd6173e4cd06fe79937b58 | CREATE UNIQUE INDEX "PK_b6572dd6173e4cd06fe79937b58" ON public.workflow_history USING btree ("versionId") | ## Relations @@ -50,53 +50,53 @@ erDiagram "public.workflow_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_history" { + varchar_255_ authors + boolean autosaved + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_128_ name + json nodeGroups + json nodes + timestamp_3__with_time_zone updatedAt varchar_36_ versionId varchar_36_ workflowId FK - varchar_255_ authors - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json nodes - json connections - varchar_128_ name - boolean autosaved - text description - json nodeGroups } "public.workflow_entity" { - varchar_128_ name boolean active - json nodes + varchar_36_ activeVersionId FK json connections timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter text description - varchar_36_ activeVersionId FK + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } "public.workflow_publish_history" { - integer id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - uuid userId FK timestamp_3__with_time_zone createdAt + varchar_36_ event + integer id + uuid userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK } "public.workflow_published_version" { - varchar_36_ workflowId FK - varchar_36_ publishedVersionId FK timestamp_3__with_time_zone createdAt + varchar_36_ publishedVersionId FK timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId FK } ``` diff --git a/docs/generated/postgres-schema/public.workflow_publication_outbox.md b/docs/generated/postgres-schema/public.workflow_publication_outbox.md index cfe031cb6b6..ad7fa1c44f9 100644 --- a/docs/generated/postgres-schema/public.workflow_publication_outbox.md +++ b/docs/generated/postgres-schema/public.workflow_publication_outbox.md @@ -4,33 +4,33 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| errorMessage | text | | true | | | Error details for surfacing failed publications to the user. | | id | integer | | false | | | | -| workflowId | varchar(36) | | false | | | References workflow_entity.id. | | publishedVersionId | varchar(36) | | false | | | References workflow_history.versionId. | | status | varchar(20) | | false | | | | -| errorMessage | text | | true | | | Error details for surfacing failed publications to the user. | -| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | | References workflow_entity.id. | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_workflow_publication_outbox_status | CHECK | CHECK (((status)::text = ANY ((ARRAY['pending'::character varying, 'in_progress'::character varying, 'completed'::character varying, 'partial_success'::character varying, 'failed'::character varying])::text[]))) | +| PK_b3e2eeee36a4bd044d56468d311 | PRIMARY KEY | PRIMARY KEY (id) | | workflow_publication_outbox_createdAt_not_null | n | NOT NULL "createdAt" | | workflow_publication_outbox_id_not_null | n | NOT NULL id | | workflow_publication_outbox_publishedVersionId_not_null | n | NOT NULL "publishedVersionId" | | workflow_publication_outbox_status_not_null | n | NOT NULL status | | workflow_publication_outbox_updatedAt_not_null | n | NOT NULL "updatedAt" | | workflow_publication_outbox_workflowId_not_null | n | NOT NULL "workflowId" | -| PK_b3e2eeee36a4bd044d56468d311 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_b3e2eeee36a4bd044d56468d311 | CREATE UNIQUE INDEX "PK_b3e2eeee36a4bd044d56468d311" ON public.workflow_publication_outbox USING btree (id) | | IDX_workflow_publication_outbox_active_workflow_status | 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[])) | +| PK_b3e2eeee36a4bd044d56468d311 | CREATE UNIQUE INDEX "PK_b3e2eeee36a4bd044d56468d311" ON public.workflow_publication_outbox USING btree (id) | ## Relations @@ -39,13 +39,13 @@ erDiagram "public.workflow_publication_outbox" { + timestamp_3__with_time_zone createdAt + text errorMessage integer id - varchar_36_ workflowId varchar_36_ publishedVersionId varchar_20_ status - text errorMessage - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt + varchar_36_ workflowId } ``` diff --git a/docs/generated/postgres-schema/public.workflow_publish_history.md b/docs/generated/postgres-schema/public.workflow_publish_history.md index 42c42672096..2c4f0341c3b 100644 --- a/docs/generated/postgres-schema/public.workflow_publish_history.md +++ b/docs/generated/postgres-schema/public.workflow_publish_history.md @@ -4,102 +4,102 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | integer | | false | | | | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| versionId | varchar(36) | | true | | [public.workflow_history](public.workflow_history.md) | | -| event | varchar(36) | | false | | | Type of history record: activated (workflow is now active), deactivated (workflow is now inactive) | -| userId | uuid | | true | | [public.user](public.user.md) | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| event | varchar(36) | | false | | | Type of history record: activated (workflow is now active), deactivated (workflow is now inactive) | +| id | integer | | false | | | | +| userId | uuid | | true | | [public.user](public.user.md) | | +| versionId | varchar(36) | | true | | [public.workflow_history](public.workflow_history.md) | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | CHK_workflow_publish_history_event | CHECK | CHECK (((event)::text = ANY ((ARRAY['activated'::character varying, 'deactivated'::character varying])::text[]))) | +| FK_6eab5bd9eedabe9c54bd879fc40 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE SET NULL | +| FK_b4cfbc7556d07f36ca177f5e473 | FOREIGN KEY | FOREIGN KEY ("versionId") REFERENCES workflow_history("versionId") ON DELETE SET NULL | +| FK_c01316f8c2d7101ec4fa9809267 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| PK_c788f7caf88e91e365c97d6d04a | PRIMARY KEY | PRIMARY KEY (id) | | workflow_publish_history_createdAt_not_null | n | NOT NULL "createdAt" | | workflow_publish_history_event_not_null | n | NOT NULL event | | workflow_publish_history_id_not_null | n | NOT NULL id | | workflow_publish_history_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_6eab5bd9eedabe9c54bd879fc40 | FOREIGN KEY | FOREIGN KEY ("userId") REFERENCES "user"(id) ON DELETE SET NULL | -| FK_c01316f8c2d7101ec4fa9809267 | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| FK_b4cfbc7556d07f36ca177f5e473 | FOREIGN KEY | FOREIGN KEY ("versionId") REFERENCES workflow_history("versionId") ON DELETE SET NULL | -| PK_c788f7caf88e91e365c97d6d04a | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| PK_c788f7caf88e91e365c97d6d04a | CREATE UNIQUE INDEX "PK_c788f7caf88e91e365c97d6d04a" ON public.workflow_publish_history USING btree (id) | | IDX_070b5de842ece9ccdda0d9738b | CREATE INDEX "IDX_070b5de842ece9ccdda0d9738b" ON public.workflow_publish_history USING btree ("workflowId", "versionId") | +| PK_c788f7caf88e91e365c97d6d04a | CREATE UNIQUE INDEX "PK_c788f7caf88e91e365c97d6d04a" ON public.workflow_publish_history USING btree (id) | ## Relations ```mermaid erDiagram -"public.workflow_publish_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" -"public.workflow_publish_history" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE SET NULL" "public.workflow_publish_history" }o--o| "public.user" : "FOREIGN KEY (#quot;userId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL" +"public.workflow_publish_history" }o--o| "public.workflow_history" : "FOREIGN KEY (#quot;versionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE SET NULL" +"public.workflow_publish_history" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflow_publish_history" { - integer id - varchar_36_ workflowId FK - varchar_36_ versionId FK + timestamp_3__with_time_zone createdAt varchar_36_ event + integer id uuid userId FK - timestamp_3__with_time_zone createdAt -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId -} -"public.workflow_history" { - varchar_36_ versionId + varchar_36_ versionId FK varchar_36_ workflowId FK - varchar_255_ authors - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json nodes - json connections - varchar_128_ name - boolean autosaved - text description - json nodeGroups } "public.user" { - uuid id + timestamp_3__with_time_zone createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + uuid id + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + text mfaRecoveryCodes + text mfaSecret varchar_255_ password json personalizationAnswers - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - boolean disabled - boolean mfaEnabled - text mfaSecret - text mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + json settings + timestamp_3__with_time_zone updatedAt +} +"public.workflow_history" { + varchar_255_ authors + boolean autosaved + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_128_ name + json nodeGroups + json nodes + timestamp_3__with_time_zone updatedAt + varchar_36_ versionId + varchar_36_ workflowId FK +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.workflow_published_version.md b/docs/generated/postgres-schema/public.workflow_published_version.md index 9fb541f6110..63cd6bad5d6 100644 --- a/docs/generated/postgres-schema/public.workflow_published_version.md +++ b/docs/generated/postgres-schema/public.workflow_published_version.md @@ -4,22 +4,22 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | -| publishedVersionId | varchar(36) | | false | | [public.workflow_history](public.workflow_history.md) | | | createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| publishedVersionId | varchar(36) | | false | | [public.workflow_history](public.workflow_history.md) | | | updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | | | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| FK_5c76fb7ee939fe2530374d3f75a | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE RESTRICT | +| FK_df3428a541b802d6a63ac56e330 | FOREIGN KEY | FOREIGN KEY ("publishedVersionId") REFERENCES workflow_history("versionId") ON DELETE RESTRICT | +| PK_5c76fb7ee939fe2530374d3f75a | PRIMARY KEY | PRIMARY KEY ("workflowId") | | workflow_published_version_createdAt_not_null | n | NOT NULL "createdAt" | | workflow_published_version_publishedVersionId_not_null | n | NOT NULL "publishedVersionId" | | workflow_published_version_updatedAt_not_null | n | NOT NULL "updatedAt" | | workflow_published_version_workflowId_not_null | n | NOT NULL "workflowId" | -| FK_5c76fb7ee939fe2530374d3f75a | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE RESTRICT | -| FK_df3428a541b802d6a63ac56e330 | FOREIGN KEY | FOREIGN KEY ("publishedVersionId") REFERENCES workflow_history("versionId") ON DELETE RESTRICT | -| PK_5c76fb7ee939fe2530374d3f75a | PRIMARY KEY | PRIMARY KEY ("workflowId") | ## Indexes @@ -32,49 +32,49 @@ ```mermaid erDiagram -"public.workflow_published_version" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT" "public.workflow_published_version" }o--|| "public.workflow_history" : "FOREIGN KEY (#quot;publishedVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT" +"public.workflow_published_version" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT" "public.workflow_published_version" { - varchar_36_ workflowId FK + timestamp_3__with_time_zone createdAt varchar_36_ publishedVersionId FK - timestamp_3__with_time_zone createdAt timestamp_3__with_time_zone updatedAt -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId + varchar_36_ workflowId FK } "public.workflow_history" { + varchar_255_ authors + boolean autosaved + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_128_ name + json nodeGroups + json nodes + timestamp_3__with_time_zone updatedAt varchar_36_ versionId varchar_36_ workflowId FK - varchar_255_ authors - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json nodes +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK json connections - varchar_128_ name - boolean autosaved + timestamp_3__with_time_zone createdAt text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/public.workflow_statistics.md b/docs/generated/postgres-schema/public.workflow_statistics.md index a22e0db9de0..19687528fe6 100644 --- a/docs/generated/postgres-schema/public.workflow_statistics.md +++ b/docs/generated/postgres-schema/public.workflow_statistics.md @@ -5,11 +5,11 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | count | bigint | 0 | true | | | | +| id | integer | nextval('workflow_statistics_id_seq'::regclass) | false | | | | | latestEvent | timestamp(3) with time zone | | true | | | | | name | varchar(128) | | false | | | | -| workflowId | varchar(36) | | false | | | | | rootCount | bigint | 0 | true | | | | -| id | integer | nextval('workflow_statistics_id_seq'::regclass) | false | | | | +| workflowId | varchar(36) | | false | | | | | workflowName | varchar(128) | | true | | | | ## Constraints @@ -18,15 +18,15 @@ | ---- | ---- | ---------- | | workflow_statistics_id_not_null | n | NOT NULL id | | workflow_statistics_name_not_null | n | NOT NULL name | -| workflow_statistics_workflowId_not_null1 | n | NOT NULL "workflowId" | | workflow_statistics_pkey | PRIMARY KEY | PRIMARY KEY (id) | +| workflow_statistics_workflowId_not_null1 | n | NOT NULL "workflowId" | ## Indexes | Name | Definition | | ---- | ---------- | -| workflow_statistics_pkey | CREATE UNIQUE INDEX workflow_statistics_pkey ON public.workflow_statistics USING btree (id) | | IDX_workflow_statistics_workflow_name | CREATE UNIQUE INDEX "IDX_workflow_statistics_workflow_name" ON public.workflow_statistics USING btree ("workflowId", name) | +| workflow_statistics_pkey | CREATE UNIQUE INDEX workflow_statistics_pkey ON public.workflow_statistics USING btree (id) | ## Relations @@ -36,11 +36,11 @@ erDiagram "public.workflow_statistics" { bigint count + integer id timestamp_3__with_time_zone latestEvent varchar_128_ name - varchar_36_ workflowId bigint rootCount - integer id + varchar_36_ workflowId varchar_128_ workflowName } ``` diff --git a/docs/generated/postgres-schema/public.workflows_tags.md b/docs/generated/postgres-schema/public.workflows_tags.md index a94a1e77e3a..e5b96380794 100644 --- a/docs/generated/postgres-schema/public.workflows_tags.md +++ b/docs/generated/postgres-schema/public.workflows_tags.md @@ -4,65 +4,65 @@ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | | tagId | varchar(36) | | false | | [public.tag_entity](public.tag_entity.md) | | +| workflowId | varchar(36) | | false | | [public.workflow_entity](public.workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| fk_workflows_tags_tag_id | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE | +| fk_workflows_tags_workflow_id | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | +| pk_workflows_tags | PRIMARY KEY | PRIMARY KEY ("workflowId", "tagId") | | workflows_tags_tagId_not_null1 | n | NOT NULL "tagId" | | workflows_tags_workflowId_not_null1 | n | NOT NULL "workflowId" | -| fk_workflows_tags_workflow_id | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE CASCADE | -| fk_workflows_tags_tag_id | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE | -| pk_workflows_tags | PRIMARY KEY | PRIMARY KEY ("workflowId", "tagId") | ## Indexes | Name | Definition | | ---- | ---------- | -| pk_workflows_tags | CREATE UNIQUE INDEX pk_workflows_tags ON public.workflows_tags USING btree ("workflowId", "tagId") | | idx_workflows_tags_workflow_id | CREATE INDEX idx_workflows_tags_workflow_id ON public.workflows_tags USING btree ("workflowId") | +| pk_workflows_tags | CREATE UNIQUE INDEX pk_workflows_tags ON public.workflows_tags USING btree ("workflowId", "tagId") | ## Relations ```mermaid erDiagram -"public.workflows_tags" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflows_tags" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE" +"public.workflows_tags" }o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE CASCADE" "public.workflows_tags" { - varchar_36_ workflowId FK varchar_36_ tagId FK -} -"public.workflow_entity" { - varchar_128_ name - boolean active - json nodes - json connections - timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt - json settings - json staticData - json pinData - character_36_ versionId - integer triggerCount - varchar_36_ id - json meta - varchar_36_ parentFolderId FK - boolean isArchived - integer versionCounter - text description - varchar_36_ activeVersionId FK - json nodeGroups - varchar sourceWorkflowId + varchar_36_ workflowId FK } "public.tag_entity" { - varchar_24_ name timestamp_3__with_time_zone createdAt - timestamp_3__with_time_zone updatedAt varchar_36_ id + varchar_24_ name + timestamp_3__with_time_zone updatedAt +} +"public.workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + json connections + timestamp_3__with_time_zone createdAt + text description + varchar_36_ id + boolean isArchived + json meta + varchar_128_ name + json nodeGroups + json nodes + varchar_36_ parentFolderId FK + json pinData + json settings + varchar sourceWorkflowId + json staticData + integer triggerCount + timestamp_3__with_time_zone updatedAt + integer versionCounter + character_36_ versionId } ``` diff --git a/docs/generated/postgres-schema/schema.json b/docs/generated/postgres-schema/schema.json deleted file mode 100644 index d8054963f5b..00000000000 --- a/docs/generated/postgres-schema/schema.json +++ /dev/null @@ -1,19049 +0,0 @@ -{ - "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" - } - } - } -} diff --git a/docs/generated/sqlite-schema/README.md b/docs/generated/sqlite-schema/README.md index 85b3c71eaf3..7c61c69faed 100644 --- a/docs/generated/sqlite-schema/README.md +++ b/docs/generated/sqlite-schema/README.md @@ -8,160 +8,161 @@ Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand. | Name | Columns | Comment | Type | | ---- | ------- | ------- | ---- | -| [settings](settings.md) | 3 | | table | -| [installed_packages](installed_packages.md) | 6 | | table | -| [installed_nodes](installed_nodes.md) | 4 | | table | -| [event_destinations](event_destinations.md) | 4 | | table | -| [auth_identity](auth_identity.md) | 5 | | table | -| [auth_provider_sync_history](auth_provider_sync_history.md) | 11 | | table | -| [tag_entity](tag_entity.md) | 4 | | table | -| [workflows_tags](workflows_tags.md) | 2 | | table | -| [webhook_entity](webhook_entity.md) | 6 | | table | -| [execution_data](execution_data.md) | 4 | | table | -| [shared_credentials](shared_credentials.md) | 5 | | table | -| [shared_workflow](shared_workflow.md) | 5 | | table | -| [execution_metadata](execution_metadata.md) | 4 | | table | -| [invalid_auth_token](invalid_auth_token.md) | 2 | | table | -| [execution_annotations](execution_annotations.md) | 6 | | table | -| [annotation_tag_entity](annotation_tag_entity.md) | 4 | | table | -| [execution_annotation_tags](execution_annotation_tags.md) | 2 | | table | -| [processed_data](processed_data.md) | 5 | | table | -| [folder](folder.md) | 6 | | table | -| [folder_tag](folder_tag.md) | 2 | | table | -| [insights_metadata](insights_metadata.md) | 5 | | table | -| [scope](scope.md) | 3 | | table | -| [role_scope](role_scope.md) | 2 | | table | -| [user](user.md) | 15 | | table | -| [test_case_execution](test_case_execution.md) | 16 | | table | -| [project_relation](project_relation.md) | 5 | | table | -| [data_table](data_table.md) | 5 | | table | -| [data_table_column](data_table_column.md) | 7 | | table | -| [role](role.md) | 7 | | table | -| [variables](variables.md) | 5 | | table | -| [insights_raw](insights_raw.md) | 5 | | table | -| [insights_by_period](insights_by_period.md) | 6 | | table | -| [oauth_clients](oauth_clients.md) | 9 | | table | -| [oauth_access_tokens](oauth_access_tokens.md) | 3 | | table | -| [oauth_user_consents](oauth_user_consents.md) | 4 | | table | -| [dynamic_credential_resolver](dynamic_credential_resolver.md) | 6 | | table | -| [credentials_entity](credentials_entity.md) | 11 | | table | -| [chat_hub_messages](chat_hub_messages.md) | 17 | | table | -| [workflow_statistics](workflow_statistics.md) | 7 | | table | -| [dynamic_credential_user_entry](dynamic_credential_user_entry.md) | 6 | | table | -| [workflow_dependency](workflow_dependency.md) | 9 | | table | -| [secrets_provider_connection](secrets_provider_connection.md) | 7 | | table | -| [dynamic_credential_entry](dynamic_credential_entry.md) | 6 | | table | -| [chat_hub_tools](chat_hub_tools.md) | 9 | | table | -| [chat_hub_session_tools](chat_hub_session_tools.md) | 2 | | table | -| [chat_hub_agent_tools](chat_hub_agent_tools.md) | 2 | | table | -| [chat_hub_agents](chat_hub_agents.md) | 13 | | table | -| [project_secrets_provider_access](project_secrets_provider_access.md) | 5 | | table | -| [workflow_published_version](workflow_published_version.md) | 4 | | table | -| [chat_hub_sessions](chat_hub_sessions.md) | 13 | | table | -| [role_mapping_rule](role_mapping_rule.md) | 7 | | table | -| [role_mapping_rule_project](role_mapping_rule_project.md) | 2 | | table | -| [credential_dependency](credential_dependency.md) | 5 | | table | -| [workflow_builder_session](workflow_builder_session.md) | 9 | | table | -| [instance_version_history](instance_version_history.md) | 5 | | table | -| [instance_ai_messages](instance_ai_messages.md) | 8 | | table | -| [instance_ai_resources](instance_ai_resources.md) | 5 | | table | -| [instance_ai_observational_memory](instance_ai_observational_memory.md) | 32 | | table | -| [instance_ai_workflow_snapshots](instance_ai_workflow_snapshots.md) | 7 | | table | -| [instance_ai_iteration_logs](instance_ai_iteration_logs.md) | 6 | | table | -| [token_exchange_jti](token_exchange_jti.md) | 3 | | table | -| [workflow_publish_history](workflow_publish_history.md) | 6 | | table | -| [trusted_key_source](trusted_key_source.md) | 8 | | table | -| [trusted_key](trusted_key.md) | 4 | | table | -| [user_favorites](user_favorites.md) | 4 | | table | -| [deployment_key](deployment_key.md) | 7 | | table | -| [ai_builder_temporary_workflow](ai_builder_temporary_workflow.md) | 4 | | table | -| [execution_entity](execution_entity.md) | 17 | | table | -| [evaluation_config](evaluation_config.md) | 12 | | table | -| [evaluation_collection](evaluation_collection.md) | 9 | | table | -| [test_run](test_run.md) | 16 | | table | +| [agent_chat_subscriptions](agent_chat_subscriptions.md) | 6 | | table | | [agent_checkpoints](agent_checkpoints.md) | 6 | | table | -| [agents_resources](agents_resources.md) | 4 | | table | -| [agents_threads](agents_threads.md) | 6 | | table | -| [agents_messages](agents_messages.md) | 8 | | table | | [agent_execution](agent_execution.md) | 20 | | table | -| [workflow_history](workflow_history.md) | 11 | | table | -| [instance_ai_run_snapshots](instance_ai_run_snapshots.md) | 11 | | table | -| [agents_observations](agents_observations.md) | 11 | | table | -| [agents_observation_cursors](agents_observation_cursors.md) | 6 | | table | -| [agents_observation_locks](agents_observation_locks.md) | 7 | | table | +| [agent_execution_threads](agent_execution_threads.md) | 17 | | table | +| [agent_files](agent_files.md) | 8 | | table | +| [agent_history](agent_history.md) | 9 | | table | +| [agent_task_definition](agent_task_definition.md) | 7 | | table | +| [agent_task_run_lock](agent_task_run_lock.md) | 6 | | table | +| [agent_task_snapshot](agent_task_snapshot.md) | 8 | | table | +| [agents](agents.md) | 12 | | table | | [agents_memory_entries](agents_memory_entries.md) | 13 | | table | +| [agents_memory_entry_cursors](agents_memory_entry_cursors.md) | 6 | | table | | [agents_memory_entry_locks](agents_memory_entry_locks.md) | 6 | | table | | [agents_memory_entry_sources](agents_memory_entry_sources.md) | 9 | | table | -| [agents_memory_entry_cursors](agents_memory_entry_cursors.md) | 6 | | table | -| [agent_history](agent_history.md) | 9 | | table | -| [agents](agents.md) | 12 | | table | -| [instance_ai_observations](instance_ai_observations.md) | 10 | | table | +| [agents_messages](agents_messages.md) | 8 | | table | +| [agents_observation_cursors](agents_observation_cursors.md) | 6 | | table | +| [agents_observation_locks](agents_observation_locks.md) | 7 | | table | +| [agents_observations](agents_observations.md) | 11 | | table | +| [agents_resources](agents_resources.md) | 4 | | table | +| [agents_threads](agents_threads.md) | 6 | | table | +| [ai_builder_temporary_workflow](ai_builder_temporary_workflow.md) | 4 | | table | +| [annotation_tag_entity](annotation_tag_entity.md) | 4 | | table | +| [auth_identity](auth_identity.md) | 5 | | table | +| [auth_provider_sync_history](auth_provider_sync_history.md) | 11 | | table | +| [binary_data](binary_data.md) | 9 | | table | +| [chat_hub_agent_tools](chat_hub_agent_tools.md) | 2 | | table | +| [chat_hub_agents](chat_hub_agents.md) | 13 | | table | +| [chat_hub_messages](chat_hub_messages.md) | 17 | | table | +| [chat_hub_session_tools](chat_hub_session_tools.md) | 2 | | table | +| [chat_hub_sessions](chat_hub_sessions.md) | 13 | | table | +| [chat_hub_tools](chat_hub_tools.md) | 9 | | table | +| [credential_dependency](credential_dependency.md) | 5 | | table | +| [credentials_entity](credentials_entity.md) | 11 | | table | +| [data_table](data_table.md) | 5 | | table | +| [data_table_column](data_table_column.md) | 7 | | table | +| [deployment_key](deployment_key.md) | 7 | | table | +| [dynamic_credential_entry](dynamic_credential_entry.md) | 6 | | table | +| [dynamic_credential_resolver](dynamic_credential_resolver.md) | 6 | | table | +| [dynamic_credential_user_entry](dynamic_credential_user_entry.md) | 6 | | table | +| [evaluation_collection](evaluation_collection.md) | 9 | | table | +| [evaluation_config](evaluation_config.md) | 12 | | table | +| [event_destinations](event_destinations.md) | 4 | | table | +| [execution_annotation_tags](execution_annotation_tags.md) | 2 | | table | +| [execution_annotations](execution_annotations.md) | 6 | | table | +| [execution_data](execution_data.md) | 4 | | table | +| [execution_entity](execution_entity.md) | 17 | | table | +| [execution_metadata](execution_metadata.md) | 4 | | table | +| [folder](folder.md) | 6 | | table | +| [folder_tag](folder_tag.md) | 2 | | table | +| [insights_by_period](insights_by_period.md) | 6 | | table | +| [insights_metadata](insights_metadata.md) | 5 | | table | +| [insights_raw](insights_raw.md) | 5 | | table | +| [installed_nodes](installed_nodes.md) | 4 | | table | +| [installed_packages](installed_packages.md) | 6 | | table | +| [instance_ai_checkpoints](instance_ai_checkpoints.md) | 8 | | table | +| [instance_ai_iteration_logs](instance_ai_iteration_logs.md) | 6 | | table | +| [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) | 7 | | table | +| [instance_ai_messages](instance_ai_messages.md) | 8 | | table | | [instance_ai_observation_cursors](instance_ai_observation_cursors.md) | 5 | | table | | [instance_ai_observation_locks](instance_ai_observation_locks.md) | 6 | | table | -| [instance_ai_checkpoints](instance_ai_checkpoints.md) | 8 | | table | +| [instance_ai_observational_memory](instance_ai_observational_memory.md) | 32 | | table | +| [instance_ai_observations](instance_ai_observations.md) | 10 | | table | | [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) | 12 | | table | -| [workflow_entity](workflow_entity.md) | 20 | | table | -| [mcp_registry_server](mcp_registry_server.md) | 7 | | table | -| [user_api_keys](user_api_keys.md) | 9 | | table | -| [agent_files](agent_files.md) | 8 | | table | -| [binary_data](binary_data.md) | 9 | | table | -| [project](project.md) | 9 | | table | -| [agent_task_definition](agent_task_definition.md) | 7 | | table | -| [agent_task_snapshot](agent_task_snapshot.md) | 8 | | table | -| [agent_task_run_lock](agent_task_run_lock.md) | 6 | | table | -| [agent_execution_threads](agent_execution_threads.md) | 17 | | table | -| [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) | 7 | | table | -| [oauth_authorization_codes](oauth_authorization_codes.md) | 13 | | table | -| [oauth_refresh_tokens](oauth_refresh_tokens.md) | 7 | | table | -| [workflow_publication_outbox](workflow_publication_outbox.md) | 7 | | table | +| [instance_ai_resources](instance_ai_resources.md) | 5 | | table | +| [instance_ai_run_snapshots](instance_ai_run_snapshots.md) | 11 | | table | | [instance_ai_threads](instance_ai_threads.md) | 7 | | table | -| [agent_chat_subscriptions](agent_chat_subscriptions.md) | 6 | | table | +| [instance_ai_workflow_snapshots](instance_ai_workflow_snapshots.md) | 7 | | table | +| [instance_version_history](instance_version_history.md) | 5 | | table | +| [invalid_auth_token](invalid_auth_token.md) | 2 | | table | +| [mcp_registry_server](mcp_registry_server.md) | 7 | | table | +| [oauth_access_tokens](oauth_access_tokens.md) | 3 | | table | +| [oauth_authorization_codes](oauth_authorization_codes.md) | 13 | | table | +| [oauth_clients](oauth_clients.md) | 9 | | table | +| [oauth_refresh_tokens](oauth_refresh_tokens.md) | 7 | | table | +| [oauth_user_consents](oauth_user_consents.md) | 4 | | table | +| [processed_data](processed_data.md) | 5 | | table | +| [project](project.md) | 9 | | table | +| [project_relation](project_relation.md) | 5 | | table | +| [project_secrets_provider_access](project_secrets_provider_access.md) | 5 | | table | +| [role](role.md) | 7 | | table | +| [role_mapping_rule](role_mapping_rule.md) | 7 | | table | +| [role_mapping_rule_project](role_mapping_rule_project.md) | 2 | | table | +| [role_scope](role_scope.md) | 2 | | table | +| [scope](scope.md) | 3 | | table | +| [secrets_provider_connection](secrets_provider_connection.md) | 7 | | table | +| [settings](settings.md) | 3 | | table | +| [shared_credentials](shared_credentials.md) | 5 | | table | +| [shared_workflow](shared_workflow.md) | 5 | | table | +| [tag_entity](tag_entity.md) | 4 | | table | +| [test_case_execution](test_case_execution.md) | 16 | | table | +| [test_run](test_run.md) | 16 | | table | +| [token_exchange_jti](token_exchange_jti.md) | 3 | | table | +| [trusted_key](trusted_key.md) | 4 | | table | +| [trusted_key_source](trusted_key_source.md) | 8 | | table | +| [user](user.md) | 15 | | table | +| [user_api_keys](user_api_keys.md) | 9 | | table | +| [user_favorites](user_favorites.md) | 4 | | table | +| [variables](variables.md) | 5 | | table | +| [webhook_entity](webhook_entity.md) | 6 | | table | +| [workflow_builder_session](workflow_builder_session.md) | 9 | | table | +| [workflow_dependency](workflow_dependency.md) | 9 | | table | +| [workflow_entity](workflow_entity.md) | 20 | | table | +| [workflow_history](workflow_history.md) | 11 | | table | +| [workflow_publication_outbox](workflow_publication_outbox.md) | 7 | | table | +| [workflow_publish_history](workflow_publish_history.md) | 6 | | table | +| [workflow_published_version](workflow_published_version.md) | 4 | | table | +| [workflow_statistics](workflow_statistics.md) | 7 | | table | +| [workflows_tags](workflows_tags.md) | 2 | | table | ## Relations ```mermaid erDiagram -"installed_nodes" }o--|| "installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" +"agent_chat_subscriptions" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_checkpoints" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_execution" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_files" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entries" }o--o| "agents_memory_entries" : "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"agents_memory_entries" }o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entries" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_locks" |o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents_observations" : "FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents_memory_entries" : "FOREIGN KEY (memoryEntryId) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_messages" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observation_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observation_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observation_locks" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observation_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observations" }o--o| "agents_observations" : "FOREIGN KEY (supersededBy) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"agents_observations" }o--o| "agents_observations" : "FOREIGN KEY (parentId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"agents_observations" }o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"ai_builder_temporary_workflow" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"ai_builder_temporary_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "auth_identity" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"workflows_tags" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflows_tags" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_data" |o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"shared_credentials" |o--|| "credentials_entity" : "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_metadata" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_annotations" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_annotation_tags" |o--|| "annotation_tag_entity" : "FOREIGN KEY (tagId) REFERENCES annotation_tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_annotation_tags" |o--|| "execution_annotations" : "FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"processed_data" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"folder" }o--o| "folder" : "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"folder" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"folder_tag" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"folder_tag" |o--|| "folder" : "FOREIGN KEY (folderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"insights_metadata" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"insights_metadata" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"role_scope" |o--|| "scope" : "FOREIGN KEY (scopeSlug) REFERENCES scope (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" -"role_scope" |o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" -"user" }o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"project_relation" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"project_relation" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"data_table_column" }o--|| "data_table" : "FOREIGN KEY (dataTableId) REFERENCES data_table (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"variables" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"insights_raw" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"insights_by_period" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_access_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_access_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"credentials_entity" }o--o| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"chat_hub_agent_tools" |o--|| "chat_hub_tools" : "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_agent_tools" |o--|| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_agents" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_agents" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" }o--o| "chat_hub_messages" : "FOREIGN KEY (revisionOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" @@ -169,1140 +170,1139 @@ erDiagram "chat_hub_messages" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" }o--o| "chat_hub_messages" : "FOREIGN KEY (previousMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_messages" }o--|| "chat_hub_sessions" : "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_user_entry" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_user_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_user_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_dependency" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_tools" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_session_tools" |o--|| "chat_hub_tools" : "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_session_tools" |o--|| "chat_hub_sessions" : "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_agent_tools" |o--|| "chat_hub_tools" : "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_agent_tools" |o--|| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_agents" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_agents" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"project_secrets_provider_access" |o--|| "secrets_provider_connection" : "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"project_secrets_provider_access" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" -"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" -"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_sessions" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_sessions" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_sessions" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_sessions" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"role_mapping_rule" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" -"role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_tools" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "credential_dependency" }o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_builder_session" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_builder_session" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_messages" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_observational_memory" }o--o| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"instance_ai_iteration_logs" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"workflow_publish_history" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_publish_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"trusted_key" |o--|| "trusted_key_source" : "FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"user_favorites" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"ai_builder_temporary_workflow" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"ai_builder_temporary_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_entity" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"evaluation_config" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"credentials_entity" }o--o| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"data_table_column" }o--|| "data_table" : "FOREIGN KEY (dataTableId) REFERENCES data_table (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "evaluation_collection" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "evaluation_collection" }o--|| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "evaluation_collection" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"test_run" }o--o| "evaluation_collection" : "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"test_run" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"test_run" }o--o| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agent_checkpoints" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_messages" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_execution" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_run_snapshots" |o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observations" }o--o| "agents_observations" : "FOREIGN KEY (supersededBy) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"agents_observations" }o--o| "agents_observations" : "FOREIGN KEY (parentId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"agents_observations" }o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observation_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observation_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observation_locks" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observation_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entries" }o--o| "agents_memory_entries" : "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"agents_memory_entries" }o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entries" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_locks" |o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents_observations" : "FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents_memory_entries" : "FOREIGN KEY (memoryEntryId) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_observations" }o--o| "instance_ai_observations" : "FOREIGN KEY (supersededBy) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"instance_ai_observations" }o--o| "instance_ai_observations" : "FOREIGN KEY (parentId) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"instance_ai_observations" }o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_observation_cursors" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_observation_locks" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"evaluation_config" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_annotation_tags" |o--|| "annotation_tag_entity" : "FOREIGN KEY (tagId) REFERENCES annotation_tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_annotation_tags" |o--|| "execution_annotations" : "FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_annotations" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_data" |o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_entity" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_metadata" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"folder" }o--o| "folder" : "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"folder" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"folder_tag" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"folder_tag" |o--|| "folder" : "FOREIGN KEY (folderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"insights_by_period" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"insights_metadata" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"insights_metadata" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"insights_raw" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"installed_nodes" }o--|| "installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" "instance_ai_checkpoints" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_pending_confirmations" }o--o| "instance_ai_checkpoints" : "FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_pending_confirmations" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_pending_confirmations" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_entity" }o--o| "workflow_history" : "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" -"workflow_entity" }o--o| "folder" : "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_files" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_iteration_logs" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_mcp_registry_connections" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_mcp_registry_connections" }o--|| "mcp_registry_server" : "FOREIGN KEY (serverSlug) REFERENCES mcp_registry_server (slug) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_mcp_registry_connections" }o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_messages" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_observation_cursors" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_observation_locks" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_observational_memory" }o--o| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"instance_ai_observations" }o--o| "instance_ai_observations" : "FOREIGN KEY (supersededBy) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"instance_ai_observations" }o--o| "instance_ai_observations" : "FOREIGN KEY (parentId) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"instance_ai_observations" }o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_pending_confirmations" }o--o| "instance_ai_checkpoints" : "FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_pending_confirmations" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_pending_confirmations" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_run_snapshots" |o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_access_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_access_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_authorization_codes" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_authorization_codes" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_refresh_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_refresh_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_chat_subscriptions" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"processed_data" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"project_relation" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"project_relation" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project_secrets_provider_access" |o--|| "secrets_provider_connection" : "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project_secrets_provider_access" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"role_mapping_rule" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" +"role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"role_scope" |o--|| "scope" : "FOREIGN KEY (scopeSlug) REFERENCES scope (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" +"role_scope" |o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" +"shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_credentials" |o--|| "credentials_entity" : "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_run" }o--o| "evaluation_collection" : "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_run" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"test_run" }o--o| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"trusted_key" |o--|| "trusted_key_source" : "FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"user" }o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"user_favorites" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"variables" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_builder_session" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_builder_session" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_dependency" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_entity" }o--o| "workflow_history" : "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"workflow_entity" }o--o| "folder" : "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"workflow_publish_history" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_publish_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflows_tags" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflows_tags" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"settings" { - TEXT key PK - TEXT value - boolean loadOnStartup -} -"installed_packages" { - char_214_ packageName PK - char_50_ installedVersion - char_70_ authorName - char_70_ authorEmail +"agent_chat_subscriptions" { + varchar_36_ agentId PK datetime_3_ createdAt + varchar_255_ credentialId PK + varchar_64_ integrationType PK + varchar_255_ threadId PK datetime_3_ updatedAt } -"installed_nodes" { - char_200_ name PK - char_200_ type - INTEGER latestVersion - char_214_ package FK -} -"event_destinations" { - varchar_36_ id PK - TEXT destination +"agent_checkpoints" { + varchar_255_ agentId FK datetime_3_ createdAt + boolean expired + varchar_255_ runId PK + TEXT state + datetime_3_ updatedAt +} +"agent_execution" { + TEXT assistantResponse + INTEGER completionTokens + REAL cost + datetime_3_ createdAt + INTEGER duration + TEXT error + varchar_16_ hitlStatus + varchar_36_ id PK + varchar_255_ model + INTEGER promptTokens + varchar_32_ source + datetime_3_ startedAt + varchar_16_ status + datetime_3_ stoppedAt + varchar_128_ threadId FK + TEXT timeline + TEXT toolCalls + INTEGER totalTokens + datetime_3_ updatedAt + TEXT userMessage +} +"agent_execution_threads" { + varchar_36_ agentId FK + varchar_255_ agentName + datetime_3_ createdAt + varchar_8_ emoji + varchar_128_ id PK + varchar_36_ parentAgentId + varchar_128_ parentThreadId + varchar_255_ projectId FK + INTEGER sessionNumber + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title + INTEGER totalCompletionTokens + REAL totalCost + INTEGER totalDuration + INTEGER totalPromptTokens + datetime_3_ updatedAt +} +"agent_files" { + varchar_36_ agentId FK + TEXT binaryDataId + datetime_3_ createdAt + varchar_255_ fileName + INTEGER fileSizeBytes + varchar_16_ id PK + varchar_255_ mimeType + datetime_3_ updatedAt +} +"agent_history" { + varchar_36_ agentId FK + varchar_255_ author + datetime_3_ createdAt + varchar publishedById FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId PK +} +"agent_task_definition" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_128_ cronExpression + varchar_32_ id PK + varchar_128_ name + TEXT objective + datetime_3_ updatedAt +} +"agent_task_run_lock" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar holderId + varchar_32_ taskId PK + datetime_3_ updatedAt +} +"agent_task_snapshot" { + datetime_3_ createdAt + varchar_128_ cronExpression + boolean enabled + varchar_128_ name + TEXT objective + varchar_32_ taskId PK + datetime_3_ updatedAt + varchar_36_ versionId PK +} +"agents" { + varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId +} +"agents_memory_entries" { + varchar_36_ agentId FK + TEXT content + varchar_64_ contentHash + datetime_3_ createdAt + TEXT embedding + varchar_128_ embeddingModel + varchar_36_ id PK + datetime_3_ lastSeenAt + TEXT metadata + varchar_255_ resourceId FK + varchar_16_ status + varchar_36_ supersededBy FK + datetime_3_ updatedAt +} +"agents_memory_entry_cursors" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId PK + datetime_3_ updatedAt +} +"agents_memory_entry_locks" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ resourceId PK + datetime_3_ updatedAt +} +"agents_memory_entry_sources" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_64_ evidenceHash + TEXT evidenceText + varchar_36_ id PK + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + datetime_3_ updatedAt +} +"agents_messages" { + TEXT content + datetime_3_ createdAt + varchar_36_ id PK + varchar_255_ resourceId + varchar_36_ role + varchar_255_ threadId FK + varchar_36_ type + datetime_3_ updatedAt +} +"agents_observation_cursors" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId PK + datetime_3_ updatedAt +} +"agents_observation_locks" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ observationScopeId PK + varchar_20_ taskKind PK + datetime_3_ updatedAt +} +"agents_observations" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_36_ id PK + varchar_16_ marker + varchar_255_ observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + TEXT text + INTEGER tokenCount + datetime_3_ updatedAt +} +"agents_resources" { + datetime_3_ createdAt + varchar_255_ id PK + TEXT metadata + datetime_3_ updatedAt +} +"agents_threads" { + datetime_3_ createdAt + varchar_128_ id PK + TEXT metadata + varchar_255_ resourceId + varchar_255_ title + datetime_3_ updatedAt +} +"ai_builder_temporary_workflow" { + datetime_3_ createdAt + varchar threadId FK + datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"annotation_tag_entity" { + datetime_3_ createdAt + varchar_16_ id PK + varchar_24_ name datetime_3_ updatedAt } "auth_identity" { - VARCHAR_36_ userId FK + timestamp createdAt VARCHAR_64_ providerId PK VARCHAR_32_ providerType PK - timestamp createdAt timestamp updatedAt + VARCHAR_36_ userId FK } "auth_provider_sync_history" { + INTEGER created + INTEGER disabled + DATETIME endedAt + TEXT error INTEGER id VARCHAR_32_ providerType TEXT runMode - TEXT status - DATETIME startedAt - DATETIME endedAt INTEGER scanned - INTEGER created + DATETIME startedAt + TEXT status INTEGER updated - INTEGER disabled - TEXT error } -"tag_entity" { - varchar_36_ id PK - varchar_24_ name +"binary_data" { datetime_3_ createdAt + BLOB data + varchar fileId PK + varchar_255_ fileName + INTEGER fileSize + varchar_255_ mimeType + varchar_255_ sourceId + varchar_50_ sourceType datetime_3_ updatedAt } -"workflows_tags" { - varchar_36_ workflowId PK - INTEGER tagId PK -} -"webhook_entity" { - varchar_36_ workflowId - varchar webhookPath PK - varchar method PK - varchar node - varchar webhookId - INTEGER pathLength -} -"execution_data" { - INT executionId PK - TEXT workflowData - TEXT data - VARCHAR_36_ workflowVersionId -} -"shared_credentials" { - varchar_36_ credentialsId PK - varchar_36_ projectId PK - TEXT role - datetime_3_ createdAt - datetime_3_ updatedAt -} -"shared_workflow" { - varchar_36_ workflowId PK - varchar_36_ projectId PK - TEXT role - datetime_3_ createdAt - datetime_3_ updatedAt -} -"execution_metadata" { - INTEGER id - INTEGER executionId FK - varchar_255_ key - TEXT value -} -"invalid_auth_token" { - varchar_512_ token PK - datetime_3_ expiresAt -} -"execution_annotations" { - INTEGER id - INTEGER executionId FK - varchar_6_ vote - TEXT note - datetime_3_ createdAt - datetime_3_ updatedAt -} -"annotation_tag_entity" { - varchar_16_ id PK - varchar_24_ name - datetime_3_ createdAt - datetime_3_ updatedAt -} -"execution_annotation_tags" { - INTEGER annotationId PK - varchar_24_ tagId PK -} -"processed_data" { - varchar_36_ workflowId PK - varchar_255_ context PK - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT value -} -"folder" { - varchar_36_ id PK - varchar_128_ name - varchar_36_ parentFolderId FK - varchar_36_ projectId FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"folder_tag" { - varchar_36_ folderId PK - varchar_36_ tagId PK -} -"insights_metadata" { - INTEGER metaId - varchar_16_ workflowId FK - varchar_36_ projectId FK - varchar_128_ workflowName - varchar_255_ projectName -} -"scope" { - varchar_128_ slug PK - TEXT displayName - TEXT description -} -"role_scope" { - VARCHAR_128_ roleSlug PK - VARCHAR_128_ scopeSlug PK -} -"user" { - varchar id PK - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar password - TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK -} -"test_case_execution" { - varchar_36_ id PK - varchar_36_ testRunId FK - INTEGER pastExecutionId FK - INTEGER executionId FK - INTEGER evaluationExecutionId FK - varchar status - datetime_3_ runAt - datetime_3_ completedAt - varchar errorCode - TEXT errorDetails - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT inputs - TEXT outputs - INTEGER runIndex -} -"project_relation" { - varchar_36_ projectId PK - varchar userId PK - varchar role FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"data_table" { - varchar_36_ id PK - varchar_128_ name - varchar_36_ projectId FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"data_table_column" { - varchar_36_ id PK - varchar_128_ name - varchar_32_ type - INTEGER index - varchar_36_ dataTableId FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"role" { - varchar_128_ slug PK - TEXT displayName - TEXT description - TEXT roleType - boolean systemRole - datetime_3_ createdAt - datetime_3_ updatedAt -} -"variables" { - varchar_36_ id PK - TEXT key - TEXT type - TEXT value - varchar_36_ projectId FK -} -"insights_raw" { - INTEGER id - INTEGER metaId FK - INTEGER type - bigint value - datetime_0_ timestamp -} -"insights_by_period" { - INTEGER id - INTEGER metaId FK - INTEGER type - bigint value - INTEGER periodUnit - datetime_0_ periodStart -} -"oauth_clients" { - varchar id PK - varchar_255_ name - TEXT redirectUris - TEXT grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt - varchar_255_ tokenEndpointAuthMethod - datetime_3_ createdAt - datetime_3_ updatedAt -} -"oauth_access_tokens" { - varchar token PK - varchar clientId FK - varchar userId FK -} -"oauth_user_consents" { - INTEGER id - varchar userId FK - varchar clientId FK - bigint grantedAt -} -"dynamic_credential_resolver" { - varchar_16_ id PK - varchar_128_ name - varchar_128_ type - TEXT config - datetime_3_ createdAt - datetime_3_ updatedAt -} -"credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged - boolean isGlobal - boolean isResolvable - boolean resolvableAllowFallback - varchar_16_ resolverId FK -} -"chat_hub_messages" { - varchar id PK - varchar sessionId FK - varchar previousMessageId FK - varchar revisionOfMessageId FK - varchar retryOfMessageId FK - varchar_16_ type - varchar_128_ name - TEXT content - varchar_16_ provider - varchar_36_ workflowId FK - INTEGER executionId FK - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_16_ status - TEXT attachments - VARCHAR_256_ model -} -"workflow_statistics" { - INTEGER id - INTEGER count - DATETIME latestEvent - VARCHAR_128_ name - VARCHAR_36_ workflowId - VARCHAR_128_ workflowName - INTEGER rootCount -} -"dynamic_credential_user_entry" { - varchar_16_ credentialId PK - varchar userId PK - varchar_16_ resolverId PK - TEXT data - datetime_3_ createdAt - datetime_3_ updatedAt -} -"workflow_dependency" { - INTEGER id - varchar_36_ workflowId FK - INTEGER workflowVersionId - varchar_32_ dependencyType - varchar_255_ dependencyKey - smallint indexVersionId - datetime_3_ createdAt - TEXT dependencyInfo - varchar_36_ publishedVersionId -} -"secrets_provider_connection" { - INTEGER id - varchar_128_ providerKey - varchar_36_ type - TEXT encryptedSettings - boolean isEnabled - datetime_3_ createdAt - datetime_3_ updatedAt -} -"dynamic_credential_entry" { - varchar_16_ credential_id PK - varchar_2048_ subject_id PK - varchar_16_ resolver_id PK - TEXT data - datetime_3_ createdAt - datetime_3_ updatedAt -} -"chat_hub_tools" { - varchar id PK - varchar_255_ name - varchar_255_ type - REAL typeVersion - varchar ownerId FK - TEXT definition - boolean enabled - datetime_3_ createdAt - datetime_3_ updatedAt -} -"chat_hub_session_tools" { - varchar sessionId PK - varchar toolId PK -} "chat_hub_agent_tools" { varchar agentId PK varchar toolId PK } "chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK + datetime_3_ createdAt varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT icon + varchar_512_ description TEXT files + TEXT icon + varchar id PK + varchar_64_ model + varchar_256_ name + varchar ownerId FK + varchar_16_ provider TEXT suggestedPrompts -} -"project_secrets_provider_access" { - INTEGER secretsProviderConnectionId PK - varchar_36_ projectId PK - datetime_3_ createdAt + TEXT systemPrompt datetime_3_ updatedAt - varchar_128_ role } -"workflow_published_version" { - varchar_36_ workflowId PK - varchar_36_ publishedVersionId FK +"chat_hub_messages" { + varchar_36_ agentId FK + TEXT attachments + TEXT content datetime_3_ createdAt + INTEGER executionId FK + varchar id PK + VARCHAR_256_ model + varchar_128_ name + varchar previousMessageId FK + varchar_16_ provider + varchar retryOfMessageId FK + varchar revisionOfMessageId FK + varchar sessionId FK + varchar_16_ status + varchar_16_ type datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"chat_hub_session_tools" { + varchar sessionId PK + varchar toolId PK } "chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ agentId FK varchar_128_ agentName - varchar_16_ type -} -"role_mapping_rule" { - varchar_16_ id PK - TEXT expression - varchar_128_ role FK - varchar_64_ type - INTEGER order datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type datetime_3_ updatedAt + varchar_36_ workflowId FK } -"role_mapping_rule_project" { - varchar_16_ roleMappingRuleId PK - varchar_36_ projectId PK +"chat_hub_tools" { + datetime_3_ createdAt + TEXT definition + boolean enabled + varchar id PK + varchar_255_ name + varchar ownerId FK + varchar_255_ type + REAL typeVersion + datetime_3_ updatedAt } "credential_dependency" { - INTEGER id + datetime_3_ createdAt varchar_36_ credentialId FK - varchar_64_ dependencyType varchar_255_ dependencyId - datetime_3_ createdAt -} -"workflow_builder_session" { - varchar id PK - varchar_36_ workflowId FK - varchar userId FK - TEXT messages - TEXT previousSummary - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ activeVersionCardId - varchar_255_ resumeAfterRestoreMessageId -} -"instance_version_history" { + varchar_64_ dependencyType INTEGER id - INTEGER major - INTEGER minor - INTEGER patch - datetime_3_ createdAt } -"instance_ai_messages" { - varchar_36_ id PK - varchar threadId FK - TEXT content - varchar_16_ role - varchar_32_ type - varchar_255_ resourceId +"credentials_entity" { datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_resources" { - varchar_255_ id PK - TEXT workingMemory - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_observational_memory" { - varchar_36_ id PK - varchar_255_ lookupKey - varchar_16_ scope - varchar threadId FK - varchar_255_ resourceId - TEXT activeObservations - varchar_32_ originType - TEXT config - INTEGER generationCount - datetime_3_ lastObservedAt - INTEGER pendingMessageTokens - INTEGER totalTokensObserved - INTEGER observationTokenCount - boolean isObserving - boolean isReflecting - TEXT observedMessageIds - varchar observedTimezone - TEXT bufferedObservations - INTEGER bufferedObservationTokens - TEXT bufferedMessageIds - TEXT bufferedReflection - INTEGER bufferedReflectionTokens - INTEGER bufferedReflectionInputTokens - INTEGER reflectedObservationLineCount - TEXT bufferedObservationChunks - boolean isBufferingObservation - boolean isBufferingReflection - INTEGER lastBufferedAtTokens - datetime_3_ lastBufferedAtTime - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_workflow_snapshots" { - varchar_36_ runId PK - varchar_255_ workflowName PK - varchar_255_ resourceId - varchar status - TEXT snapshot - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_iteration_logs" { - varchar_36_ id PK - varchar threadId FK - varchar taskKey - TEXT entry - datetime_3_ createdAt - datetime_3_ updatedAt -} -"token_exchange_jti" { - varchar_255_ jti PK - datetime_3_ expiresAt - datetime_3_ createdAt -} -"workflow_publish_history" { - INTEGER id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - varchar userId FK - datetime_3_ createdAt -} -"trusted_key_source" { - varchar_36_ id PK - varchar_32_ type - TEXT config - varchar_32_ status - TEXT lastError - datetime_3_ lastRefreshedAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"trusted_key" { - varchar_36_ sourceId PK - varchar_255_ kid PK TEXT data - datetime_3_ createdAt + varchar_36_ id PK + boolean isGlobal + boolean isManaged + boolean isResolvable + varchar_128_ name + boolean resolvableAllowFallback + varchar_16_ resolverId FK + varchar_32_ type + datetime_3_ updatedAt } -"user_favorites" { - INTEGER id - varchar userId FK - varchar_255_ resourceId - varchar_64_ resourceType +"data_table" { + datetime_3_ createdAt + varchar_36_ id PK + varchar_128_ name + varchar_36_ projectId FK + datetime_3_ updatedAt +} +"data_table_column" { + datetime_3_ createdAt + varchar_36_ dataTableId FK + varchar_36_ id PK + INTEGER index + varchar_128_ name + varchar_32_ type + datetime_3_ updatedAt } "deployment_key" { - varchar_36_ id PK - varchar_64_ type - TEXT value varchar_20_ algorithm - varchar_20_ status datetime_3_ createdAt + varchar_36_ id PK + varchar_20_ status + varchar_64_ type + datetime_3_ updatedAt + TEXT value +} +"dynamic_credential_entry" { + datetime_3_ createdAt + varchar_16_ credential_id PK + TEXT data + varchar_16_ resolver_id PK + varchar_2048_ subject_id PK datetime_3_ updatedAt } -"ai_builder_temporary_workflow" { - varchar_36_ workflowId PK - varchar threadId FK +"dynamic_credential_resolver" { + TEXT config datetime_3_ createdAt + varchar_16_ id PK + varchar_128_ name + varchar_128_ type datetime_3_ updatedAt } +"dynamic_credential_user_entry" { + datetime_3_ createdAt + varchar_16_ credentialId PK + TEXT data + varchar_16_ resolverId PK + datetime_3_ updatedAt + varchar userId PK +} +"evaluation_collection" { + datetime_3_ createdAt + varchar createdById FK + TEXT description + varchar_36_ evaluationConfigId FK + varchar_36_ id PK + TEXT insightsCache + varchar_128_ name + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"evaluation_config" { + datetime_3_ createdAt + TEXT datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id PK + varchar_64_ invalidReason + TEXT metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"event_destinations" { + datetime_3_ createdAt + TEXT destination + varchar_36_ id PK + datetime_3_ updatedAt +} +"execution_annotation_tags" { + INTEGER annotationId PK + varchar_24_ tagId PK +} +"execution_annotations" { + datetime_3_ createdAt + INTEGER executionId FK + INTEGER id + TEXT note + datetime_3_ updatedAt + varchar_6_ vote +} +"execution_data" { + TEXT data + INT executionId PK + TEXT workflowData + VARCHAR_36_ workflowVersionId +} "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } -"evaluation_config" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - TEXT datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt +"execution_metadata" { + INTEGER executionId FK + INTEGER id + varchar_255_ key + TEXT value } -"evaluation_collection" { +"folder" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name - TEXT description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - varchar createdById FK - TEXT insightsCache - datetime_3_ createdAt + varchar_36_ parentFolderId FK + varchar_36_ projectId FK datetime_3_ updatedAt } -"test_run" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar status - varchar errorCode - TEXT errorDetails - datetime_3_ runAt - datetime_3_ completedAt - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - TEXT evaluationConfigSnapshot - varchar_36_ collectionId FK +"folder_tag" { + varchar_36_ folderId PK + varchar_36_ tagId PK } -"agent_checkpoints" { - varchar_255_ runId PK - varchar_255_ agentId FK - TEXT state - boolean expired - datetime_3_ createdAt - datetime_3_ updatedAt +"insights_by_period" { + INTEGER id + INTEGER metaId FK + datetime_0_ periodStart + INTEGER periodUnit + INTEGER type + bigint value } -"agents_resources" { - varchar_255_ id PK - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt +"insights_metadata" { + INTEGER metaId + varchar_36_ projectId FK + varchar_255_ projectName + varchar_16_ workflowId FK + varchar_128_ workflowName } -"agents_threads" { - varchar_128_ id PK - varchar_255_ resourceId - varchar_255_ title - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt +"insights_raw" { + INTEGER id + INTEGER metaId FK + datetime_0_ timestamp + INTEGER type + bigint value } -"agents_messages" { - varchar_36_ id PK - varchar_255_ threadId FK - varchar_255_ resourceId - varchar_36_ role - varchar_36_ type - TEXT content - datetime_3_ createdAt - datetime_3_ updatedAt +"installed_nodes" { + INTEGER latestVersion + char_200_ name PK + char_214_ package FK + char_200_ type } -"agent_execution" { - varchar_36_ id PK - varchar_128_ threadId FK - varchar_16_ status - datetime_3_ startedAt - datetime_3_ stoppedAt - INTEGER duration - TEXT userMessage - TEXT assistantResponse - varchar_255_ model - INTEGER promptTokens - INTEGER completionTokens - INTEGER totalTokens - REAL cost - TEXT toolCalls - TEXT timeline - TEXT error - varchar_16_ hitlStatus - varchar_32_ source - datetime_3_ createdAt - datetime_3_ updatedAt -} -"workflow_history" { - varchar_36_ versionId PK - varchar_36_ workflowId FK - varchar_255_ authors - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT nodes - TEXT connections - varchar_128_ name - boolean autosaved - TEXT description - TEXT nodeGroups -} -"instance_ai_run_snapshots" { - varchar threadId PK - varchar_36_ runId PK - varchar_36_ messageGroupId - TEXT runIds - TEXT tree - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ langsmithRunId - varchar_36_ langsmithTraceId - varchar_64_ traceId - varchar_64_ spanId -} -"agents_observations" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_16_ marker - TEXT text - varchar_36_ parentId FK - INTEGER tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observation_cursors" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observation_locks" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entries" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_255_ resourceId FK - TEXT content - varchar_64_ contentHash - varchar_16_ status - varchar_36_ supersededBy FK - varchar_128_ embeddingModel - TEXT embedding - TEXT metadata - datetime_3_ lastSeenAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_locks" { - varchar_36_ agentId PK - varchar_255_ resourceId PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_sources" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - TEXT evidenceText - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_cursors" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastIndexedObservationId - datetime_3_ lastIndexedObservationCreatedAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agent_history" { - varchar_36_ versionId PK - varchar_36_ agentId FK - TEXT schema - TEXT tools - TEXT skills - varchar publishedById FK - varchar_255_ author - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ activeVersionId FK -} -"instance_ai_observations" { - varchar_36_ id PK - varchar observationScopeId FK - varchar_16_ marker - TEXT text - varchar_36_ parentId FK - INTEGER tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_observation_cursors" { - varchar observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_observation_locks" { - varchar observationScopeId PK - varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil +"installed_packages" { + char_70_ authorEmail + char_70_ authorName datetime_3_ createdAt + char_50_ installedVersion + char_214_ packageName PK datetime_3_ updatedAt } "instance_ai_checkpoints" { - varchar_255_ key PK - varchar_255_ runId - varchar threadId FK - varchar_255_ resourceId - TEXT state datetime_3_ createdAt - datetime_3_ updatedAt datetime_3_ expiredAt -} -"instance_ai_pending_confirmations" { - varchar_36_ requestId PK + varchar_255_ key PK + varchar_255_ resourceId + varchar_255_ runId + TEXT state varchar threadId FK - varchar userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId - varchar_255_ checkpointKey FK - varchar_36_ checkpointTaskId - datetime_3_ expiresAt - datetime_3_ createdAt datetime_3_ updatedAt } -"workflow_entity" { +"instance_ai_iteration_logs" { + datetime_3_ createdAt + TEXT entry varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt + varchar taskKey + varchar threadId FK datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"mcp_registry_server" { - varchar_255_ slug PK - varchar_50_ status - varchar_50_ version - datetime_3_ registryUpdatedAt - TEXT data - datetime_3_ createdAt - datetime_3_ updatedAt -} -"user_api_keys" { - varchar_36_ id PK - varchar userId FK - varchar_100_ label - varchar apiKey - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT scopes - varchar audience - datetime_3_ lastUsedAt -} -"agent_files" { - varchar_16_ id PK - varchar_36_ agentId FK - TEXT binaryDataId - varchar_255_ fileName - varchar_255_ mimeType - INTEGER fileSizeBytes - datetime_3_ createdAt - datetime_3_ updatedAt -} -"binary_data" { - varchar fileId PK - varchar_50_ sourceType - varchar_255_ sourceId - BLOB data - varchar_255_ mimeType - varchar_255_ fileName - INTEGER fileSize - datetime_3_ createdAt - datetime_3_ updatedAt -} -"project" { - varchar_36_ id PK - varchar_255_ name - varchar_36_ type - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags -} -"agent_task_definition" { - varchar_32_ id PK - varchar_36_ agentId FK - varchar_128_ name - TEXT objective - varchar_128_ cronExpression - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agent_task_snapshot" { - varchar_36_ versionId PK - varchar_32_ taskId PK - boolean enabled - varchar_128_ name - TEXT objective - varchar_128_ cronExpression - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agent_task_run_lock" { - varchar_36_ agentId PK - varchar_32_ taskId PK - varchar holderId - datetime_3_ heldUntil - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agent_execution_threads" { - varchar_128_ id PK - varchar_36_ agentId FK - varchar_255_ agentName - varchar_255_ projectId FK - INTEGER sessionNumber - INTEGER totalPromptTokens - INTEGER totalCompletionTokens - REAL totalCost - INTEGER totalDuration - varchar_255_ title - varchar_8_ emoji - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId } "instance_ai_mcp_registry_connections" { - varchar id PK + datetime_3_ createdAt varchar_36_ credentialId FK + varchar id PK varchar_255_ serverSlug FK TEXT toolFilter + datetime_3_ updatedAt varchar userId FK +} +"instance_ai_messages" { + TEXT content datetime_3_ createdAt + varchar_36_ id PK + varchar_255_ resourceId + varchar_16_ role + varchar threadId FK + varchar_32_ type datetime_3_ updatedAt } -"oauth_authorization_codes" { - varchar_255_ code PK - varchar clientId FK - varchar userId FK - varchar redirectUri - varchar codeChallenge - varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used +"instance_ai_observation_cursors" { datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar observationScopeId PK datetime_3_ updatedAt - varchar resource - TEXT scope } -"oauth_refresh_tokens" { - varchar_255_ token PK - varchar clientId FK - varchar userId FK - bigint expiresAt +"instance_ai_observation_locks" { datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar observationScopeId PK + varchar_20_ taskKind PK datetime_3_ updatedAt - TEXT scope } -"workflow_publication_outbox" { - INTEGER id - varchar_36_ workflowId - varchar_36_ publishedVersionId - varchar_20_ status - TEXT errorMessage +"instance_ai_observational_memory" { + TEXT activeObservations + TEXT bufferedMessageIds + TEXT bufferedObservationChunks + INTEGER bufferedObservationTokens + TEXT bufferedObservations + TEXT bufferedReflection + INTEGER bufferedReflectionInputTokens + INTEGER bufferedReflectionTokens + TEXT config datetime_3_ createdAt + INTEGER generationCount + varchar_36_ id PK + boolean isBufferingObservation + boolean isBufferingReflection + boolean isObserving + boolean isReflecting + datetime_3_ lastBufferedAtTime + INTEGER lastBufferedAtTokens + datetime_3_ lastObservedAt + varchar_255_ lookupKey + TEXT metadata + INTEGER observationTokenCount + TEXT observedMessageIds + varchar observedTimezone + varchar_32_ originType + INTEGER pendingMessageTokens + INTEGER reflectedObservationLineCount + varchar_255_ resourceId + varchar_16_ scope + varchar threadId FK + INTEGER totalTokensObserved + datetime_3_ updatedAt +} +"instance_ai_observations" { + datetime_3_ createdAt + varchar_36_ id PK + varchar_16_ marker + varchar observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + TEXT text + INTEGER tokenCount + datetime_3_ updatedAt +} +"instance_ai_pending_confirmations" { + varchar_255_ checkpointKey FK + varchar_36_ checkpointTaskId + datetime_3_ createdAt + datetime_3_ expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId PK + varchar_36_ runId + varchar threadId FK + varchar_64_ toolCallId + datetime_3_ updatedAt + varchar userId FK +} +"instance_ai_resources" { + datetime_3_ createdAt + varchar_255_ id PK + TEXT metadata + datetime_3_ updatedAt + TEXT workingMemory +} +"instance_ai_run_snapshots" { + datetime_3_ createdAt + varchar_36_ langsmithRunId + varchar_36_ langsmithTraceId + varchar_36_ messageGroupId + varchar_36_ runId PK + TEXT runIds + varchar_64_ spanId + varchar threadId PK + varchar_64_ traceId + TEXT tree datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } -"agent_chat_subscriptions" { - varchar_36_ agentId PK - varchar_64_ integrationType PK - varchar_255_ credentialId PK - varchar_255_ threadId PK +"instance_ai_workflow_snapshots" { + datetime_3_ createdAt + varchar_255_ resourceId + varchar_36_ runId PK + TEXT snapshot + varchar status + datetime_3_ updatedAt + varchar_255_ workflowName PK +} +"instance_version_history" { + datetime_3_ createdAt + INTEGER id + INTEGER major + INTEGER minor + INTEGER patch +} +"invalid_auth_token" { + datetime_3_ expiresAt + varchar_512_ token PK +} +"mcp_registry_server" { + datetime_3_ createdAt + TEXT data + datetime_3_ registryUpdatedAt + varchar_255_ slug PK + varchar_50_ status + datetime_3_ updatedAt + varchar_50_ version +} +"oauth_access_tokens" { + varchar clientId FK + varchar token PK + varchar userId FK +} +"oauth_authorization_codes" { + varchar clientId FK + varchar_255_ code PK + varchar codeChallenge + varchar_255_ codeChallengeMethod + datetime_3_ createdAt + bigint expiresAt + varchar redirectUri + varchar resource + TEXT scope + varchar state + datetime_3_ updatedAt + boolean used + varchar userId FK +} +"oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + datetime_3_ createdAt + TEXT grantTypes + varchar id PK + varchar_255_ name + TEXT redirectUris + varchar_255_ tokenEndpointAuthMethod + datetime_3_ updatedAt +} +"oauth_refresh_tokens" { + varchar clientId FK + datetime_3_ createdAt + bigint expiresAt + TEXT scope + varchar_255_ token PK + datetime_3_ updatedAt + varchar userId FK +} +"oauth_user_consents" { + varchar clientId FK + bigint grantedAt + INTEGER id + varchar userId FK +} +"processed_data" { + varchar_255_ context PK datetime_3_ createdAt datetime_3_ updatedAt + TEXT value + varchar_36_ workflowId PK +} +"project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon + varchar_36_ id PK + varchar_255_ name + varchar_36_ type + datetime_3_ updatedAt +} +"project_relation" { + datetime_3_ createdAt + varchar_36_ projectId PK + varchar role FK + datetime_3_ updatedAt + varchar userId PK +} +"project_secrets_provider_access" { + datetime_3_ createdAt + varchar_36_ projectId PK + varchar_128_ role + INTEGER secretsProviderConnectionId PK + datetime_3_ updatedAt +} +"role" { + datetime_3_ createdAt + TEXT description + TEXT displayName + TEXT roleType + varchar_128_ slug PK + boolean systemRole + datetime_3_ updatedAt +} +"role_mapping_rule" { + datetime_3_ createdAt + TEXT expression + varchar_16_ id PK + INTEGER order + varchar_128_ role FK + varchar_64_ type + datetime_3_ updatedAt +} +"role_mapping_rule_project" { + varchar_36_ projectId PK + varchar_16_ roleMappingRuleId PK +} +"role_scope" { + VARCHAR_128_ roleSlug PK + VARCHAR_128_ scopeSlug PK +} +"scope" { + TEXT description + TEXT displayName + varchar_128_ slug PK +} +"secrets_provider_connection" { + datetime_3_ createdAt + TEXT encryptedSettings + INTEGER id + boolean isEnabled + varchar_128_ providerKey + varchar_36_ type + datetime_3_ updatedAt +} +"settings" { + TEXT key PK + boolean loadOnStartup + TEXT value +} +"shared_credentials" { + datetime_3_ createdAt + varchar_36_ credentialsId PK + varchar_36_ projectId PK + TEXT role + datetime_3_ updatedAt +} +"shared_workflow" { + datetime_3_ createdAt + varchar_36_ projectId PK + TEXT role + datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"tag_entity" { + datetime_3_ createdAt + varchar_36_ id PK + varchar_24_ name + datetime_3_ updatedAt +} +"test_case_execution" { + datetime_3_ completedAt + datetime_3_ createdAt + varchar errorCode + TEXT errorDetails + INTEGER evaluationExecutionId FK + INTEGER executionId FK + varchar_36_ id PK + TEXT inputs + TEXT metrics + TEXT outputs + INTEGER pastExecutionId FK + datetime_3_ runAt + INTEGER runIndex + varchar status + varchar_36_ testRunId FK + datetime_3_ updatedAt +} +"test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + datetime_3_ completedAt + datetime_3_ createdAt + varchar errorCode + TEXT errorDetails + varchar_36_ evaluationConfigId FK + TEXT evaluationConfigSnapshot + varchar_36_ id PK + TEXT metrics + datetime_3_ runAt + varchar_255_ runningInstanceId + varchar status + datetime_3_ updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} +"token_exchange_jti" { + datetime_3_ createdAt + datetime_3_ expiresAt + varchar_255_ jti PK +} +"trusted_key" { + datetime_3_ createdAt + TEXT data + varchar_255_ kid PK + varchar_36_ sourceId PK +} +"trusted_key_source" { + TEXT config + datetime_3_ createdAt + varchar_36_ id PK + TEXT lastError + datetime_3_ lastRefreshedAt + varchar_32_ status + varchar_32_ type + datetime_3_ updatedAt +} +"user" { + datetime_3_ createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + varchar id PK + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret + varchar password + TEXT personalizationAnswers + varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt +} +"user_api_keys" { + varchar apiKey + varchar audience + datetime_3_ createdAt + varchar_36_ id PK + varchar_100_ label + datetime_3_ lastUsedAt + TEXT scopes + datetime_3_ updatedAt + varchar userId FK +} +"user_favorites" { + INTEGER id + varchar_255_ resourceId + varchar_64_ resourceType + varchar userId FK +} +"variables" { + varchar_36_ id PK + TEXT key + varchar_36_ projectId FK + TEXT type + TEXT value +} +"webhook_entity" { + varchar method PK + varchar node + INTEGER pathLength + varchar webhookId + varchar webhookPath PK + varchar_36_ workflowId +} +"workflow_builder_session" { + varchar_255_ activeVersionCardId + datetime_3_ createdAt + varchar id PK + TEXT messages + TEXT previousSummary + varchar_255_ resumeAfterRestoreMessageId + datetime_3_ updatedAt + varchar userId FK + varchar_36_ workflowId FK +} +"workflow_dependency" { + datetime_3_ createdAt + TEXT dependencyInfo + varchar_255_ dependencyKey + varchar_32_ dependencyType + INTEGER id + smallint indexVersionId + varchar_36_ publishedVersionId + varchar_36_ workflowId FK + INTEGER workflowVersionId +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId +} +"workflow_history" { + varchar_255_ authors + boolean autosaved + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_128_ name + TEXT nodeGroups + TEXT nodes + datetime_3_ updatedAt + varchar_36_ versionId PK + varchar_36_ workflowId FK +} +"workflow_publication_outbox" { + datetime_3_ createdAt + TEXT errorMessage + INTEGER id + varchar_36_ publishedVersionId + varchar_20_ status + datetime_3_ updatedAt + varchar_36_ workflowId +} +"workflow_publish_history" { + datetime_3_ createdAt + varchar_36_ event + INTEGER id + varchar userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK +} +"workflow_published_version" { + datetime_3_ createdAt + varchar_36_ publishedVersionId FK + datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"workflow_statistics" { + INTEGER count + INTEGER id + DATETIME latestEvent + VARCHAR_128_ name + INTEGER rootCount + VARCHAR_36_ workflowId + VARCHAR_128_ workflowName +} +"workflows_tags" { + INTEGER tagId PK + varchar_36_ workflowId PK } ``` diff --git a/docs/generated/sqlite-schema/agent_chat_subscriptions.md b/docs/generated/sqlite-schema/agent_chat_subscriptions.md index c43596048af..f6a868a0aae 100644 --- a/docs/generated/sqlite-schema/agent_chat_subscriptions.md +++ b/docs/generated/sqlite-schema/agent_chat_subscriptions.md @@ -16,23 +16,23 @@ CREATE TABLE "agent_chat_subscriptions" ("agentId" varchar(36) NOT NULL, "integr | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| integrationType | varchar(64) | | false | | | | -| credentialId | varchar(255) | | false | | | | -| threadId | varchar(255) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| credentialId | varchar(255) | | false | | | | +| integrationType | varchar(64) | | false | | | | +| threadId | varchar(255) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| integrationType | PRIMARY KEY | PRIMARY KEY (integrationType) | -| credentialId | PRIMARY KEY | PRIMARY KEY (credentialId) | -| threadId | PRIMARY KEY | PRIMARY KEY (threadId) | -| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_agent_chat_subscriptions_1 | PRIMARY KEY | PRIMARY KEY (agentId, integrationType, credentialId, threadId) | | - | CHECK | CHECK ("integrationType" IN ('telegram', 'slack', 'linear')) | +| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | +| credentialId | PRIMARY KEY | PRIMARY KEY (credentialId) | +| integrationType | PRIMARY KEY | PRIMARY KEY (integrationType) | +| sqlite_autoindex_agent_chat_subscriptions_1 | PRIMARY KEY | PRIMARY KEY (agentId, integrationType, credentialId, threadId) | +| threadId | PRIMARY KEY | PRIMARY KEY (threadId) | ## Indexes @@ -49,25 +49,25 @@ erDiagram "agent_chat_subscriptions" { varchar_36_ agentId PK - varchar_64_ integrationType PK - varchar_255_ credentialId PK - varchar_255_ threadId PK datetime_3_ createdAt + varchar_255_ credentialId PK + varchar_64_ integrationType PK + varchar_255_ threadId PK datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/agent_checkpoints.md b/docs/generated/sqlite-schema/agent_checkpoints.md index 34e24b8cc7b..702a987f48b 100644 --- a/docs/generated/sqlite-schema/agent_checkpoints.md +++ b/docs/generated/sqlite-schema/agent_checkpoints.md @@ -15,19 +15,19 @@ CREATE TABLE "agent_checkpoints" ("runId" varchar(255) PRIMARY KEY NOT NULL, "ag | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| runId | varchar(255) | | false | | | | | agentId | varchar(255) | | true | | [agents](agents.md) | | -| state | TEXT | | true | | | | -| expired | boolean | false | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| expired | boolean | false | false | | | | +| runId | varchar(255) | | false | | | | +| state | TEXT | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| runId | PRIMARY KEY | PRIMARY KEY (runId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| runId | PRIMARY KEY | PRIMARY KEY (runId) | | sqlite_autoindex_agent_checkpoints_1 | PRIMARY KEY | PRIMARY KEY (runId) | ## Indexes @@ -45,26 +45,26 @@ erDiagram "agent_checkpoints" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_checkpoints" { - varchar_255_ runId PK varchar_255_ agentId FK - TEXT state - boolean expired datetime_3_ createdAt + boolean expired + varchar_255_ runId PK + TEXT state datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/agent_execution.md b/docs/generated/sqlite-schema/agent_execution.md index 519a0eee098..12afc2f1b7a 100644 --- a/docs/generated/sqlite-schema/agent_execution.md +++ b/docs/generated/sqlite-schema/agent_execution.md @@ -15,36 +15,36 @@ CREATE TABLE "agent_execution" ("id" varchar(36) PRIMARY KEY NOT NULL, "threadId | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | varchar(128) | | false | | [agent_execution_threads](agent_execution_threads.md) | | -| status | varchar(16) | | false | | | | -| startedAt | datetime(3) | | true | | | | -| stoppedAt | datetime(3) | | true | | | | -| duration | INTEGER | 0 | false | | | | -| userMessage | TEXT | | false | | | | | assistantResponse | TEXT | | false | | | | -| model | varchar(255) | | true | | | | -| promptTokens | INTEGER | | true | | | | | completionTokens | INTEGER | | true | | | | -| totalTokens | INTEGER | | true | | | | | cost | REAL | | true | | | | -| toolCalls | TEXT | | true | | | | -| timeline | TEXT | | true | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| duration | INTEGER | 0 | false | | | | | error | TEXT | | true | | | | | hitlStatus | varchar(16) | | true | | | | +| id | varchar(36) | | false | | | | +| model | varchar(255) | | true | | | | +| promptTokens | INTEGER | | true | | | | | source | varchar(32) | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| startedAt | datetime(3) | | true | | | | +| status | varchar(16) | | false | | | | +| stoppedAt | datetime(3) | | true | | | | +| threadId | varchar(128) | | false | | [agent_execution_threads](agent_execution_threads.md) | | +| timeline | TEXT | | true | | | | +| toolCalls | TEXT | | true | | | | +| totalTokens | INTEGER | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userMessage | TEXT | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | -| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_agent_execution_1 | PRIMARY KEY | PRIMARY KEY (id) | | - | CHECK | CHECK (("status" IN ('success', 'error'))) | | - | CHECK | CHECK (("hitlStatus" IN ('suspended', 'resumed'))) | +| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_agent_execution_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -61,45 +61,45 @@ erDiagram "agent_execution" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_execution" { - varchar_36_ id PK - varchar_128_ threadId FK - varchar_16_ status - datetime_3_ startedAt - datetime_3_ stoppedAt - INTEGER duration - TEXT userMessage TEXT assistantResponse - varchar_255_ model - INTEGER promptTokens INTEGER completionTokens - INTEGER totalTokens REAL cost - TEXT toolCalls - TEXT timeline + datetime_3_ createdAt + INTEGER duration TEXT error varchar_16_ hitlStatus + varchar_36_ id PK + varchar_255_ model + INTEGER promptTokens varchar_32_ source - datetime_3_ createdAt + datetime_3_ startedAt + varchar_16_ status + datetime_3_ stoppedAt + varchar_128_ threadId FK + TEXT timeline + TEXT toolCalls + INTEGER totalTokens datetime_3_ updatedAt + TEXT userMessage } "agent_execution_threads" { - varchar_128_ id PK varchar_36_ agentId FK varchar_255_ agentName + datetime_3_ createdAt + varchar_8_ emoji + varchar_128_ id PK + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK INTEGER sessionNumber - INTEGER totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title INTEGER totalCompletionTokens REAL totalCost INTEGER totalDuration - varchar_255_ title - varchar_8_ emoji - datetime_3_ createdAt + INTEGER totalPromptTokens datetime_3_ updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId } ``` diff --git a/docs/generated/sqlite-schema/agent_execution_threads.md b/docs/generated/sqlite-schema/agent_execution_threads.md index be364d99822..5ed2f18f936 100644 --- a/docs/generated/sqlite-schema/agent_execution_threads.md +++ b/docs/generated/sqlite-schema/agent_execution_threads.md @@ -15,41 +15,41 @@ CREATE TABLE "agent_execution_threads" ("id" varchar(128) PRIMARY KEY NOT NULL, | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(128) | | false | [agent_execution](agent_execution.md) | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | | agentName | varchar(255) | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| emoji | varchar(8) | | true | | | | +| id | varchar(128) | | false | [agent_execution](agent_execution.md) | | | +| parentAgentId | varchar(36) | | true | | | | +| parentThreadId | varchar(128) | | true | | | | | projectId | varchar(255) | | false | | [project](project.md) | | | sessionNumber | INTEGER | 0 | false | | | | -| totalPromptTokens | INTEGER | 0 | false | | | | +| taskId | varchar(32) | | true | | | | +| taskVersionId | varchar(36) | | true | | [agent_history](agent_history.md) | | +| title | varchar(255) | | true | | | | | totalCompletionTokens | INTEGER | 0 | false | | | | | totalCost | REAL | 0 | false | | | | | totalDuration | INTEGER | 0 | false | | | | -| title | varchar(255) | | true | | | | -| emoji | varchar(8) | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| totalPromptTokens | INTEGER | 0 | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| taskId | varchar(32) | | true | | | | -| taskVersionId | varchar(36) | | true | | [agent_history](agent_history.md) | | -| parentThreadId | varchar(128) | | true | | | | -| parentAgentId | varchar(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agent_execution_threads_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_agent_execution_threads_taskVersionId | CREATE INDEX "IDX_agent_execution_threads_taskVersionId" ON "agent_execution_threads" ("taskVersionId") | | IDX_0468a9dc35597314e641d4722a | CREATE INDEX "IDX_0468a9dc35597314e641d4722a" ON "agent_execution_threads" ("agentId") | | IDX_0e2f8bf92a7a9c88b89670f701 | CREATE INDEX "IDX_0e2f8bf92a7a9c88b89670f701" ON "agent_execution_threads" ("projectId") | +| IDX_agent_execution_threads_taskVersionId | CREATE INDEX "IDX_agent_execution_threads_taskVersionId" ON "agent_execution_threads" ("taskVersionId") | | sqlite_autoindex_agent_execution_threads_1 | PRIMARY KEY (id) | ## Relations @@ -57,87 +57,87 @@ CREATE TABLE "agent_execution_threads" ("id" varchar(128) PRIMARY KEY NOT NULL, ```mermaid erDiagram -"agent_execution" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_execution" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "agent_execution_threads" { - varchar_128_ id PK varchar_36_ agentId FK varchar_255_ agentName + datetime_3_ createdAt + varchar_8_ emoji + varchar_128_ id PK + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK INTEGER sessionNumber - INTEGER totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title INTEGER totalCompletionTokens REAL totalCost INTEGER totalDuration - varchar_255_ title - varchar_8_ emoji - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId -} -"agent_execution" { - varchar_36_ id PK - varchar_128_ threadId FK - varchar_16_ status - datetime_3_ startedAt - datetime_3_ stoppedAt - INTEGER duration - TEXT userMessage - TEXT assistantResponse - varchar_255_ model - INTEGER promptTokens - INTEGER completionTokens - INTEGER totalTokens - REAL cost - TEXT toolCalls - TEXT timeline - TEXT error - varchar_16_ hitlStatus - varchar_32_ source - datetime_3_ createdAt + INTEGER totalPromptTokens datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId +} +"agent_execution" { + TEXT assistantResponse + INTEGER completionTokens + REAL cost + datetime_3_ createdAt + INTEGER duration + TEXT error + varchar_16_ hitlStatus + varchar_36_ id PK + varchar_255_ model + INTEGER promptTokens + varchar_32_ source + datetime_3_ startedAt + varchar_16_ status + datetime_3_ stoppedAt + varchar_128_ threadId FK + TEXT timeline + TEXT toolCalls + INTEGER totalTokens + datetime_3_ updatedAt + TEXT userMessage } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } "agent_history" { - varchar_36_ versionId PK varchar_36_ agentId FK - TEXT schema - TEXT tools - TEXT skills - varchar publishedById FK varchar_255_ author datetime_3_ createdAt + varchar publishedById FK + TEXT schema + TEXT skills + TEXT tools datetime_3_ updatedAt + varchar_36_ versionId PK } ``` diff --git a/docs/generated/sqlite-schema/agent_files.md b/docs/generated/sqlite-schema/agent_files.md index c74026e5f2b..ceec4f76093 100644 --- a/docs/generated/sqlite-schema/agent_files.md +++ b/docs/generated/sqlite-schema/agent_files.md @@ -15,21 +15,21 @@ CREATE TABLE "agent_files" ("id" varchar(16) PRIMARY KEY NOT NULL, "agentId" var | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(16) | | false | | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | | binaryDataId | TEXT | | false | | | | -| fileName | varchar(255) | | false | | | | -| mimeType | varchar(255) | | false | | | | -| fileSizeBytes | INTEGER | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| fileName | varchar(255) | | false | | | | +| fileSizeBytes | INTEGER | | false | | | | +| id | varchar(16) | | false | | | | +| mimeType | varchar(255) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agent_files_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -47,28 +47,28 @@ erDiagram "agent_files" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_files" { - varchar_16_ id PK varchar_36_ agentId FK TEXT binaryDataId - varchar_255_ fileName - varchar_255_ mimeType - INTEGER fileSizeBytes datetime_3_ createdAt + varchar_255_ fileName + INTEGER fileSizeBytes + varchar_16_ id PK + varchar_255_ mimeType datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/agent_history.md b/docs/generated/sqlite-schema/agent_history.md index 758505f27c6..d6bea1466bd 100644 --- a/docs/generated/sqlite-schema/agent_history.md +++ b/docs/generated/sqlite-schema/agent_history.md @@ -15,24 +15,24 @@ CREATE TABLE "agent_history" ("versionId" varchar(36) PRIMARY KEY NOT NULL, "age | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| versionId | varchar(36) | | false | [agents](agents.md) [agent_task_snapshot](agent_task_snapshot.md) [agent_execution_threads](agent_execution_threads.md) | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| schema | TEXT | | true | | | | -| tools | TEXT | | true | | | | -| skills | TEXT | | true | | | | -| publishedById | varchar | | true | | [user](user.md) | | | author | varchar(255) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| publishedById | varchar | | true | | [user](user.md) | | +| schema | TEXT | | true | | | | +| skills | TEXT | | true | | | | +| tools | TEXT | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| versionId | varchar(36) | | false | [agent_execution_threads](agent_execution_threads.md) [agent_task_snapshot](agent_task_snapshot.md) [agents](agents.md) | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| versionId | PRIMARY KEY | PRIMARY KEY (versionId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_agent_history_1 | PRIMARY KEY | PRIMARY KEY (versionId) | +| versionId | PRIMARY KEY | PRIMARY KEY (versionId) | ## Indexes @@ -46,82 +46,82 @@ CREATE TABLE "agent_history" ("versionId" varchar(36) PRIMARY KEY NOT NULL, "age ```mermaid erDiagram -"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agent_execution_threads" }o--o| "agent_history" : "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "agent_history" { - varchar_36_ versionId PK varchar_36_ agentId FK - TEXT schema - TEXT tools - TEXT skills - varchar publishedById FK varchar_255_ author datetime_3_ createdAt + varchar publishedById FK + TEXT schema + TEXT skills + TEXT tools datetime_3_ updatedAt + varchar_36_ versionId PK } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK -} -"agent_task_snapshot" { - varchar_36_ versionId PK - varchar_32_ taskId PK - boolean enabled - varchar_128_ name - TEXT objective - varchar_128_ cronExpression datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId +} +"user" { + datetime_3_ createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + varchar id PK + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret + varchar password + TEXT personalizationAnswers + varchar_128_ roleSlug FK + TEXT settings datetime_3_ updatedAt } "agent_execution_threads" { - varchar_128_ id PK varchar_36_ agentId FK varchar_255_ agentName + datetime_3_ createdAt + varchar_8_ emoji + varchar_128_ id PK + varchar_36_ parentAgentId + varchar_128_ parentThreadId varchar_255_ projectId FK INTEGER sessionNumber - INTEGER totalPromptTokens + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title INTEGER totalCompletionTokens REAL totalCost INTEGER totalDuration - varchar_255_ title - varchar_8_ emoji - datetime_3_ createdAt + INTEGER totalPromptTokens datetime_3_ updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId } -"user" { - varchar id PK - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar password - TEXT personalizationAnswers +"agent_task_snapshot" { datetime_3_ createdAt + varchar_128_ cronExpression + boolean enabled + varchar_128_ name + TEXT objective + varchar_32_ taskId PK datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK + varchar_36_ versionId PK } ``` diff --git a/docs/generated/sqlite-schema/agent_task_definition.md b/docs/generated/sqlite-schema/agent_task_definition.md index 224e847c7ec..91f700e1e37 100644 --- a/docs/generated/sqlite-schema/agent_task_definition.md +++ b/docs/generated/sqlite-schema/agent_task_definition.md @@ -15,20 +15,20 @@ CREATE TABLE "agent_task_definition" ("id" varchar(32) PRIMARY KEY NOT NULL, "ag | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(32) | | false | | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| cronExpression | varchar(128) | | false | | | | +| id | varchar(32) | | false | | | | | name | varchar(128) | | false | | | | | objective | TEXT | | false | | | | -| cronExpression | varchar(128) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agent_task_definition_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -46,27 +46,27 @@ erDiagram "agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_task_definition" { - varchar_32_ id PK varchar_36_ agentId FK + datetime_3_ createdAt + varchar_128_ cronExpression + varchar_32_ id PK varchar_128_ name TEXT objective - varchar_128_ cronExpression - datetime_3_ createdAt datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/agent_task_run_lock.md b/docs/generated/sqlite-schema/agent_task_run_lock.md index c8b1e135e56..f236f8bbdef 100644 --- a/docs/generated/sqlite-schema/agent_task_run_lock.md +++ b/docs/generated/sqlite-schema/agent_task_run_lock.md @@ -16,20 +16,20 @@ CREATE TABLE "agent_task_run_lock" ("agentId" varchar(36) NOT NULL, "taskId" var | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| taskId | varchar(32) | | false | | | | -| holderId | varchar | | false | | | | -| heldUntil | datetime(3) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| heldUntil | datetime(3) | | false | | | | +| holderId | varchar | | false | | | | +| taskId | varchar(32) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| taskId | PRIMARY KEY | PRIMARY KEY (taskId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | | sqlite_autoindex_agent_task_run_lock_1 | PRIMARY KEY | PRIMARY KEY (agentId, taskId) | +| taskId | PRIMARY KEY | PRIMARY KEY (taskId) | ## Indexes @@ -46,25 +46,25 @@ erDiagram "agent_task_run_lock" { varchar_36_ agentId PK - varchar_32_ taskId PK - varchar holderId - datetime_3_ heldUntil datetime_3_ createdAt + datetime_3_ heldUntil + varchar holderId + varchar_32_ taskId PK datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/agent_task_snapshot.md b/docs/generated/sqlite-schema/agent_task_snapshot.md index 6cf1f0c14ac..96801b8dd5f 100644 --- a/docs/generated/sqlite-schema/agent_task_snapshot.md +++ b/docs/generated/sqlite-schema/agent_task_snapshot.md @@ -15,23 +15,23 @@ CREATE TABLE "agent_task_snapshot" ("versionId" varchar(36) NOT NULL, "taskId" v | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| versionId | varchar(36) | | false | | [agent_history](agent_history.md) | | -| taskId | varchar(32) | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| cronExpression | varchar(128) | | false | | | | | enabled | boolean | | false | | | | | name | varchar(128) | | false | | | | | objective | TEXT | | false | | | | -| cronExpression | varchar(128) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| taskId | varchar(32) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| versionId | varchar(36) | | false | | [agent_history](agent_history.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| versionId | PRIMARY KEY | PRIMARY KEY (versionId) | -| taskId | PRIMARY KEY | PRIMARY KEY (taskId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_agent_task_snapshot_1 | PRIMARY KEY | PRIMARY KEY (versionId, taskId) | +| taskId | PRIMARY KEY | PRIMARY KEY (taskId) | +| versionId | PRIMARY KEY | PRIMARY KEY (versionId) | ## Indexes @@ -47,25 +47,25 @@ erDiagram "agent_task_snapshot" |o--|| "agent_history" : "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_task_snapshot" { - varchar_36_ versionId PK - varchar_32_ taskId PK + datetime_3_ createdAt + varchar_128_ cronExpression boolean enabled varchar_128_ name TEXT objective - varchar_128_ cronExpression - datetime_3_ createdAt + varchar_32_ taskId PK datetime_3_ updatedAt + varchar_36_ versionId PK } "agent_history" { - varchar_36_ versionId PK varchar_36_ agentId FK - TEXT schema - TEXT tools - TEXT skills - varchar publishedById FK varchar_255_ author datetime_3_ createdAt + varchar publishedById FK + TEXT schema + TEXT skills + TEXT tools datetime_3_ updatedAt + varchar_36_ versionId PK } ``` diff --git a/docs/generated/sqlite-schema/agents.md b/docs/generated/sqlite-schema/agents.md index 5e324ce87f1..0fadf6464d4 100644 --- a/docs/generated/sqlite-schema/agents.md +++ b/docs/generated/sqlite-schema/agents.md @@ -15,34 +15,34 @@ CREATE TABLE "agents" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128 | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [agent_checkpoints](agent_checkpoints.md) [agents_observations](agents_observations.md) [agents_observation_cursors](agents_observation_cursors.md) [agents_observation_locks](agents_observation_locks.md) [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_locks](agents_memory_entry_locks.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_memory_entry_cursors](agents_memory_entry_cursors.md) [agent_history](agent_history.md) [agent_files](agent_files.md) [agent_task_definition](agent_task_definition.md) [agent_task_run_lock](agent_task_run_lock.md) [agent_execution_threads](agent_execution_threads.md) [agent_chat_subscriptions](agent_chat_subscriptions.md) | | | -| name | varchar(128) | | false | | | | -| description | varchar(512) | | true | | | | -| projectId | varchar(255) | | false | | [project](project.md) | | -| integrations | TEXT | '[]' | false | | | | -| schema | TEXT | | true | | | | -| tools | TEXT | '{}' | false | | | | -| skills | TEXT | '{}' | false | | | | -| versionId | varchar(36) | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | activeVersionId | varchar(36) | | true | | [agent_history](agent_history.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| description | varchar(512) | | true | | | | +| id | varchar(36) | | false | [agent_chat_subscriptions](agent_chat_subscriptions.md) [agent_checkpoints](agent_checkpoints.md) [agent_execution_threads](agent_execution_threads.md) [agent_files](agent_files.md) [agent_history](agent_history.md) [agent_task_definition](agent_task_definition.md) [agent_task_run_lock](agent_task_run_lock.md) [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_cursors](agents_memory_entry_cursors.md) [agents_memory_entry_locks](agents_memory_entry_locks.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_observation_cursors](agents_observation_cursors.md) [agents_observation_locks](agents_observation_locks.md) [agents_observations](agents_observations.md) | | | +| integrations | TEXT | '[]' | false | | | | +| name | varchar(128) | | false | | | | +| projectId | varchar(255) | | false | | [project](project.md) | | +| schema | TEXT | | true | | | | +| skills | TEXT | '{}' | false | | | | +| tools | TEXT | '{}' | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| versionId | varchar(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agents_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_agents_projectId | CREATE INDEX "IDX_agents_projectId" ON "agents" ("projectId") | | IDX_a30d560207c4071d98aa03c179 | CREATE INDEX "IDX_a30d560207c4071d98aa03c179" ON "agents" ("projectId") | +| IDX_agents_projectId | CREATE INDEX "IDX_agents_projectId" ON "agents" ("projectId") | | sqlite_autoindex_agents_1 | PRIMARY KEY (id) | ## Relations @@ -50,192 +50,192 @@ CREATE TABLE "agents" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128 ```mermaid erDiagram +"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agent_chat_subscriptions" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_checkpoints" }o--o| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observation_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observation_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entries" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_files" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agent_history" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_task_definition" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agent_task_run_lock" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_execution_threads" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_chat_subscriptions" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entries" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observation_cursors" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observation_locks" |o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents" }o--o| "agent_history" : "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK -} -"agent_checkpoints" { - varchar_255_ runId PK - varchar_255_ agentId FK - TEXT state - boolean expired datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observations" { + varchar_512_ description varchar_36_ id PK - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_16_ marker - TEXT text - varchar_36_ parentId FK - INTEGER tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observation_cursors" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observation_locks" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entries" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_255_ resourceId FK - TEXT content - varchar_64_ contentHash - varchar_16_ status - varchar_36_ supersededBy FK - varchar_128_ embeddingModel - TEXT embedding - TEXT metadata - datetime_3_ lastSeenAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_locks" { - varchar_36_ agentId PK - varchar_255_ resourceId PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_sources" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - TEXT evidenceText - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_cursors" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastIndexedObservationId - datetime_3_ lastIndexedObservationCreatedAt - datetime_3_ createdAt + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools datetime_3_ updatedAt + varchar_36_ versionId } "agent_history" { - varchar_36_ versionId PK varchar_36_ agentId FK - TEXT schema - TEXT tools - TEXT skills - varchar publishedById FK varchar_255_ author datetime_3_ createdAt + varchar publishedById FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId PK +} +"agent_chat_subscriptions" { + varchar_36_ agentId PK + datetime_3_ createdAt + varchar_255_ credentialId PK + varchar_64_ integrationType PK + varchar_255_ threadId PK + datetime_3_ updatedAt +} +"agent_checkpoints" { + varchar_255_ agentId FK + datetime_3_ createdAt + boolean expired + varchar_255_ runId PK + TEXT state + datetime_3_ updatedAt +} +"agent_execution_threads" { + varchar_36_ agentId FK + varchar_255_ agentName + datetime_3_ createdAt + varchar_8_ emoji + varchar_128_ id PK + varchar_36_ parentAgentId + varchar_128_ parentThreadId + varchar_255_ projectId FK + INTEGER sessionNumber + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title + INTEGER totalCompletionTokens + REAL totalCost + INTEGER totalDuration + INTEGER totalPromptTokens datetime_3_ updatedAt } "agent_files" { - varchar_16_ id PK varchar_36_ agentId FK TEXT binaryDataId - varchar_255_ fileName - varchar_255_ mimeType - INTEGER fileSizeBytes datetime_3_ createdAt + varchar_255_ fileName + INTEGER fileSizeBytes + varchar_16_ id PK + varchar_255_ mimeType datetime_3_ updatedAt } "agent_task_definition" { - varchar_32_ id PK varchar_36_ agentId FK + datetime_3_ createdAt + varchar_128_ cronExpression + varchar_32_ id PK varchar_128_ name TEXT objective - varchar_128_ cronExpression - datetime_3_ createdAt datetime_3_ updatedAt } "agent_task_run_lock" { varchar_36_ agentId PK - varchar_32_ taskId PK - varchar holderId + datetime_3_ createdAt datetime_3_ heldUntil - datetime_3_ createdAt + varchar holderId + varchar_32_ taskId PK datetime_3_ updatedAt } -"agent_execution_threads" { - varchar_128_ id PK +"agents_memory_entries" { varchar_36_ agentId FK - varchar_255_ agentName - varchar_255_ projectId FK - INTEGER sessionNumber - INTEGER totalPromptTokens - INTEGER totalCompletionTokens - REAL totalCost - INTEGER totalDuration - varchar_255_ title - varchar_8_ emoji + TEXT content + varchar_64_ contentHash datetime_3_ createdAt + TEXT embedding + varchar_128_ embeddingModel + varchar_36_ id PK + datetime_3_ lastSeenAt + TEXT metadata + varchar_255_ resourceId FK + varchar_16_ status + varchar_36_ supersededBy FK datetime_3_ updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId } -"agent_chat_subscriptions" { +"agents_memory_entry_cursors" { varchar_36_ agentId PK - varchar_64_ integrationType PK - varchar_255_ credentialId PK - varchar_255_ threadId PK datetime_3_ createdAt + datetime_3_ lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId PK + datetime_3_ updatedAt +} +"agents_memory_entry_locks" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ resourceId PK + datetime_3_ updatedAt +} +"agents_memory_entry_sources" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_64_ evidenceHash + TEXT evidenceText + varchar_36_ id PK + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + datetime_3_ updatedAt +} +"agents_observation_cursors" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId PK + datetime_3_ updatedAt +} +"agents_observation_locks" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ observationScopeId PK + varchar_20_ taskKind PK + datetime_3_ updatedAt +} +"agents_observations" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_36_ id PK + varchar_16_ marker + varchar_255_ observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + TEXT text + INTEGER tokenCount datetime_3_ updatedAt } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } ``` diff --git a/docs/generated/sqlite-schema/agents_memory_entries.md b/docs/generated/sqlite-schema/agents_memory_entries.md index 3401aeb30e0..997002e466a 100644 --- a/docs/generated/sqlite-schema/agents_memory_entries.md +++ b/docs/generated/sqlite-schema/agents_memory_entries.md @@ -15,30 +15,30 @@ CREATE TABLE "agents_memory_entries" ("id" varchar(36) PRIMARY KEY NOT NULL, "ag | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| resourceId | varchar(255) | | false | | [agents_resources](agents_resources.md) | | | content | TEXT | | false | | | | | contentHash | varchar(64) | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| embedding | TEXT | | true | | | | +| embeddingModel | varchar(128) | | true | | | | +| id | varchar(36) | | false | [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) | | | +| lastSeenAt | datetime(3) | | false | | | | +| metadata | TEXT | | true | | | | +| resourceId | varchar(255) | | false | | [agents_resources](agents_resources.md) | | | status | varchar(16) | | false | | | | | supersededBy | varchar(36) | | true | | [agents_memory_entries](agents_memory_entries.md) | | -| embeddingModel | varchar(128) | | true | | | | -| embedding | TEXT | | true | | | | -| metadata | TEXT | | true | | | | -| lastSeenAt | datetime(3) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | +| - | CHECK | CHECK ("status" IN ('active', 'superseded', 'dropped')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agents_memory_entries_1 | PRIMARY KEY | PRIMARY KEY (id) | -| - | CHECK | CHECK ("status" IN ('active', 'superseded', 'dropped')) | ## Indexes @@ -55,55 +55,55 @@ CREATE TABLE "agents_memory_entries" ("id" varchar(36) PRIMARY KEY NOT NULL, "ag ```mermaid erDiagram +"agents_memory_entries" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_memory_entries" }o--o| "agents_memory_entries" : "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "agents_memory_entry_sources" }o--|| "agents_memory_entries" : "FOREIGN KEY (memoryEntryId) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entries" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_memory_entries" }o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_memory_entries" { - varchar_36_ id PK varchar_36_ agentId FK - varchar_255_ resourceId FK TEXT content varchar_64_ contentHash + datetime_3_ createdAt + TEXT embedding + varchar_128_ embeddingModel + varchar_36_ id PK + datetime_3_ lastSeenAt + TEXT metadata + varchar_255_ resourceId FK varchar_16_ status varchar_36_ supersededBy FK - varchar_128_ embeddingModel - TEXT embedding - TEXT metadata - datetime_3_ lastSeenAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_sources" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - TEXT evidenceText - datetime_3_ createdAt datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId +} +"agents_memory_entry_sources" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_64_ evidenceHash + TEXT evidenceText + varchar_36_ id PK + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + datetime_3_ updatedAt } "agents_resources" { + datetime_3_ createdAt varchar_255_ id PK TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_memory_entry_cursors.md b/docs/generated/sqlite-schema/agents_memory_entry_cursors.md index a59ae35f6e2..688ec514214 100644 --- a/docs/generated/sqlite-schema/agents_memory_entry_cursors.md +++ b/docs/generated/sqlite-schema/agents_memory_entry_cursors.md @@ -16,20 +16,20 @@ CREATE TABLE "agents_memory_entry_cursors" ("agentId" varchar(36) NOT NULL, "obs | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | -| lastIndexedObservationId | varchar(36) | | false | | | | -| lastIndexedObservationCreatedAt | datetime(3) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| lastIndexedObservationCreatedAt | datetime(3) | | false | | | | +| lastIndexedObservationId | varchar(36) | | false | | | | +| observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | +| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | sqlite_autoindex_agents_memory_entry_cursors_1 | PRIMARY KEY | PRIMARY KEY (agentId, observationScopeId) | ## Indexes @@ -49,32 +49,32 @@ erDiagram "agents_memory_entry_cursors" { varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastIndexedObservationId - datetime_3_ lastIndexedObservationCreatedAt datetime_3_ createdAt + datetime_3_ lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId PK datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_memory_entry_locks.md b/docs/generated/sqlite-schema/agents_memory_entry_locks.md index d26db73bfed..af3b3a1d42c 100644 --- a/docs/generated/sqlite-schema/agents_memory_entry_locks.md +++ b/docs/generated/sqlite-schema/agents_memory_entry_locks.md @@ -16,20 +16,20 @@ CREATE TABLE "agents_memory_entry_locks" ("agentId" varchar(36) NOT NULL, "resou | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| resourceId | varchar(255) | | false | | [agents_resources](agents_resources.md) | | -| holderId | varchar(64) | | false | | | | -| heldUntil | datetime(3) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| heldUntil | datetime(3) | | false | | | | +| holderId | varchar(64) | | false | | | | +| resourceId | varchar(255) | | false | | [agents_resources](agents_resources.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| resourceId | PRIMARY KEY | PRIMARY KEY (resourceId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | +| resourceId | PRIMARY KEY | PRIMARY KEY (resourceId) | | sqlite_autoindex_agents_memory_entry_locks_1 | PRIMARY KEY | PRIMARY KEY (agentId, resourceId) | ## Indexes @@ -49,30 +49,30 @@ erDiagram "agents_memory_entry_locks" { varchar_36_ agentId PK - varchar_255_ resourceId PK - varchar_64_ holderId - datetime_3_ heldUntil datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ resourceId PK datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } "agents_resources" { + datetime_3_ createdAt varchar_255_ id PK TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_memory_entry_sources.md b/docs/generated/sqlite-schema/agents_memory_entry_sources.md index ae007dc0c67..9b76671b4e1 100644 --- a/docs/generated/sqlite-schema/agents_memory_entry_sources.md +++ b/docs/generated/sqlite-schema/agents_memory_entry_sources.md @@ -15,25 +15,25 @@ CREATE TABLE "agents_memory_entry_sources" ("id" varchar(36) PRIMARY KEY NOT NUL | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| evidenceHash | varchar(64) | | false | | | | +| evidenceText | TEXT | | false | | | | +| id | varchar(36) | | false | | | | | memoryEntryId | varchar(36) | | false | | [agents_memory_entries](agents_memory_entries.md) | | | observationId | varchar(36) | | false | | [agents_observations](agents_observations.md) | | | threadId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | -| evidenceHash | varchar(64) | | false | | | | -| evidenceText | TEXT | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (memoryEntryId) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 3) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agents_memory_entry_sources_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -41,9 +41,9 @@ CREATE TABLE "agents_memory_entry_sources" ("id" varchar(36) PRIMARY KEY NOT NUL | Name | Definition | | ---- | ---------- | | IDX_451d387a182fa8dd8002dfc3a7 | CREATE INDEX "IDX_451d387a182fa8dd8002dfc3a7" ON "agents_memory_entry_sources" ("threadId") | -| IDX_f9573af4ed653f13b0ba1f7b12 | CREATE INDEX "IDX_f9573af4ed653f13b0ba1f7b12" ON "agents_memory_entry_sources" ("agentId", "threadId") | -| IDX_cb7c15d22fd068a0806aa57fc0 | CREATE INDEX "IDX_cb7c15d22fd068a0806aa57fc0" ON "agents_memory_entry_sources" ("observationId") | | IDX_a353ac251315ef0af6ad3c9f0a | CREATE UNIQUE INDEX "IDX_a353ac251315ef0af6ad3c9f0a" ON "agents_memory_entry_sources" ("memoryEntryId", "observationId", "evidenceHash") | +| IDX_cb7c15d22fd068a0806aa57fc0 | CREATE INDEX "IDX_cb7c15d22fd068a0806aa57fc0" ON "agents_memory_entry_sources" ("observationId") | +| IDX_f9573af4ed653f13b0ba1f7b12 | CREATE INDEX "IDX_f9573af4ed653f13b0ba1f7b12" ON "agents_memory_entry_sources" ("agentId", "threadId") | | sqlite_autoindex_agents_memory_entry_sources_1 | PRIMARY KEY (id) | ## Relations @@ -57,64 +57,64 @@ erDiagram "agents_memory_entry_sources" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_memory_entry_sources" { - varchar_36_ id PK varchar_36_ agentId FK + datetime_3_ createdAt + varchar_64_ evidenceHash + TEXT evidenceText + varchar_36_ id PK varchar_36_ memoryEntryId FK varchar_36_ observationId FK varchar_255_ threadId FK - varchar_64_ evidenceHash - TEXT evidenceText - datetime_3_ createdAt datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } "agents_memory_entries" { - varchar_36_ id PK varchar_36_ agentId FK - varchar_255_ resourceId FK TEXT content varchar_64_ contentHash + datetime_3_ createdAt + TEXT embedding + varchar_128_ embeddingModel + varchar_36_ id PK + datetime_3_ lastSeenAt + TEXT metadata + varchar_255_ resourceId FK varchar_16_ status varchar_36_ supersededBy FK - varchar_128_ embeddingModel - TEXT embedding - TEXT metadata - datetime_3_ lastSeenAt - datetime_3_ createdAt datetime_3_ updatedAt } "agents_observations" { - varchar_36_ id PK varchar_36_ agentId FK - varchar_255_ observationScopeId FK + datetime_3_ createdAt + varchar_36_ id PK varchar_16_ marker - TEXT text + varchar_255_ observationScopeId FK varchar_36_ parentId FK - INTEGER tokenCount varchar_16_ status varchar_36_ supersededBy FK - datetime_3_ createdAt + TEXT text + INTEGER tokenCount datetime_3_ updatedAt } "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_messages.md b/docs/generated/sqlite-schema/agents_messages.md index 32bfa47f145..15fd9b3c45d 100644 --- a/docs/generated/sqlite-schema/agents_messages.md +++ b/docs/generated/sqlite-schema/agents_messages.md @@ -15,21 +15,21 @@ CREATE TABLE "agents_messages" ("id" varchar(36) PRIMARY KEY NOT NULL, "threadId | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | -| resourceId | varchar(255) | | false | | | | -| role | varchar(36) | | false | | | | -| type | varchar(36) | | true | | | | | content | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | | | | +| resourceId | varchar(255) | | false | | | | +| role | varchar(36) | | false | | | | +| threadId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | +| type | varchar(36) | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agents_messages_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -48,21 +48,21 @@ erDiagram "agents_messages" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_messages" { - varchar_36_ id PK - varchar_255_ threadId FK - varchar_255_ resourceId - varchar_36_ role - varchar_36_ type TEXT content datetime_3_ createdAt + varchar_36_ id PK + varchar_255_ resourceId + varchar_36_ role + varchar_255_ threadId FK + varchar_36_ type datetime_3_ updatedAt } "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_observation_cursors.md b/docs/generated/sqlite-schema/agents_observation_cursors.md index 8109c55ae9e..342f9a44edb 100644 --- a/docs/generated/sqlite-schema/agents_observation_cursors.md +++ b/docs/generated/sqlite-schema/agents_observation_cursors.md @@ -16,20 +16,20 @@ CREATE TABLE "agents_observation_cursors" ("agentId" varchar(36) NOT NULL, "obse | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | -| lastObservedMessageId | varchar(36) | | false | | | | -| lastObservedAt | datetime(3) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| lastObservedAt | datetime(3) | | false | | | | +| lastObservedMessageId | varchar(36) | | false | | | | +| observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | +| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | sqlite_autoindex_agents_observation_cursors_1 | PRIMARY KEY | PRIMARY KEY (agentId, observationScopeId) | ## Indexes @@ -49,32 +49,32 @@ erDiagram "agents_observation_cursors" { varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId PK datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_observation_locks.md b/docs/generated/sqlite-schema/agents_observation_locks.md index ed3ae19700e..47feee013d2 100644 --- a/docs/generated/sqlite-schema/agents_observation_locks.md +++ b/docs/generated/sqlite-schema/agents_observation_locks.md @@ -16,24 +16,24 @@ CREATE TABLE "agents_observation_locks" ("agentId" varchar(36) NOT NULL, "observ | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | agentId | varchar(36) | | false | | [agents](agents.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| heldUntil | datetime(3) | | false | | | | +| holderId | varchar(64) | | false | | | | | observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | | taskKind | varchar(20) | | false | | | | -| holderId | varchar(64) | | false | | | | -| heldUntil | datetime(3) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | -| taskKind | PRIMARY KEY | PRIMARY KEY (taskKind) | +| - | CHECK | CHECK ("taskKind" IN ('observer', 'reflector')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | +| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | sqlite_autoindex_agents_observation_locks_1 | PRIMARY KEY | PRIMARY KEY (agentId, observationScopeId, taskKind) | -| - | CHECK | CHECK ("taskKind" IN ('observer', 'reflector')) | +| taskKind | PRIMARY KEY | PRIMARY KEY (taskKind) | ## Indexes @@ -52,33 +52,33 @@ erDiagram "agents_observation_locks" { varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId varchar_255_ observationScopeId PK varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId } "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_observations.md b/docs/generated/sqlite-schema/agents_observations.md index 0633e2bab21..a40590d30f3 100644 --- a/docs/generated/sqlite-schema/agents_observations.md +++ b/docs/generated/sqlite-schema/agents_observations.md @@ -15,39 +15,39 @@ CREATE TABLE "agents_observations" ("id" varchar(36) PRIMARY KEY NOT NULL, "agen | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [agents_observations](agents_observations.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) | | | | agentId | varchar(36) | | false | | [agents](agents.md) | | -| observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_observations](agents_observations.md) | | | | marker | varchar(16) | | false | | | | -| text | TEXT | | false | | | | +| observationScopeId | varchar(255) | | false | | [agents_threads](agents_threads.md) | | | parentId | varchar(36) | | true | | [agents_observations](agents_observations.md) | | -| tokenCount | INTEGER | 0 | false | | | | | status | varchar(16) | | false | | | | | supersededBy | varchar(36) | | true | | [agents_observations](agents_observations.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| text | TEXT | | false | | | | +| tokenCount | INTEGER | 0 | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | +| - | CHECK | CHECK ("marker" IN ('critical', 'important', 'info', 'completion')) | +| - | CHECK | CHECK ("status" IN ('active', 'superseded', 'dropped')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (supersededBy) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (parentId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 3) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_agents_observations_1 | PRIMARY KEY | PRIMARY KEY (id) | -| - | CHECK | CHECK ("marker" IN ('critical', 'important', 'info', 'completion')) | -| - | CHECK | CHECK ("status" IN ('active', 'superseded', 'dropped')) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_127ee1078ffa952bb37b511efa | CREATE INDEX "IDX_127ee1078ffa952bb37b511efa" ON "agents_observations" ("supersededBy") | -| IDX_501e2d1701a10e24fb69ab5fc5 | CREATE INDEX "IDX_501e2d1701a10e24fb69ab5fc5" ON "agents_observations" ("parentId") | -| IDX_4cfd8a70ebb0a5b0cf047dca3c | CREATE INDEX "IDX_4cfd8a70ebb0a5b0cf047dca3c" ON "agents_observations" ("observationScopeId") | | IDX_07cb1e4a302629c5fa5d74d2bb | CREATE INDEX "IDX_07cb1e4a302629c5fa5d74d2bb" ON "agents_observations" ("agentId", "observationScopeId", "status") | +| IDX_127ee1078ffa952bb37b511efa | CREATE INDEX "IDX_127ee1078ffa952bb37b511efa" ON "agents_observations" ("supersededBy") | +| IDX_4cfd8a70ebb0a5b0cf047dca3c | CREATE INDEX "IDX_4cfd8a70ebb0a5b0cf047dca3c" ON "agents_observations" ("observationScopeId") | +| IDX_501e2d1701a10e24fb69ab5fc5 | CREATE INDEX "IDX_501e2d1701a10e24fb69ab5fc5" ON "agents_observations" ("parentId") | | sqlite_autoindex_agents_observations_1 | PRIMARY KEY (id) | ## Relations @@ -55,56 +55,56 @@ CREATE TABLE "agents_observations" ("id" varchar(36) PRIMARY KEY NOT NULL, "agen ```mermaid erDiagram +"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents_observations" : "FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_observations" }o--o| "agents_observations" : "FOREIGN KEY (supersededBy) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "agents_observations" }o--o| "agents_observations" : "FOREIGN KEY (parentId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents_observations" : "FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observations" }o--|| "agents" : "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_observations" }o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_observations" { - varchar_36_ id PK varchar_36_ agentId FK - varchar_255_ observationScopeId FK + datetime_3_ createdAt + varchar_36_ id PK varchar_16_ marker - TEXT text + varchar_255_ observationScopeId FK varchar_36_ parentId FK - INTEGER tokenCount varchar_16_ status varchar_36_ supersededBy FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_sources" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - TEXT evidenceText - datetime_3_ createdAt + TEXT text + INTEGER tokenCount datetime_3_ updatedAt } "agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ activeVersionId FK + datetime_3_ createdAt + varchar_512_ description + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools + datetime_3_ updatedAt + varchar_36_ versionId +} +"agents_memory_entry_sources" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_64_ evidenceHash + TEXT evidenceText + varchar_36_ id PK + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + datetime_3_ updatedAt } "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_resources.md b/docs/generated/sqlite-schema/agents_resources.md index 23e82de539d..9bcd8be08c4 100644 --- a/docs/generated/sqlite-schema/agents_resources.md +++ b/docs/generated/sqlite-schema/agents_resources.md @@ -15,9 +15,9 @@ CREATE TABLE "agents_resources" ("id" varchar(255) PRIMARY KEY NOT NULL, "metada | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | varchar(255) | | false | [agents_memory_entries](agents_memory_entries.md) [agents_memory_entry_locks](agents_memory_entry_locks.md) | | | | metadata | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -42,32 +42,32 @@ erDiagram "agents_memory_entry_locks" |o--|| "agents_resources" : "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_resources" { + datetime_3_ createdAt varchar_255_ id PK TEXT metadata - datetime_3_ createdAt datetime_3_ updatedAt } "agents_memory_entries" { - varchar_36_ id PK varchar_36_ agentId FK - varchar_255_ resourceId FK TEXT content varchar_64_ contentHash + datetime_3_ createdAt + TEXT embedding + varchar_128_ embeddingModel + varchar_36_ id PK + datetime_3_ lastSeenAt + TEXT metadata + varchar_255_ resourceId FK varchar_16_ status varchar_36_ supersededBy FK - varchar_128_ embeddingModel - TEXT embedding - TEXT metadata - datetime_3_ lastSeenAt - datetime_3_ createdAt datetime_3_ updatedAt } "agents_memory_entry_locks" { varchar_36_ agentId PK - varchar_255_ resourceId PK - varchar_64_ holderId - datetime_3_ heldUntil datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ resourceId PK datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/agents_threads.md b/docs/generated/sqlite-schema/agents_threads.md index e5e75d64161..e62190e9792 100644 --- a/docs/generated/sqlite-schema/agents_threads.md +++ b/docs/generated/sqlite-schema/agents_threads.md @@ -15,11 +15,11 @@ CREATE TABLE "agents_threads" ("id" varchar(128) PRIMARY KEY NOT NULL, "resource | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(128) | | false | [agents_messages](agents_messages.md) [agents_observations](agents_observations.md) [agents_observation_cursors](agents_observation_cursors.md) [agents_observation_locks](agents_observation_locks.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_memory_entry_cursors](agents_memory_entry_cursors.md) | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(128) | | false | [agents_memory_entry_cursors](agents_memory_entry_cursors.md) [agents_memory_entry_sources](agents_memory_entry_sources.md) [agents_messages](agents_messages.md) [agents_observation_cursors](agents_observation_cursors.md) [agents_observation_locks](agents_observation_locks.md) [agents_observations](agents_observations.md) | | | +| metadata | TEXT | | true | | | | | resourceId | varchar(255) | | false | | | | | title | varchar(255) | | true | | | | -| metadata | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -41,78 +41,78 @@ CREATE TABLE "agents_threads" ("id" varchar(128) PRIMARY KEY NOT NULL, "resource ```mermaid erDiagram +"agents_memory_entry_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_memory_entry_sources" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_messages" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_observations" }o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_observation_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_observation_locks" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_sources" }o--|| "agents_threads" : "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents_memory_entry_cursors" |o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents_observations" }o--|| "agents_threads" : "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "agents_threads" { + datetime_3_ createdAt varchar_128_ id PK + TEXT metadata varchar_255_ resourceId varchar_255_ title - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_messages" { - varchar_36_ id PK - varchar_255_ threadId FK - varchar_255_ resourceId - varchar_36_ role - varchar_36_ type - TEXT content - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observations" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_255_ observationScopeId FK - varchar_16_ marker - TEXT text - varchar_36_ parentId FK - INTEGER tokenCount - varchar_16_ status - varchar_36_ supersededBy FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observation_cursors" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_observation_locks" { - varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt - datetime_3_ updatedAt -} -"agents_memory_entry_sources" { - varchar_36_ id PK - varchar_36_ agentId FK - varchar_36_ memoryEntryId FK - varchar_36_ observationId FK - varchar_255_ threadId FK - varchar_64_ evidenceHash - TEXT evidenceText - datetime_3_ createdAt datetime_3_ updatedAt } "agents_memory_entry_cursors" { varchar_36_ agentId PK - varchar_255_ observationScopeId PK - varchar_36_ lastIndexedObservationId - datetime_3_ lastIndexedObservationCreatedAt datetime_3_ createdAt + datetime_3_ lastIndexedObservationCreatedAt + varchar_36_ lastIndexedObservationId + varchar_255_ observationScopeId PK + datetime_3_ updatedAt +} +"agents_memory_entry_sources" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_64_ evidenceHash + TEXT evidenceText + varchar_36_ id PK + varchar_36_ memoryEntryId FK + varchar_36_ observationId FK + varchar_255_ threadId FK + datetime_3_ updatedAt +} +"agents_messages" { + TEXT content + datetime_3_ createdAt + varchar_36_ id PK + varchar_255_ resourceId + varchar_36_ role + varchar_255_ threadId FK + varchar_36_ type + datetime_3_ updatedAt +} +"agents_observation_cursors" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar_255_ observationScopeId PK + datetime_3_ updatedAt +} +"agents_observation_locks" { + varchar_36_ agentId PK + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId + varchar_255_ observationScopeId PK + varchar_20_ taskKind PK + datetime_3_ updatedAt +} +"agents_observations" { + varchar_36_ agentId FK + datetime_3_ createdAt + varchar_36_ id PK + varchar_16_ marker + varchar_255_ observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + TEXT text + INTEGER tokenCount datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/ai_builder_temporary_workflow.md b/docs/generated/sqlite-schema/ai_builder_temporary_workflow.md index 6e83abff770..d13c73a6149 100644 --- a/docs/generated/sqlite-schema/ai_builder_temporary_workflow.md +++ b/docs/generated/sqlite-schema/ai_builder_temporary_workflow.md @@ -15,19 +15,19 @@ CREATE TABLE "ai_builder_temporary_workflow" ("workflowId" varchar(36) PRIMARY K | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_ai_builder_temporary_workflow_1 | PRIMARY KEY | PRIMARY KEY (workflowId) | +| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | ## Indexes @@ -41,45 +41,45 @@ CREATE TABLE "ai_builder_temporary_workflow" ("workflowId" varchar(36) PRIMARY K ```mermaid erDiagram -"ai_builder_temporary_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "ai_builder_temporary_workflow" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"ai_builder_temporary_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "ai_builder_temporary_workflow" { - varchar_36_ workflowId PK - varchar threadId FK datetime_3_ createdAt + varchar threadId FK + datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"instance_ai_threads" { + datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata + TEXT connections datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/annotation_tag_entity.md b/docs/generated/sqlite-schema/annotation_tag_entity.md index 86f4b1a83f6..d698191c0f9 100644 --- a/docs/generated/sqlite-schema/annotation_tag_entity.md +++ b/docs/generated/sqlite-schema/annotation_tag_entity.md @@ -15,9 +15,9 @@ CREATE TABLE "annotation_tag_entity" ("id" varchar(16) PRIMARY KEY NOT NULL, "na | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | varchar(16) | | false | [execution_annotation_tags](execution_annotation_tags.md) | | | | name | varchar(24) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -42,9 +42,9 @@ erDiagram "execution_annotation_tags" |o--|| "annotation_tag_entity" : "FOREIGN KEY (tagId) REFERENCES annotation_tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "annotation_tag_entity" { + datetime_3_ createdAt varchar_16_ id PK varchar_24_ name - datetime_3_ createdAt datetime_3_ updatedAt } "execution_annotation_tags" { diff --git a/docs/generated/sqlite-schema/auth_identity.md b/docs/generated/sqlite-schema/auth_identity.md index 1fb40334b5b..7516e809fac 100644 --- a/docs/generated/sqlite-schema/auth_identity.md +++ b/docs/generated/sqlite-schema/auth_identity.md @@ -22,19 +22,19 @@ CREATE TABLE "auth_identity" ( | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| userId | VARCHAR(36) | | true | | [user](user.md) | | +| createdAt | timestamp | CURRENT_TIMESTAMP | false | | | | | providerId | VARCHAR(64) | | false | | | | | providerType | VARCHAR(32) | | false | | | | -| createdAt | timestamp | CURRENT_TIMESTAMP | false | | | | | updatedAt | timestamp | CURRENT_TIMESTAMP | false | | | | +| userId | VARCHAR(36) | | true | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | providerId | PRIMARY KEY | PRIMARY KEY (providerId) | | providerType | PRIMARY KEY | PRIMARY KEY (providerType) | -| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | sqlite_autoindex_auth_identity_1 | PRIMARY KEY | PRIMARY KEY (providerId, providerType) | ## Indexes @@ -51,28 +51,28 @@ erDiagram "auth_identity" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "auth_identity" { - VARCHAR_36_ userId FK + timestamp createdAt VARCHAR_64_ providerId PK VARCHAR_32_ providerType PK - timestamp createdAt timestamp updatedAt + VARCHAR_36_ userId FK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/auth_provider_sync_history.md b/docs/generated/sqlite-schema/auth_provider_sync_history.md index 9546439304b..0c2ca0087d7 100644 --- a/docs/generated/sqlite-schema/auth_provider_sync_history.md +++ b/docs/generated/sqlite-schema/auth_provider_sync_history.md @@ -27,17 +27,17 @@ CREATE TABLE "auth_provider_sync_history" ( | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| created | INTEGER | | false | | | | +| disabled | INTEGER | | false | | | | +| endedAt | DATETIME | | false | | | | +| error | TEXT | | true | | | | | id | INTEGER | | true | | | | | providerType | VARCHAR(32) | | false | | | | | runMode | TEXT | | false | | | | -| status | TEXT | | false | | | | -| startedAt | DATETIME | | false | | | | -| endedAt | DATETIME | | false | | | | | scanned | INTEGER | | false | | | | -| created | INTEGER | | false | | | | +| startedAt | DATETIME | | false | | | | +| status | TEXT | | false | | | | | updated | INTEGER | | false | | | | -| disabled | INTEGER | | false | | | | -| error | TEXT | | true | | | | ## Constraints @@ -52,17 +52,17 @@ erDiagram "auth_provider_sync_history" { + INTEGER created + INTEGER disabled + DATETIME endedAt + TEXT error INTEGER id VARCHAR_32_ providerType TEXT runMode - TEXT status - DATETIME startedAt - DATETIME endedAt INTEGER scanned - INTEGER created + DATETIME startedAt + TEXT status INTEGER updated - INTEGER disabled - TEXT error } ``` diff --git a/docs/generated/sqlite-schema/binary_data.md b/docs/generated/sqlite-schema/binary_data.md index 5e1d097c78b..50403e36e30 100644 --- a/docs/generated/sqlite-schema/binary_data.md +++ b/docs/generated/sqlite-schema/binary_data.md @@ -15,23 +15,23 @@ CREATE TABLE "binary_data" ("fileId" varchar PRIMARY KEY NOT NULL, "sourceType" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| fileId | varchar | | false | | | | -| sourceType | varchar(50) | | false | | | | -| sourceId | varchar(255) | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | data | BLOB | | false | | | | -| mimeType | varchar(255) | | true | | | | +| fileId | varchar | | false | | | | | fileName | varchar(255) | | true | | | | | fileSize | INTEGER | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| mimeType | varchar(255) | | true | | | | +| sourceId | varchar(255) | | false | | | | +| sourceType | varchar(50) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| - | CHECK | CHECK ("sourceType" IN ('execution', 'chat_message_attachment', 'agent_file')) | | fileId | PRIMARY KEY | PRIMARY KEY (fileId) | | sqlite_autoindex_binary_data_1 | PRIMARY KEY | PRIMARY KEY (fileId) | -| - | CHECK | CHECK ("sourceType" IN ('execution', 'chat_message_attachment', 'agent_file')) | ## Indexes @@ -47,14 +47,14 @@ erDiagram "binary_data" { - varchar fileId PK - varchar_50_ sourceType - varchar_255_ sourceId + datetime_3_ createdAt BLOB data - varchar_255_ mimeType + varchar fileId PK varchar_255_ fileName INTEGER fileSize - datetime_3_ createdAt + varchar_255_ mimeType + varchar_255_ sourceId + varchar_50_ sourceType datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/chat_hub_agent_tools.md b/docs/generated/sqlite-schema/chat_hub_agent_tools.md index 6929e80b592..24e285b1413 100644 --- a/docs/generated/sqlite-schema/chat_hub_agent_tools.md +++ b/docs/generated/sqlite-schema/chat_hub_agent_tools.md @@ -22,11 +22,11 @@ CREATE TABLE "chat_hub_agent_tools" ("agentId" varchar NOT NULL, "toolId" varcha | Name | Type | Definition | | ---- | ---- | ---------- | -| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | -| toolId | PRIMARY KEY | PRIMARY KEY (toolId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| agentId | PRIMARY KEY | PRIMARY KEY (agentId) | | sqlite_autoindex_chat_hub_agent_tools_1 | PRIMARY KEY | PRIMARY KEY (agentId, toolId) | +| toolId | PRIMARY KEY | PRIMARY KEY (toolId) | ## Indexes @@ -47,29 +47,29 @@ erDiagram varchar toolId PK } "chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model datetime_3_ createdAt - datetime_3_ updatedAt - TEXT icon + varchar_36_ credentialId FK + varchar_512_ description TEXT files + TEXT icon + varchar id PK + varchar_64_ model + varchar_256_ name + varchar ownerId FK + varchar_16_ provider TEXT suggestedPrompts + TEXT systemPrompt + datetime_3_ updatedAt } "chat_hub_tools" { - varchar id PK - varchar_255_ name - varchar_255_ type - REAL typeVersion - varchar ownerId FK + datetime_3_ createdAt TEXT definition boolean enabled - datetime_3_ createdAt + varchar id PK + varchar_255_ name + varchar ownerId FK + varchar_255_ type + REAL typeVersion datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/chat_hub_agents.md b/docs/generated/sqlite-schema/chat_hub_agents.md index 7725ef4433e..7227a5c12e7 100644 --- a/docs/generated/sqlite-schema/chat_hub_agents.md +++ b/docs/generated/sqlite-schema/chat_hub_agents.md @@ -15,27 +15,27 @@ CREATE TABLE "chat_hub_agents" ("id" varchar PRIMARY KEY NOT NULL, "name" varcha | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [chat_hub_messages](chat_hub_messages.md) [chat_hub_agent_tools](chat_hub_agent_tools.md) [chat_hub_sessions](chat_hub_sessions.md) | | | -| name | varchar(256) | | false | | | | -| description | varchar(512) | | true | | | | -| systemPrompt | TEXT | | false | | | | -| ownerId | varchar | | false | | [user](user.md) | | -| credentialId | varchar(36) | | true | | [credentials_entity](credentials_entity.md) | | -| provider | varchar(16) | | false | | | | -| model | varchar(64) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| icon | TEXT | | true | | | | +| credentialId | varchar(36) | | true | | [credentials_entity](credentials_entity.md) | | +| description | varchar(512) | | true | | | | | files | TEXT | '[]' | false | | | | +| icon | TEXT | | true | | | | +| id | varchar | | false | [chat_hub_agent_tools](chat_hub_agent_tools.md) [chat_hub_messages](chat_hub_messages.md) [chat_hub_sessions](chat_hub_sessions.md) | | | +| model | varchar(64) | | false | | | | +| name | varchar(256) | | false | | | | +| ownerId | varchar | | false | | [user](user.md) | | +| provider | varchar(16) | | false | | | | | suggestedPrompts | TEXT | '[]' | false | | | | +| systemPrompt | TEXT | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_chat_hub_agents_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -49,94 +49,94 @@ CREATE TABLE "chat_hub_agents" ("id" varchar PRIMARY KEY NOT NULL, "name" varcha ```mermaid erDiagram -"chat_hub_messages" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"chat_hub_agents" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_agent_tools" |o--|| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_messages" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_sessions" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_agents" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_agents" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK + datetime_3_ createdAt varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT icon + varchar_512_ description TEXT files - TEXT suggestedPrompts -} -"chat_hub_messages" { + TEXT icon varchar id PK - varchar sessionId FK - varchar previousMessageId FK - varchar revisionOfMessageId FK - varchar retryOfMessageId FK - varchar_16_ type - varchar_128_ name - TEXT content + varchar_64_ model + varchar_256_ name + varchar ownerId FK varchar_16_ provider - varchar_36_ workflowId FK - INTEGER executionId FK - datetime_3_ createdAt + TEXT suggestedPrompts + TEXT systemPrompt + datetime_3_ updatedAt +} +"credentials_entity" { + datetime_3_ createdAt + TEXT data + varchar_36_ id PK + boolean isGlobal + boolean isManaged + boolean isResolvable + varchar_128_ name + boolean resolvableAllowFallback + varchar_16_ resolverId FK + varchar_32_ type datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_16_ status - TEXT attachments - VARCHAR_256_ model } "chat_hub_agent_tools" { varchar agentId PK varchar toolId PK } -"chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK +"chat_hub_messages" { + varchar_36_ agentId FK + TEXT attachments + TEXT content datetime_3_ createdAt + INTEGER executionId FK + varchar id PK + VARCHAR_256_ model + varchar_128_ name + varchar previousMessageId FK + varchar_16_ provider + varchar retryOfMessageId FK + varchar revisionOfMessageId FK + varchar sessionId FK + varchar_16_ status + varchar_16_ type datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"chat_hub_sessions" { varchar_36_ agentId FK varchar_128_ agentName + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type - datetime_3_ createdAt + TEXT settings datetime_3_ updatedAt - boolean isManaged - boolean isGlobal - boolean isResolvable - boolean resolvableAllowFallback - varchar_16_ resolverId FK } ``` diff --git a/docs/generated/sqlite-schema/chat_hub_messages.md b/docs/generated/sqlite-schema/chat_hub_messages.md index 573bf19132c..a7c48c7c1b4 100644 --- a/docs/generated/sqlite-schema/chat_hub_messages.md +++ b/docs/generated/sqlite-schema/chat_hub_messages.md @@ -15,29 +15,28 @@ CREATE TABLE "chat_hub_messages" ("id" varchar PRIMARY KEY NOT NULL, "sessionId" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [chat_hub_messages](chat_hub_messages.md) | | | -| sessionId | varchar | | false | | [chat_hub_sessions](chat_hub_sessions.md) | | -| previousMessageId | varchar | | true | | [chat_hub_messages](chat_hub_messages.md) | | -| revisionOfMessageId | varchar | | true | | [chat_hub_messages](chat_hub_messages.md) | | -| retryOfMessageId | varchar | | true | | [chat_hub_messages](chat_hub_messages.md) | | -| type | varchar(16) | | false | | | | -| name | varchar(128) | | false | | | | -| content | TEXT | | false | | | | -| provider | varchar(16) | | true | | | | -| workflowId | varchar(36) | | true | | [workflow_entity](workflow_entity.md) | | -| executionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | agentId | varchar(36) | | true | | [chat_hub_agents](chat_hub_agents.md) | | -| status | varchar(16) | 'success' | false | | | | | attachments | TEXT | | true | | | | +| content | TEXT | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| executionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | +| id | varchar | | false | [chat_hub_messages](chat_hub_messages.md) | | | | model | VARCHAR(256) | | true | | | | +| name | varchar(128) | | false | | | | +| previousMessageId | varchar | | true | | [chat_hub_messages](chat_hub_messages.md) | | +| provider | varchar(16) | | true | | | | +| retryOfMessageId | varchar | | true | | [chat_hub_messages](chat_hub_messages.md) | | +| revisionOfMessageId | varchar | | true | | [chat_hub_messages](chat_hub_messages.md) | | +| sessionId | varchar | | false | | [chat_hub_sessions](chat_hub_sessions.md) | | +| status | varchar(16) | 'success' | false | | | | +| type | varchar(16) | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | true | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (revisionOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | @@ -45,6 +44,7 @@ CREATE TABLE "chat_hub_messages" ("id" varchar PRIMARY KEY NOT NULL, "sessionId" | - (Foreign key ID: 4) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 5) | FOREIGN KEY | FOREIGN KEY (previousMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 6) | FOREIGN KEY | FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_chat_hub_messages_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -59,103 +59,103 @@ CREATE TABLE "chat_hub_messages" ("id" varchar PRIMARY KEY NOT NULL, "sessionId" ```mermaid erDiagram +"chat_hub_messages" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"chat_hub_messages" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" }o--o| "chat_hub_messages" : "FOREIGN KEY (revisionOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_messages" }o--o| "chat_hub_messages" : "FOREIGN KEY (retryOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_messages" }o--o| "chat_hub_messages" : "FOREIGN KEY (previousMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_messages" }o--|| "chat_hub_sessions" : "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_messages" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"chat_hub_messages" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"chat_hub_messages" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" { - varchar id PK - varchar sessionId FK - varchar previousMessageId FK - varchar revisionOfMessageId FK - varchar retryOfMessageId FK - varchar_16_ type - varchar_128_ name - TEXT content - varchar_16_ provider - varchar_36_ workflowId FK - INTEGER executionId FK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ agentId FK - varchar_16_ status TEXT attachments - VARCHAR_256_ model -} -"chat_hub_sessions" { + TEXT content + datetime_3_ createdAt + INTEGER executionId FK varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_128_ agentName - varchar_16_ type -} -"workflow_entity" { - varchar_36_ id PK + VARCHAR_256_ model varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt + varchar previousMessageId FK + varchar_16_ provider + varchar retryOfMessageId FK + varchar revisionOfMessageId FK + varchar sessionId FK + varchar_16_ status + varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"chat_hub_agents" { + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar_512_ description + TEXT files + TEXT icon + varchar id PK + varchar_64_ model + varchar_256_ name + varchar ownerId FK + varchar_16_ provider + TEXT suggestedPrompts + TEXT systemPrompt datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId } "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } -"chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model +"chat_hub_sessions" { + varchar_36_ agentId FK + varchar_128_ agentName datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type datetime_3_ updatedAt - TEXT icon - TEXT files - TEXT suggestedPrompts + varchar_36_ workflowId FK +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/chat_hub_session_tools.md b/docs/generated/sqlite-schema/chat_hub_session_tools.md index 98d9f38b81c..d75134e39ef 100644 --- a/docs/generated/sqlite-schema/chat_hub_session_tools.md +++ b/docs/generated/sqlite-schema/chat_hub_session_tools.md @@ -22,11 +22,11 @@ CREATE TABLE "chat_hub_session_tools" ("sessionId" varchar NOT NULL, "toolId" va | Name | Type | Definition | | ---- | ---- | ---------- | -| sessionId | PRIMARY KEY | PRIMARY KEY (sessionId) | -| toolId | PRIMARY KEY | PRIMARY KEY (toolId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| sessionId | PRIMARY KEY | PRIMARY KEY (sessionId) | | sqlite_autoindex_chat_hub_session_tools_1 | PRIMARY KEY | PRIMARY KEY (sessionId, toolId) | +| toolId | PRIMARY KEY | PRIMARY KEY (toolId) | ## Indexes @@ -47,29 +47,29 @@ erDiagram varchar toolId PK } "chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ agentId FK varchar_128_ agentName + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK } "chat_hub_tools" { - varchar id PK - varchar_255_ name - varchar_255_ type - REAL typeVersion - varchar ownerId FK + datetime_3_ createdAt TEXT definition boolean enabled - datetime_3_ createdAt + varchar id PK + varchar_255_ name + varchar ownerId FK + varchar_255_ type + REAL typeVersion datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/chat_hub_sessions.md b/docs/generated/sqlite-schema/chat_hub_sessions.md index a706ebb46d5..bed4574bb2b 100644 --- a/docs/generated/sqlite-schema/chat_hub_sessions.md +++ b/docs/generated/sqlite-schema/chat_hub_sessions.md @@ -15,31 +15,31 @@ CREATE TABLE "chat_hub_sessions" ("id" varchar PRIMARY KEY NOT NULL, "title" var | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [chat_hub_messages](chat_hub_messages.md) [chat_hub_session_tools](chat_hub_session_tools.md) | | | -| title | varchar(256) | | false | | | | -| ownerId | varchar | | false | | [user](user.md) | | -| lastMessageAt | datetime(3) | | false | | | | -| credentialId | varchar(36) | | true | | [credentials_entity](credentials_entity.md) | | -| provider | varchar(16) | | true | | | | -| model | varchar(64) | | true | | | | -| workflowId | varchar(36) | | true | | [workflow_entity](workflow_entity.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | agentId | varchar(36) | | true | | [chat_hub_agents](chat_hub_agents.md) | | | agentName | varchar(128) | | true | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| credentialId | varchar(36) | | true | | [credentials_entity](credentials_entity.md) | | +| id | varchar | | false | [chat_hub_messages](chat_hub_messages.md) [chat_hub_session_tools](chat_hub_session_tools.md) | | | +| lastMessageAt | datetime(3) | | false | | | | +| model | varchar(64) | | true | | | | +| ownerId | varchar | | false | | [user](user.md) | | +| provider | varchar(16) | | true | | | | +| title | varchar(256) | | false | | | | | type | varchar(16) | 'production' | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | true | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | +| - | CHECK | CHECK ("type" IN ('production', 'manual')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 3) | FOREIGN KEY | FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_chat_hub_sessions_1 | PRIMARY KEY | PRIMARY KEY (id) | -| - | CHECK | CHECK ("type" IN ('production', 'manual')) | ## Indexes @@ -52,117 +52,117 @@ CREATE TABLE "chat_hub_sessions" ("id" varchar PRIMARY KEY NOT NULL, "title" var ```mermaid erDiagram +"chat_hub_sessions" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"chat_hub_sessions" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_messages" }o--|| "chat_hub_sessions" : "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_session_tools" |o--|| "chat_hub_sessions" : "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_sessions" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_sessions" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_sessions" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"chat_hub_sessions" }o--o| "chat_hub_agents" : "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ agentId FK varchar_128_ agentName + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"chat_hub_agents" { + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar_512_ description + TEXT files + TEXT icon + varchar id PK + varchar_64_ model + varchar_256_ name + varchar ownerId FK + varchar_16_ provider + TEXT suggestedPrompts + TEXT systemPrompt + datetime_3_ updatedAt +} +"credentials_entity" { + datetime_3_ createdAt + TEXT data + varchar_36_ id PK + boolean isGlobal + boolean isManaged + boolean isResolvable + varchar_128_ name + boolean resolvableAllowFallback + varchar_16_ resolverId FK + varchar_32_ type + datetime_3_ updatedAt } "chat_hub_messages" { - varchar id PK - varchar sessionId FK - varchar previousMessageId FK - varchar revisionOfMessageId FK - varchar retryOfMessageId FK - varchar_16_ type - varchar_128_ name - TEXT content - varchar_16_ provider - varchar_36_ workflowId FK - INTEGER executionId FK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ agentId FK - varchar_16_ status TEXT attachments + TEXT content + datetime_3_ createdAt + INTEGER executionId FK + varchar id PK VARCHAR_256_ model + varchar_128_ name + varchar previousMessageId FK + varchar_16_ provider + varchar retryOfMessageId FK + varchar revisionOfMessageId FK + varchar sessionId FK + varchar_16_ status + varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK } "chat_hub_session_tools" { varchar sessionId PK varchar toolId PK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type - datetime_3_ createdAt + TEXT settings datetime_3_ updatedAt - boolean isManaged - boolean isGlobal - boolean isResolvable - boolean resolvableAllowFallback - varchar_16_ resolverId FK } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model + TEXT connections datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount datetime_3_ updatedAt - TEXT icon - TEXT files - TEXT suggestedPrompts + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/chat_hub_tools.md b/docs/generated/sqlite-schema/chat_hub_tools.md index a9597397228..1044c1fc23a 100644 --- a/docs/generated/sqlite-schema/chat_hub_tools.md +++ b/docs/generated/sqlite-schema/chat_hub_tools.md @@ -15,22 +15,22 @@ CREATE TABLE "chat_hub_tools" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [chat_hub_session_tools](chat_hub_session_tools.md) [chat_hub_agent_tools](chat_hub_agent_tools.md) | | | -| name | varchar(255) | | false | | | | -| type | varchar(255) | | false | | | | -| typeVersion | REAL | | false | | | | -| ownerId | varchar | | false | | [user](user.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | definition | TEXT | | false | | | | | enabled | boolean | true | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar | | false | [chat_hub_agent_tools](chat_hub_agent_tools.md) [chat_hub_session_tools](chat_hub_session_tools.md) | | | +| name | varchar(255) | | false | | | | +| ownerId | varchar | | false | | [user](user.md) | | +| type | varchar(255) | | false | | | | +| typeVersion | REAL | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_chat_hub_tools_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -45,45 +45,45 @@ CREATE TABLE "chat_hub_tools" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar ```mermaid erDiagram -"chat_hub_session_tools" |o--|| "chat_hub_tools" : "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_agent_tools" |o--|| "chat_hub_tools" : "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_session_tools" |o--|| "chat_hub_tools" : "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_tools" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_tools" { - varchar id PK - varchar_255_ name - varchar_255_ type - REAL typeVersion - varchar ownerId FK + datetime_3_ createdAt TEXT definition boolean enabled - datetime_3_ createdAt + varchar id PK + varchar_255_ name + varchar ownerId FK + varchar_255_ type + REAL typeVersion datetime_3_ updatedAt } -"chat_hub_session_tools" { - varchar sessionId PK - varchar toolId PK -} "chat_hub_agent_tools" { varchar agentId PK varchar toolId PK } +"chat_hub_session_tools" { + varchar sessionId PK + varchar toolId PK +} "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/credential_dependency.md b/docs/generated/sqlite-schema/credential_dependency.md index 5c64bbf4e01..02ba378805c 100644 --- a/docs/generated/sqlite-schema/credential_dependency.md +++ b/docs/generated/sqlite-schema/credential_dependency.md @@ -15,26 +15,26 @@ CREATE TABLE "credential_dependency" ("id" integer PRIMARY KEY NOT NULL, "creden | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | | | | -| credentialId | varchar(36) | | false | | [credentials_entity](credentials_entity.md) | | -| dependencyType | varchar(64) | | false | | | | -| dependencyId | varchar(255) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| credentialId | varchar(36) | | false | | [credentials_entity](credentials_entity.md) | | +| dependencyId | varchar(255) | | false | | | | +| dependencyType | varchar(64) | | false | | | | +| id | INTEGER | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_credential_dependency_credentialId_dependencyType_dependencyId | CREATE UNIQUE INDEX "IDX_credential_dependency_credentialId_dependencyType_dependencyId" ON "credential_dependency" ("credentialId", "dependencyType", "dependencyId") | -| IDX_91ee85fa9619dd6776725e117b | CREATE INDEX "IDX_91ee85fa9619dd6776725e117b" ON "credential_dependency" ("dependencyType", "dependencyId") | | IDX_5ec8e8c8d3539f3696cf73b43b | CREATE INDEX "IDX_5ec8e8c8d3539f3696cf73b43b" ON "credential_dependency" ("credentialId") | +| IDX_91ee85fa9619dd6776725e117b | CREATE INDEX "IDX_91ee85fa9619dd6776725e117b" ON "credential_dependency" ("dependencyType", "dependencyId") | +| IDX_credential_dependency_credentialId_dependencyType_dependencyId | CREATE UNIQUE INDEX "IDX_credential_dependency_credentialId_dependencyType_dependencyId" ON "credential_dependency" ("credentialId", "dependencyType", "dependencyId") | ## Relations @@ -44,24 +44,24 @@ erDiagram "credential_dependency" }o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "credential_dependency" { - INTEGER id - varchar_36_ credentialId FK - varchar_64_ dependencyType - varchar_255_ dependencyId datetime_3_ createdAt + varchar_36_ credentialId FK + varchar_255_ dependencyId + varchar_64_ dependencyType + INTEGER id } "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_32_ type + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/credentials_entity.md b/docs/generated/sqlite-schema/credentials_entity.md index 94767c3a57a..67f4accc786 100644 --- a/docs/generated/sqlite-schema/credentials_entity.md +++ b/docs/generated/sqlite-schema/credentials_entity.md @@ -15,24 +15,24 @@ CREATE TABLE "credentials_entity" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [shared_credentials](shared_credentials.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [dynamic_credential_entry](dynamic_credential_entry.md) [chat_hub_agents](chat_hub_agents.md) [chat_hub_sessions](chat_hub_sessions.md) [credential_dependency](credential_dependency.md) [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) | | | -| name | varchar(128) | | false | | | | -| data | TEXT | | false | | | | -| type | varchar(32) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| isManaged | boolean | 0 | false | | | | +| data | TEXT | | false | | | | +| id | varchar(36) | | false | [chat_hub_agents](chat_hub_agents.md) [chat_hub_sessions](chat_hub_sessions.md) [credential_dependency](credential_dependency.md) [dynamic_credential_entry](dynamic_credential_entry.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) [shared_credentials](shared_credentials.md) | | | | isGlobal | boolean | 0 | false | | | | +| isManaged | boolean | 0 | false | | | | | isResolvable | boolean | false | false | | | | +| name | varchar(128) | | false | | | | | resolvableAllowFallback | boolean | false | false | | | | | resolverId | varchar(16) | | true | | [dynamic_credential_resolver](dynamic_credential_resolver.md) | | +| type | varchar(32) | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_credentials_entity_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -47,103 +47,103 @@ CREATE TABLE "credentials_entity" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" ```mermaid erDiagram -"shared_credentials" |o--|| "credentials_entity" : "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_user_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_agents" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "chat_hub_sessions" }o--o| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "credential_dependency" }o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_mcp_registry_connections" }o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_credentials" |o--|| "credentials_entity" : "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "credentials_entity" }o--o| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK -} -"shared_credentials" { - varchar_36_ credentialsId PK - varchar_36_ projectId PK - TEXT role - datetime_3_ createdAt - datetime_3_ updatedAt -} -"dynamic_credential_user_entry" { - varchar_16_ credentialId PK - varchar userId PK - varchar_16_ resolverId PK - TEXT data - datetime_3_ createdAt - datetime_3_ updatedAt -} -"dynamic_credential_entry" { - varchar_16_ credential_id PK - varchar_2048_ subject_id PK - varchar_16_ resolver_id PK - TEXT data - datetime_3_ createdAt + varchar_32_ type datetime_3_ updatedAt } "chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model datetime_3_ createdAt - datetime_3_ updatedAt - TEXT icon + varchar_36_ credentialId FK + varchar_512_ description TEXT files + TEXT icon + varchar id PK + varchar_64_ model + varchar_256_ name + varchar ownerId FK + varchar_16_ provider TEXT suggestedPrompts + TEXT systemPrompt + datetime_3_ updatedAt } "chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ agentId FK varchar_128_ agentName + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK } "credential_dependency" { - INTEGER id - varchar_36_ credentialId FK - varchar_64_ dependencyType - varchar_255_ dependencyId datetime_3_ createdAt + varchar_36_ credentialId FK + varchar_255_ dependencyId + varchar_64_ dependencyType + INTEGER id +} +"dynamic_credential_entry" { + datetime_3_ createdAt + varchar_16_ credential_id PK + TEXT data + varchar_16_ resolver_id PK + varchar_2048_ subject_id PK + datetime_3_ updatedAt +} +"dynamic_credential_user_entry" { + datetime_3_ createdAt + varchar_16_ credentialId PK + TEXT data + varchar_16_ resolverId PK + datetime_3_ updatedAt + varchar userId PK } "instance_ai_mcp_registry_connections" { - varchar id PK + datetime_3_ createdAt varchar_36_ credentialId FK + varchar id PK varchar_255_ serverSlug FK TEXT toolFilter + datetime_3_ updatedAt varchar userId FK +} +"shared_credentials" { datetime_3_ createdAt + varchar_36_ credentialsId PK + varchar_36_ projectId PK + TEXT role datetime_3_ updatedAt } "dynamic_credential_resolver" { + TEXT config + datetime_3_ createdAt varchar_16_ id PK varchar_128_ name varchar_128_ type - TEXT config - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/data_table.md b/docs/generated/sqlite-schema/data_table.md index 2748e598747..c975b131969 100644 --- a/docs/generated/sqlite-schema/data_table.md +++ b/docs/generated/sqlite-schema/data_table.md @@ -15,27 +15,27 @@ CREATE TABLE "data_table" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | varchar(36) | | false | [data_table_column](data_table_column.md) | | | | name | varchar(128) | | false | | | | | projectId | varchar(36) | | false | | [project](project.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_data_table_2 | UNIQUE | UNIQUE (projectId, name) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_data_table_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_data_table_2 | UNIQUE | UNIQUE (projectId, name) | ## Indexes | Name | Definition | | ---- | ---------- | -| sqlite_autoindex_data_table_2 | UNIQUE (projectId, name) | | sqlite_autoindex_data_table_1 | PRIMARY KEY (id) | +| sqlite_autoindex_data_table_2 | UNIQUE (projectId, name) | ## Relations @@ -46,31 +46,31 @@ erDiagram "data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "data_table" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name varchar_36_ projectId FK - datetime_3_ createdAt datetime_3_ updatedAt } "data_table_column" { + datetime_3_ createdAt + varchar_36_ dataTableId FK varchar_36_ id PK + INTEGER index varchar_128_ name varchar_32_ type - INTEGER index - varchar_36_ dataTableId FK - datetime_3_ createdAt datetime_3_ updatedAt } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } ``` diff --git a/docs/generated/sqlite-schema/data_table_column.md b/docs/generated/sqlite-schema/data_table_column.md index b0da969f5ce..e0eea96c6e2 100644 --- a/docs/generated/sqlite-schema/data_table_column.md +++ b/docs/generated/sqlite-schema/data_table_column.md @@ -15,29 +15,29 @@ CREATE TABLE "data_table_column" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| dataTableId | varchar(36) | | false | | [data_table](data_table.md) | | | id | varchar(36) | | false | | | | +| index | INTEGER | | false | | | | | name | varchar(128) | | false | | | | | type | varchar(32) | | false | | | | -| index | INTEGER | | false | | | | -| dataTableId | varchar(36) | | false | | [data_table](data_table.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (dataTableId) REFERENCES data_table (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_data_table_column_2 | UNIQUE | UNIQUE (dataTableId, name) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_data_table_column_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_data_table_column_2 | UNIQUE | UNIQUE (dataTableId, name) | ## Indexes | Name | Definition | | ---- | ---------- | -| sqlite_autoindex_data_table_column_2 | UNIQUE (dataTableId, name) | | sqlite_autoindex_data_table_column_1 | PRIMARY KEY (id) | +| sqlite_autoindex_data_table_column_2 | UNIQUE (dataTableId, name) | ## Relations @@ -47,19 +47,19 @@ erDiagram "data_table_column" }o--|| "data_table" : "FOREIGN KEY (dataTableId) REFERENCES data_table (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "data_table_column" { + datetime_3_ createdAt + varchar_36_ dataTableId FK varchar_36_ id PK + INTEGER index varchar_128_ name varchar_32_ type - INTEGER index - varchar_36_ dataTableId FK - datetime_3_ createdAt datetime_3_ updatedAt } "data_table" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name varchar_36_ projectId FK - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/deployment_key.md b/docs/generated/sqlite-schema/deployment_key.md index 723d460b184..88561b33636 100644 --- a/docs/generated/sqlite-schema/deployment_key.md +++ b/docs/generated/sqlite-schema/deployment_key.md @@ -15,13 +15,13 @@ CREATE TABLE "deployment_key" ("id" varchar(36) PRIMARY KEY NOT NULL, "type" var | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| type | varchar(64) | | false | | | | -| value | TEXT | | false | | | | | algorithm | varchar(20) | | true | | | | -| status | varchar(20) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | | | | +| status | varchar(20) | | false | | | | +| type | varchar(64) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| value | TEXT | | false | | | | ## Constraints @@ -34,12 +34,12 @@ CREATE TABLE "deployment_key" ("id" varchar(36) PRIMARY KEY NOT NULL, "type" var | Name | Definition | | ---- | ---------- | +| IDX_deployment_key_data_encryption_active | CREATE UNIQUE INDEX "IDX_deployment_key_data_encryption_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'data_encryption' | +| IDX_deployment_key_instance_id_active | CREATE UNIQUE INDEX "IDX_deployment_key_instance_id_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'instance.id' | | IDX_deployment_key_jwe_private_key_active | CREATE UNIQUE INDEX "IDX_deployment_key_jwe_private_key_active" ON "deployment_key" ("type", "algorithm") WHERE status = 'active' AND type = 'jwe.private-key' | | IDX_deployment_key_signing_binary_data_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_binary_data_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'signing.binary_data' | | IDX_deployment_key_signing_hmac_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_hmac_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'signing.hmac' | | IDX_deployment_key_signing_jwt_active | CREATE UNIQUE INDEX "IDX_deployment_key_signing_jwt_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'signing.jwt' | -| IDX_deployment_key_instance_id_active | CREATE UNIQUE INDEX "IDX_deployment_key_instance_id_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'instance.id' | -| IDX_deployment_key_data_encryption_active | CREATE UNIQUE INDEX "IDX_deployment_key_data_encryption_active" ON "deployment_key" ("type") WHERE status = 'active' AND type = 'data_encryption' | | sqlite_autoindex_deployment_key_1 | PRIMARY KEY (id) | ## Relations @@ -49,13 +49,13 @@ erDiagram "deployment_key" { - varchar_36_ id PK - varchar_64_ type - TEXT value varchar_20_ algorithm - varchar_20_ status datetime_3_ createdAt + varchar_36_ id PK + varchar_20_ status + varchar_64_ type datetime_3_ updatedAt + TEXT value } ``` diff --git a/docs/generated/sqlite-schema/dynamic_credential_entry.md b/docs/generated/sqlite-schema/dynamic_credential_entry.md index 10e589dd727..4bbb9959d1e 100644 --- a/docs/generated/sqlite-schema/dynamic_credential_entry.md +++ b/docs/generated/sqlite-schema/dynamic_credential_entry.md @@ -15,30 +15,30 @@ CREATE TABLE "dynamic_credential_entry" ("credential_id" varchar(16) NOT NULL, " | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| credential_id | varchar(16) | | false | | [credentials_entity](credentials_entity.md) | | -| subject_id | varchar(2048) | | false | | | | -| resolver_id | varchar(16) | | false | | [dynamic_credential_resolver](dynamic_credential_resolver.md) | | -| data | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| credential_id | varchar(16) | | false | | [credentials_entity](credentials_entity.md) | | +| data | TEXT | | false | | | | +| resolver_id | varchar(16) | | false | | [dynamic_credential_resolver](dynamic_credential_resolver.md) | | +| subject_id | varchar(2048) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| credential_id | PRIMARY KEY | PRIMARY KEY (credential_id) | -| subject_id | PRIMARY KEY | PRIMARY KEY (subject_id) | -| resolver_id | PRIMARY KEY | PRIMARY KEY (resolver_id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| credential_id | PRIMARY KEY | PRIMARY KEY (credential_id) | +| resolver_id | PRIMARY KEY | PRIMARY KEY (resolver_id) | | sqlite_autoindex_dynamic_credential_entry_1 | PRIMARY KEY | PRIMARY KEY (credential_id, subject_id, resolver_id) | +| subject_id | PRIMARY KEY | PRIMARY KEY (subject_id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_d61a12235d268a49af6a3c09c1 | CREATE INDEX "IDX_d61a12235d268a49af6a3c09c1" ON "dynamic_credential_entry" ("resolver_id") | | IDX_62476b94b56d9dc7ed9ed75d3d | CREATE INDEX "IDX_62476b94b56d9dc7ed9ed75d3d" ON "dynamic_credential_entry" ("subject_id") | +| IDX_d61a12235d268a49af6a3c09c1 | CREATE INDEX "IDX_d61a12235d268a49af6a3c09c1" ON "dynamic_credential_entry" ("resolver_id") | | sqlite_autoindex_dynamic_credential_entry_1 | PRIMARY KEY (credential_id, subject_id, resolver_id) | ## Relations @@ -50,32 +50,32 @@ erDiagram "dynamic_credential_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "dynamic_credential_entry" { - varchar_16_ credential_id PK - varchar_2048_ subject_id PK - varchar_16_ resolver_id PK - TEXT data datetime_3_ createdAt + varchar_16_ credential_id PK + TEXT data + varchar_16_ resolver_id PK + varchar_2048_ subject_id PK datetime_3_ updatedAt } "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_32_ type + datetime_3_ updatedAt } "dynamic_credential_resolver" { + TEXT config + datetime_3_ createdAt varchar_16_ id PK varchar_128_ name varchar_128_ type - TEXT config - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/dynamic_credential_resolver.md b/docs/generated/sqlite-schema/dynamic_credential_resolver.md index 1d125aa251e..9f2381f79fb 100644 --- a/docs/generated/sqlite-schema/dynamic_credential_resolver.md +++ b/docs/generated/sqlite-schema/dynamic_credential_resolver.md @@ -15,11 +15,11 @@ CREATE TABLE "dynamic_credential_resolver" ("id" varchar(16) PRIMARY KEY NOT NUL | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(16) | | false | [credentials_entity](credentials_entity.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [dynamic_credential_entry](dynamic_credential_entry.md) | | | -| name | varchar(128) | | false | | | | -| type | varchar(128) | | false | | | | | config | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(16) | | false | [credentials_entity](credentials_entity.md) [dynamic_credential_entry](dynamic_credential_entry.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) | | | +| name | varchar(128) | | false | | | | +| type | varchar(128) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -42,46 +42,46 @@ CREATE TABLE "dynamic_credential_resolver" ("id" varchar(16) PRIMARY KEY NOT NUL erDiagram "credentials_entity" }o--o| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"dynamic_credential_user_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "dynamic_credential_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "dynamic_credential_resolver" { + TEXT config + datetime_3_ createdAt varchar_16_ id PK varchar_128_ name varchar_128_ type - TEXT config - datetime_3_ createdAt datetime_3_ updatedAt } "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK -} -"dynamic_credential_user_entry" { - varchar_16_ credentialId PK - varchar userId PK - varchar_16_ resolverId PK - TEXT data - datetime_3_ createdAt + varchar_32_ type datetime_3_ updatedAt } "dynamic_credential_entry" { - varchar_16_ credential_id PK - varchar_2048_ subject_id PK - varchar_16_ resolver_id PK - TEXT data datetime_3_ createdAt + varchar_16_ credential_id PK + TEXT data + varchar_16_ resolver_id PK + varchar_2048_ subject_id PK datetime_3_ updatedAt } +"dynamic_credential_user_entry" { + datetime_3_ createdAt + varchar_16_ credentialId PK + TEXT data + varchar_16_ resolverId PK + datetime_3_ updatedAt + varchar userId PK +} ``` --- diff --git a/docs/generated/sqlite-schema/dynamic_credential_user_entry.md b/docs/generated/sqlite-schema/dynamic_credential_user_entry.md index d5335d03af2..e64a6b26f81 100644 --- a/docs/generated/sqlite-schema/dynamic_credential_user_entry.md +++ b/docs/generated/sqlite-schema/dynamic_credential_user_entry.md @@ -15,24 +15,24 @@ CREATE TABLE "dynamic_credential_user_entry" ("credentialId" varchar(16) NOT NUL | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| credentialId | varchar(16) | | false | | [credentials_entity](credentials_entity.md) | | -| userId | varchar | | false | | [user](user.md) | | -| resolverId | varchar(16) | | false | | [dynamic_credential_resolver](dynamic_credential_resolver.md) | | -| data | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| credentialId | varchar(16) | | false | | [credentials_entity](credentials_entity.md) | | +| data | TEXT | | false | | | | +| resolverId | varchar(16) | | false | | [dynamic_credential_resolver](dynamic_credential_resolver.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| credentialId | PRIMARY KEY | PRIMARY KEY (credentialId) | -| userId | PRIMARY KEY | PRIMARY KEY (userId) | -| resolverId | PRIMARY KEY | PRIMARY KEY (resolverId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| credentialId | PRIMARY KEY | PRIMARY KEY (credentialId) | +| resolverId | PRIMARY KEY | PRIMARY KEY (resolverId) | | sqlite_autoindex_dynamic_credential_user_entry_1 | PRIMARY KEY | PRIMARY KEY (credentialId, userId, resolverId) | +| userId | PRIMARY KEY | PRIMARY KEY (userId) | ## Indexes @@ -48,53 +48,53 @@ CREATE TABLE "dynamic_credential_user_entry" ("credentialId" varchar(16) NOT NUL erDiagram "dynamic_credential_user_entry" |o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_user_entry" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "dynamic_credential_user_entry" |o--|| "dynamic_credential_resolver" : "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "dynamic_credential_user_entry" { - varchar_16_ credentialId PK - varchar userId PK - varchar_16_ resolverId PK - TEXT data datetime_3_ createdAt + varchar_16_ credentialId PK + TEXT data + varchar_16_ resolverId PK datetime_3_ updatedAt + varchar userId PK } "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK -} -"user" { - varchar id PK - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar password - TEXT personalizationAnswers - datetime_3_ createdAt + varchar_32_ type datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK } "dynamic_credential_resolver" { + TEXT config + datetime_3_ createdAt varchar_16_ id PK varchar_128_ name varchar_128_ type - TEXT config + datetime_3_ updatedAt +} +"user" { datetime_3_ createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + varchar id PK + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret + varchar password + TEXT personalizationAnswers + varchar_128_ roleSlug FK + TEXT settings datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/evaluation_collection.md b/docs/generated/sqlite-schema/evaluation_collection.md index aaaf6d2a696..cf55460da33 100644 --- a/docs/generated/sqlite-schema/evaluation_collection.md +++ b/docs/generated/sqlite-schema/evaluation_collection.md @@ -15,32 +15,32 @@ CREATE TABLE "evaluation_collection" ("id" varchar(36) PRIMARY KEY NOT NULL, "na | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [test_run](test_run.md) | | | -| name | varchar(128) | | false | | | | -| description | TEXT | | true | | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| evaluationConfigId | varchar(36) | | false | | [evaluation_config](evaluation_config.md) | | -| createdById | varchar | | true | | [user](user.md) | | -| insightsCache | TEXT | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| createdById | varchar | | true | | [user](user.md) | | +| description | TEXT | | true | | | | +| evaluationConfigId | varchar(36) | | false | | [evaluation_config](evaluation_config.md) | | +| id | varchar(36) | | false | [test_run](test_run.md) | | | +| insightsCache | TEXT | | true | | | | +| name | varchar(128) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_evaluation_collection_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_d634a0c93fd7de68a87eab951b | CREATE INDEX "IDX_d634a0c93fd7de68a87eab951b" ON "evaluation_collection" ("evaluationConfigId") | | IDX_a48ce930c3bc7604894b8f0eaa | CREATE INDEX "IDX_a48ce930c3bc7604894b8f0eaa" ON "evaluation_collection" ("workflowId") | +| IDX_d634a0c93fd7de68a87eab951b | CREATE INDEX "IDX_d634a0c93fd7de68a87eab951b" ON "evaluation_collection" ("evaluationConfigId") | | sqlite_autoindex_evaluation_collection_1 | PRIMARY KEY (id) | ## Relations @@ -48,92 +48,92 @@ CREATE TABLE "evaluation_collection" ("id" varchar(36) PRIMARY KEY NOT NULL, "na ```mermaid erDiagram +"evaluation_collection" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"evaluation_collection" }o--|| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "test_run" }o--o| "evaluation_collection" : "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "evaluation_collection" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"evaluation_collection" }o--|| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"evaluation_collection" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "evaluation_collection" { - varchar_36_ id PK - varchar_128_ name - TEXT description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK + datetime_3_ createdAt varchar createdById FK - TEXT insightsCache - datetime_3_ createdAt - datetime_3_ updatedAt -} -"test_run" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar status - varchar errorCode - TEXT errorDetails - datetime_3_ runAt - datetime_3_ completedAt - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - TEXT evaluationConfigSnapshot - varchar_36_ collectionId FK -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"evaluation_config" { + varchar_36_ evaluationConfigId FK varchar_36_ id PK - varchar_36_ workflowId FK + TEXT insightsCache varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - TEXT datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - TEXT metrics - datetime_3_ createdAt datetime_3_ updatedAt + varchar_36_ workflowId FK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt +} +"evaluation_config" { + datetime_3_ createdAt + TEXT datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id PK + varchar_64_ invalidReason + TEXT metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + datetime_3_ completedAt + datetime_3_ createdAt + varchar errorCode + TEXT errorDetails + varchar_36_ evaluationConfigId FK + TEXT evaluationConfigSnapshot + varchar_36_ id PK + TEXT metrics + datetime_3_ runAt + varchar_255_ runningInstanceId + varchar status + datetime_3_ updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/evaluation_config.md b/docs/generated/sqlite-schema/evaluation_config.md index 9cfbda4ee58..b779e1a12b5 100644 --- a/docs/generated/sqlite-schema/evaluation_config.md +++ b/docs/generated/sqlite-schema/evaluation_config.md @@ -15,35 +15,35 @@ CREATE TABLE "evaluation_config" ("id" varchar(36) PRIMARY KEY NOT NULL, "workfl | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [evaluation_collection](evaluation_collection.md) [test_run](test_run.md) | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| name | varchar(128) | | false | | | | -| status | varchar(16) | 'valid' | false | | | | -| invalidReason | varchar(64) | | true | | | | -| datasetSource | varchar(32) | | false | | | | -| datasetRef | TEXT | | false | | | | -| startNodeName | varchar(255) | | false | | | | -| endNodeName | varchar(255) | | false | | | | -| metrics | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| datasetRef | TEXT | | false | | | | +| datasetSource | varchar(32) | | false | | | | +| endNodeName | varchar(255) | | false | | | | +| id | varchar(36) | | false | [evaluation_collection](evaluation_collection.md) [test_run](test_run.md) | | | +| invalidReason | varchar(64) | | true | | | | +| metrics | TEXT | | false | | | | +| name | varchar(128) | | false | | | | +| startNodeName | varchar(255) | | false | | | | +| status | varchar(16) | 'valid' | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_evaluation_config_2 | UNIQUE | UNIQUE (workflowId, name) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_evaluation_config_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_evaluation_config_2 | UNIQUE | UNIQUE (workflowId, name) | ## Indexes | Name | Definition | | ---- | ---------- | | IDX_fd7542bb123074760285dc1bbf | CREATE INDEX "IDX_fd7542bb123074760285dc1bbf" ON "evaluation_config" ("workflowId") | -| sqlite_autoindex_evaluation_config_2 | UNIQUE (workflowId, name) | | sqlite_autoindex_evaluation_config_1 | PRIMARY KEY (id) | +| sqlite_autoindex_evaluation_config_2 | UNIQUE (workflowId, name) | ## Relations @@ -55,69 +55,69 @@ erDiagram "evaluation_config" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "evaluation_config" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - TEXT datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - TEXT metrics datetime_3_ createdAt + TEXT datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id PK + varchar_64_ invalidReason + TEXT metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status datetime_3_ updatedAt + varchar_36_ workflowId FK } "evaluation_collection" { - varchar_36_ id PK - varchar_128_ name - TEXT description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - varchar createdById FK - TEXT insightsCache datetime_3_ createdAt + varchar createdById FK + TEXT description + varchar_36_ evaluationConfigId FK + varchar_36_ id PK + TEXT insightsCache + varchar_128_ name datetime_3_ updatedAt + varchar_36_ workflowId FK } "test_run" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar status + boolean cancelRequested + varchar_36_ collectionId FK + datetime_3_ completedAt + datetime_3_ createdAt varchar errorCode TEXT errorDetails - datetime_3_ runAt - datetime_3_ completedAt - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId varchar_36_ evaluationConfigId FK TEXT evaluationConfigSnapshot - varchar_36_ collectionId FK + varchar_36_ id PK + TEXT metrics + datetime_3_ runAt + varchar_255_ runningInstanceId + varchar status + datetime_3_ updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/event_destinations.md b/docs/generated/sqlite-schema/event_destinations.md index 6b6534c9a12..9a9301474e3 100644 --- a/docs/generated/sqlite-schema/event_destinations.md +++ b/docs/generated/sqlite-schema/event_destinations.md @@ -15,9 +15,9 @@ CREATE TABLE "event_destinations" ("id" varchar(36) PRIMARY KEY NOT NULL,"destin | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| destination | TEXT | | false | | | | | createdAt | datetime(3) | 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')' | false | | | | +| destination | TEXT | | false | | | | +| id | varchar(36) | | false | | | | | updatedAt | datetime(3) | 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')' | false | | | | ## Constraints @@ -40,9 +40,9 @@ erDiagram "event_destinations" { - varchar_36_ id PK - TEXT destination datetime_3_ createdAt + TEXT destination + varchar_36_ id PK datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/execution_annotation_tags.md b/docs/generated/sqlite-schema/execution_annotation_tags.md index 7bc6524806d..2be4c2ce5e7 100644 --- a/docs/generated/sqlite-schema/execution_annotation_tags.md +++ b/docs/generated/sqlite-schema/execution_annotation_tags.md @@ -22,18 +22,18 @@ CREATE TABLE "execution_annotation_tags" ("annotationId" integer NOT NULL, "tagI | Name | Type | Definition | | ---- | ---- | ---------- | -| annotationId | PRIMARY KEY | PRIMARY KEY (annotationId) | -| tagId | PRIMARY KEY | PRIMARY KEY (tagId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (tagId) REFERENCES annotation_tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| annotationId | PRIMARY KEY | PRIMARY KEY (annotationId) | | sqlite_autoindex_execution_annotation_tags_1 | PRIMARY KEY | PRIMARY KEY (annotationId, tagId) | +| tagId | PRIMARY KEY | PRIMARY KEY (tagId) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_c1519757391996eb06064f0e7c | CREATE INDEX "IDX_c1519757391996eb06064f0e7c" ON "execution_annotation_tags" ("annotationId") | | IDX_a3697779b366e131b2bbdae297 | CREATE INDEX "IDX_a3697779b366e131b2bbdae297" ON "execution_annotation_tags" ("tagId") | +| IDX_c1519757391996eb06064f0e7c | CREATE INDEX "IDX_c1519757391996eb06064f0e7c" ON "execution_annotation_tags" ("annotationId") | | sqlite_autoindex_execution_annotation_tags_1 | PRIMARY KEY (annotationId, tagId) | ## Relations @@ -49,17 +49,17 @@ erDiagram varchar_24_ tagId PK } "execution_annotations" { - INTEGER id - INTEGER executionId FK - varchar_6_ vote - TEXT note datetime_3_ createdAt + INTEGER executionId FK + INTEGER id + TEXT note datetime_3_ updatedAt + varchar_6_ vote } "annotation_tag_entity" { + datetime_3_ createdAt varchar_16_ id PK varchar_24_ name - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/execution_annotations.md b/docs/generated/sqlite-schema/execution_annotations.md index feadd9a613c..395cbf761bd 100644 --- a/docs/generated/sqlite-schema/execution_annotations.md +++ b/docs/generated/sqlite-schema/execution_annotations.md @@ -15,19 +15,19 @@ CREATE TABLE "execution_annotations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | [execution_annotation_tags](execution_annotation_tags.md) | | | -| executionId | INTEGER | | false | | [execution_entity](execution_entity.md) | | -| vote | varchar(6) | | true | | | | -| note | TEXT | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| executionId | INTEGER | | false | | [execution_entity](execution_entity.md) | | +| id | INTEGER | | false | [execution_annotation_tags](execution_annotation_tags.md) | | | +| note | TEXT | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| vote | varchar(6) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -40,40 +40,40 @@ CREATE TABLE "execution_annotations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT ```mermaid erDiagram -"execution_annotation_tags" |o--|| "execution_annotations" : "FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_annotations" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_annotation_tags" |o--|| "execution_annotations" : "FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_annotations" { - INTEGER id - INTEGER executionId FK - varchar_6_ vote - TEXT note datetime_3_ createdAt + INTEGER executionId FK + INTEGER id + TEXT note datetime_3_ updatedAt -} -"execution_annotation_tags" { - INTEGER annotationId PK - varchar_24_ tagId PK + varchar_6_ vote } "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } +"execution_annotation_tags" { + INTEGER annotationId PK + varchar_24_ tagId PK +} ``` --- diff --git a/docs/generated/sqlite-schema/execution_data.md b/docs/generated/sqlite-schema/execution_data.md index bd77c74535e..fdd9f224105 100644 --- a/docs/generated/sqlite-schema/execution_data.md +++ b/docs/generated/sqlite-schema/execution_data.md @@ -20,17 +20,17 @@ CREATE TABLE "execution_data" ( | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| data | TEXT | | false | | | | | executionId | INT | | false | | [execution_entity](execution_entity.md) | | | workflowData | TEXT | | false | | | | -| data | TEXT | | false | | | | | workflowVersionId | VARCHAR(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| executionId | PRIMARY KEY | PRIMARY KEY (executionId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| executionId | PRIMARY KEY | PRIMARY KEY (executionId) | | sqlite_autoindex_execution_data_1 | PRIMARY KEY | PRIMARY KEY (executionId) | ## Indexes @@ -47,28 +47,28 @@ erDiagram "execution_data" |o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_data" { + TEXT data INT executionId PK TEXT workflowData - TEXT data VARCHAR_36_ workflowVersionId } "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } ``` diff --git a/docs/generated/sqlite-schema/execution_entity.md b/docs/generated/sqlite-schema/execution_entity.md index 22438b80f42..82c88c95125 100644 --- a/docs/generated/sqlite-schema/execution_entity.md +++ b/docs/generated/sqlite-schema/execution_entity.md @@ -15,150 +15,150 @@ CREATE TABLE "execution_entity" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | [execution_data](execution_data.md) [execution_metadata](execution_metadata.md) [execution_annotations](execution_annotations.md) [test_case_execution](test_case_execution.md) [chat_hub_messages](chat_hub_messages.md) | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| deduplicationKey | varchar(255) | | true | | | | +| deletedAt | datetime(3) | | true | | | | | finished | boolean | | false | | | | +| id | INTEGER | | false | [chat_hub_messages](chat_hub_messages.md) [execution_annotations](execution_annotations.md) [execution_data](execution_data.md) [execution_metadata](execution_metadata.md) [test_case_execution](test_case_execution.md) | | | +| jsonSizeBytes | BIGINT | 0 | false | | | | | mode | varchar | | false | | | | | retryOf | varchar | | true | | | | | retrySuccessId | varchar | | true | | | | | startedAt | datetime | | true | | | | -| stoppedAt | datetime | | true | | | | -| waitTill | datetime | | true | | | | | status | varchar | | false | | | | -| deletedAt | datetime(3) | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| stoppedAt | datetime | | true | | | | | storedAt | varchar(2) | 'db' | false | | | | | tracingContext | TEXT | | true | | | | -| deduplicationKey | varchar(255) | | true | | | | -| jsonSizeBytes | BIGINT | 0 | false | | | | +| waitTill | datetime | | true | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | | workflowVersionId | VARCHAR(36) | NULL | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | | IDX_execution_entity_deduplicationKey | CREATE UNIQUE INDEX "IDX_execution_entity_deduplicationKey" ON "execution_entity" ("deduplicationKey") WHERE "deduplicationKey" IS NOT NULL | -| IDX_execution_entity_stoppedAt | CREATE INDEX "IDX_execution_entity_stoppedAt" ON "execution_entity" ("stoppedAt") | | IDX_execution_entity_deletedAt | CREATE INDEX "IDX_execution_entity_deletedAt" ON "execution_entity" ("deletedAt") | +| IDX_execution_entity_stoppedAt | CREATE INDEX "IDX_execution_entity_stoppedAt" ON "execution_entity" ("stoppedAt") | ## Relations ```mermaid erDiagram +"chat_hub_messages" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"execution_annotations" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_data" |o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_metadata" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_annotations" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"chat_hub_messages" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "execution_entity" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } +"chat_hub_messages" { + varchar_36_ agentId FK + TEXT attachments + TEXT content + datetime_3_ createdAt + INTEGER executionId FK + varchar id PK + VARCHAR_256_ model + varchar_128_ name + varchar previousMessageId FK + varchar_16_ provider + varchar retryOfMessageId FK + varchar revisionOfMessageId FK + varchar sessionId FK + varchar_16_ status + varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"execution_annotations" { + datetime_3_ createdAt + INTEGER executionId FK + INTEGER id + TEXT note + datetime_3_ updatedAt + varchar_6_ vote +} "execution_data" { + TEXT data INT executionId PK TEXT workflowData - TEXT data VARCHAR_36_ workflowVersionId } "execution_metadata" { - INTEGER id INTEGER executionId FK + INTEGER id varchar_255_ key TEXT value } -"execution_annotations" { - INTEGER id - INTEGER executionId FK - varchar_6_ vote - TEXT note - datetime_3_ createdAt - datetime_3_ updatedAt -} "test_case_execution" { - varchar_36_ id PK - varchar_36_ testRunId FK - INTEGER pastExecutionId FK - INTEGER executionId FK - INTEGER evaluationExecutionId FK - varchar status - datetime_3_ runAt datetime_3_ completedAt + datetime_3_ createdAt varchar errorCode TEXT errorDetails - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT inputs - TEXT outputs - INTEGER runIndex -} -"chat_hub_messages" { - varchar id PK - varchar sessionId FK - varchar previousMessageId FK - varchar revisionOfMessageId FK - varchar retryOfMessageId FK - varchar_16_ type - varchar_128_ name - TEXT content - varchar_16_ provider - varchar_36_ workflowId FK + INTEGER evaluationExecutionId FK INTEGER executionId FK - datetime_3_ createdAt + varchar_36_ id PK + TEXT inputs + TEXT metrics + TEXT outputs + INTEGER pastExecutionId FK + datetime_3_ runAt + INTEGER runIndex + varchar status + varchar_36_ testRunId FK datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_16_ status - TEXT attachments - VARCHAR_256_ model } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/execution_metadata.md b/docs/generated/sqlite-schema/execution_metadata.md index 9875a34dc45..429a85f5d59 100644 --- a/docs/generated/sqlite-schema/execution_metadata.md +++ b/docs/generated/sqlite-schema/execution_metadata.md @@ -15,8 +15,8 @@ CREATE TABLE "execution_metadata" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NU | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | | | | | executionId | INTEGER | | false | | [execution_entity](execution_entity.md) | | +| id | INTEGER | | false | | | | | key | varchar(255) | | false | | | | | value | TEXT | | false | | | | @@ -24,8 +24,8 @@ CREATE TABLE "execution_metadata" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NU | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -41,28 +41,28 @@ erDiagram "execution_metadata" }o--|| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "execution_metadata" { - INTEGER id INTEGER executionId FK + INTEGER id varchar_255_ key TEXT value } "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } ``` diff --git a/docs/generated/sqlite-schema/folder.md b/docs/generated/sqlite-schema/folder.md index 9bb7ce0335d..d64e0cdb662 100644 --- a/docs/generated/sqlite-schema/folder.md +++ b/docs/generated/sqlite-schema/folder.md @@ -15,20 +15,20 @@ CREATE TABLE "folder" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(128 | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | varchar(36) | | false | [folder](folder.md) [folder_tag](folder_tag.md) [workflow_entity](workflow_entity.md) | | | | name | varchar(128) | | false | | | | | parentFolderId | varchar(36) | | true | | [folder](folder.md) | | | projectId | varchar(36) | | false | | [project](project.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_folder_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -49,11 +49,11 @@ erDiagram "folder" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "folder" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - datetime_3_ createdAt datetime_3_ updatedAt } "folder_tag" { @@ -61,37 +61,37 @@ erDiagram varchar_36_ tagId PK } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } ``` diff --git a/docs/generated/sqlite-schema/folder_tag.md b/docs/generated/sqlite-schema/folder_tag.md index 4fe8bea43a7..934d8868497 100644 --- a/docs/generated/sqlite-schema/folder_tag.md +++ b/docs/generated/sqlite-schema/folder_tag.md @@ -22,11 +22,11 @@ CREATE TABLE "folder_tag" ("folderId" varchar(36) NOT NULL, "tagId" varchar(36) | Name | Type | Definition | | ---- | ---- | ---------- | -| folderId | PRIMARY KEY | PRIMARY KEY (folderId) | -| tagId | PRIMARY KEY | PRIMARY KEY (tagId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (folderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| folderId | PRIMARY KEY | PRIMARY KEY (folderId) | | sqlite_autoindex_folder_tag_1 | PRIMARY KEY | PRIMARY KEY (folderId, tagId) | +| tagId | PRIMARY KEY | PRIMARY KEY (tagId) | ## Indexes @@ -47,17 +47,17 @@ erDiagram varchar_36_ tagId PK } "folder" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - datetime_3_ createdAt datetime_3_ updatedAt } "tag_entity" { + datetime_3_ createdAt varchar_36_ id PK varchar_24_ name - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/insights_by_period.md b/docs/generated/sqlite-schema/insights_by_period.md index f41b70697c9..784b5702f1c 100644 --- a/docs/generated/sqlite-schema/insights_by_period.md +++ b/docs/generated/sqlite-schema/insights_by_period.md @@ -17,17 +17,17 @@ CREATE TABLE "insights_by_period" ("id" integer PRIMARY KEY NOT NULL, "metaId" i | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | INTEGER | | false | | | | | metaId | INTEGER | | false | | [insights_metadata](insights_metadata.md) | | +| periodStart | datetime(0) | CURRENT_TIMESTAMP | true | | | | +| periodUnit | INTEGER | | false | | | | | type | INTEGER | | false | | | | | value | bigint | | false | | | | -| periodUnit | INTEGER | | false | | | | -| periodStart | datetime(0) | CURRENT_TIMESTAMP | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -45,17 +45,17 @@ erDiagram "insights_by_period" { INTEGER id INTEGER metaId FK + datetime_0_ periodStart + INTEGER periodUnit INTEGER type bigint value - INTEGER periodUnit - datetime_0_ periodStart } "insights_metadata" { INTEGER metaId - varchar_16_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName + varchar_16_ workflowId FK + varchar_128_ workflowName } ``` diff --git a/docs/generated/sqlite-schema/insights_metadata.md b/docs/generated/sqlite-schema/insights_metadata.md index 2d94340d222..a553aa580ef 100644 --- a/docs/generated/sqlite-schema/insights_metadata.md +++ b/docs/generated/sqlite-schema/insights_metadata.md @@ -15,19 +15,19 @@ CREATE TABLE "insights_metadata" ("metaId" integer PRIMARY KEY NOT NULL, "workfl | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| metaId | INTEGER | | false | [insights_raw](insights_raw.md) [insights_by_period](insights_by_period.md) | | | -| workflowId | varchar(16) | | true | | [workflow_entity](workflow_entity.md) | | +| metaId | INTEGER | | false | [insights_by_period](insights_by_period.md) [insights_raw](insights_raw.md) | | | | projectId | varchar(36) | | true | | [project](project.md) | | -| workflowName | varchar(128) | | false | | | | | projectName | varchar(255) | | false | | | | +| workflowId | varchar(16) | | true | | [workflow_entity](workflow_entity.md) | | +| workflowName | varchar(128) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| metaId | PRIMARY KEY | PRIMARY KEY (metaId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| metaId | PRIMARY KEY | PRIMARY KEY (metaId) | ## Indexes @@ -40,65 +40,65 @@ CREATE TABLE "insights_metadata" ("metaId" integer PRIMARY KEY NOT NULL, "workfl ```mermaid erDiagram -"insights_raw" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "insights_by_period" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"insights_metadata" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"insights_raw" }o--|| "insights_metadata" : "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "insights_metadata" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"insights_metadata" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "insights_metadata" { INTEGER metaId - varchar_16_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName -} -"insights_raw" { - INTEGER id - INTEGER metaId FK - INTEGER type - bigint value - datetime_0_ timestamp + varchar_16_ workflowId FK + varchar_128_ workflowName } "insights_by_period" { INTEGER id INTEGER metaId FK + datetime_0_ periodStart + INTEGER periodUnit INTEGER type bigint value - INTEGER periodUnit - datetime_0_ periodStart } -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId +"insights_raw" { + INTEGER id + INTEGER metaId FK + datetime_0_ timestamp + INTEGER type + bigint value } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/insights_raw.md b/docs/generated/sqlite-schema/insights_raw.md index 5e7d4e5b746..6f84c384301 100644 --- a/docs/generated/sqlite-schema/insights_raw.md +++ b/docs/generated/sqlite-schema/insights_raw.md @@ -17,16 +17,16 @@ CREATE TABLE "insights_raw" ("id" integer PRIMARY KEY NOT NULL, "metaId" integer | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | INTEGER | | false | | | | | metaId | INTEGER | | false | | [insights_metadata](insights_metadata.md) | | +| timestamp | datetime(0) | CURRENT_TIMESTAMP | false | | | | | type | INTEGER | | false | | | | | value | bigint | | false | | | | -| timestamp | datetime(0) | CURRENT_TIMESTAMP | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -44,16 +44,16 @@ erDiagram "insights_raw" { INTEGER id INTEGER metaId FK + datetime_0_ timestamp INTEGER type bigint value - datetime_0_ timestamp } "insights_metadata" { INTEGER metaId - varchar_16_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName + varchar_16_ workflowId FK + varchar_128_ workflowName } ``` diff --git a/docs/generated/sqlite-schema/installed_nodes.md b/docs/generated/sqlite-schema/installed_nodes.md index a96f01520b8..560caa42eca 100644 --- a/docs/generated/sqlite-schema/installed_nodes.md +++ b/docs/generated/sqlite-schema/installed_nodes.md @@ -15,17 +15,17 @@ CREATE TABLE "installed_nodes" ("name" char(200) NOT NULL,"type" char(200) NOT N | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| name | char(200) | | false | | | | -| type | char(200) | | false | | | | | latestVersion | INTEGER | 1 | true | | | | +| name | char(200) | | false | | | | | package | char(214) | | false | | [installed_packages](installed_packages.md) | | +| type | char(200) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| name | PRIMARY KEY | PRIMARY KEY (name) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE | +| name | PRIMARY KEY | PRIMARY KEY (name) | | sqlite_autoindex_installed_nodes_1 | PRIMARY KEY | PRIMARY KEY (name) | ## Indexes @@ -42,17 +42,17 @@ erDiagram "installed_nodes" }o--|| "installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" "installed_nodes" { - char_200_ name PK - char_200_ type INTEGER latestVersion + char_200_ name PK char_214_ package FK + char_200_ type } "installed_packages" { - char_214_ packageName PK - char_50_ installedVersion - char_70_ authorName char_70_ authorEmail + char_70_ authorName datetime_3_ createdAt + char_50_ installedVersion + char_214_ packageName PK datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/installed_packages.md b/docs/generated/sqlite-schema/installed_packages.md index dacfacf4e52..75b58f5269d 100644 --- a/docs/generated/sqlite-schema/installed_packages.md +++ b/docs/generated/sqlite-schema/installed_packages.md @@ -15,11 +15,11 @@ CREATE TABLE "installed_packages" ("packageName" char(214) NOT NULL,"installedVe | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| packageName | char(214) | | false | [installed_nodes](installed_nodes.md) | | | -| installedVersion | char(50) | | false | | | | -| authorName | char(70) | | true | | | | | authorEmail | char(70) | | true | | | | +| authorName | char(70) | | true | | | | | createdAt | datetime(3) | 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')' | false | | | | +| installedVersion | char(50) | | false | | | | +| packageName | char(214) | | false | [installed_nodes](installed_nodes.md) | | | | updatedAt | datetime(3) | 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')' | false | | | | ## Constraints @@ -43,18 +43,18 @@ erDiagram "installed_nodes" }o--|| "installed_packages" : "FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" "installed_packages" { - char_214_ packageName PK - char_50_ installedVersion - char_70_ authorName char_70_ authorEmail + char_70_ authorName datetime_3_ createdAt + char_50_ installedVersion + char_214_ packageName PK datetime_3_ updatedAt } "installed_nodes" { - char_200_ name PK - char_200_ type INTEGER latestVersion + char_200_ name PK char_214_ package FK + char_200_ type } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_checkpoints.md b/docs/generated/sqlite-schema/instance_ai_checkpoints.md index e3bf39b7a6f..bb4bf5b4d74 100644 --- a/docs/generated/sqlite-schema/instance_ai_checkpoints.md +++ b/docs/generated/sqlite-schema/instance_ai_checkpoints.md @@ -15,31 +15,31 @@ CREATE TABLE "instance_ai_checkpoints" ("key" varchar(255) PRIMARY KEY NOT NULL, | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| key | varchar(255) | | false | [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) | | | -| runId | varchar(255) | | true | | | | -| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | -| resourceId | varchar(255) | | true | | | | -| state | TEXT | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | expiredAt | datetime(3) | | true | | | | +| key | varchar(255) | | false | [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) | | | +| resourceId | varchar(255) | | true | | | | +| runId | varchar(255) | | true | | | | +| state | TEXT | | true | | | | +| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| key | PRIMARY KEY | PRIMARY KEY (key) | -| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_instance_ai_checkpoints_1 | PRIMARY KEY | PRIMARY KEY (key) | | - | CHECK | CHECK (("expiredAt" IS NOT NULL AND "state" IS NULL) OR "expiredAt" IS NULL) | +| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| key | PRIMARY KEY | PRIMARY KEY (key) | +| sqlite_autoindex_instance_ai_checkpoints_1 | PRIMARY KEY | PRIMARY KEY (key) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_be9d0eca0b19fb93d4eb74b327 | CREATE INDEX "IDX_be9d0eca0b19fb93d4eb74b327" ON "instance_ai_checkpoints" ("resourceId") | | IDX_2b23f3f24a70bebb990203b011 | CREATE INDEX "IDX_2b23f3f24a70bebb990203b011" ON "instance_ai_checkpoints" ("threadId") | | IDX_768189b506cc26c4fe878b87cb | CREATE INDEX "IDX_768189b506cc26c4fe878b87cb" ON "instance_ai_checkpoints" ("runId") | +| IDX_be9d0eca0b19fb93d4eb74b327 | CREATE INDEX "IDX_be9d0eca0b19fb93d4eb74b327" ON "instance_ai_checkpoints" ("resourceId") | | sqlite_autoindex_instance_ai_checkpoints_1 | PRIMARY KEY (key) | ## Relations @@ -51,36 +51,36 @@ erDiagram "instance_ai_checkpoints" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_checkpoints" { - varchar_255_ key PK - varchar_255_ runId - varchar threadId FK - varchar_255_ resourceId - TEXT state datetime_3_ createdAt - datetime_3_ updatedAt datetime_3_ expiredAt + varchar_255_ key PK + varchar_255_ resourceId + varchar_255_ runId + TEXT state + varchar threadId FK + datetime_3_ updatedAt } "instance_ai_pending_confirmations" { - varchar_36_ requestId PK - varchar threadId FK - varchar userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId - datetime_3_ expiresAt datetime_3_ createdAt + datetime_3_ expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId PK + varchar_36_ runId + varchar threadId FK + varchar_64_ toolCallId datetime_3_ updatedAt + varchar userId FK } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_iteration_logs.md b/docs/generated/sqlite-schema/instance_ai_iteration_logs.md index 7145b496bdd..3200a4a4ed8 100644 --- a/docs/generated/sqlite-schema/instance_ai_iteration_logs.md +++ b/docs/generated/sqlite-schema/instance_ai_iteration_logs.md @@ -15,19 +15,19 @@ CREATE TABLE "instance_ai_iteration_logs" ("id" varchar(36) PRIMARY KEY NOT NULL | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | -| taskKey | varchar | | false | | | | -| entry | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| entry | TEXT | | false | | | | +| id | varchar(36) | | false | | | | +| taskKey | varchar | | false | | | | +| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_instance_ai_iteration_logs_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -45,20 +45,20 @@ erDiagram "instance_ai_iteration_logs" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_iteration_logs" { - varchar_36_ id PK - varchar threadId FK - varchar taskKey - TEXT entry datetime_3_ createdAt + TEXT entry + varchar_36_ id PK + varchar taskKey + varchar threadId FK datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_mcp_registry_connections.md b/docs/generated/sqlite-schema/instance_ai_mcp_registry_connections.md index 7baa46ec5bf..35b836acce0 100644 --- a/docs/generated/sqlite-schema/instance_ai_mcp_registry_connections.md +++ b/docs/generated/sqlite-schema/instance_ai_mcp_registry_connections.md @@ -15,22 +15,22 @@ CREATE TABLE "instance_ai_mcp_registry_connections" ("id" varchar PRIMARY KEY NO | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | credentialId | varchar(36) | | false | | [credentials_entity](credentials_entity.md) | | +| id | varchar | | false | | | | | serverSlug | varchar(255) | | false | | [mcp_registry_server](mcp_registry_server.md) | | | toolFilter | TEXT | | true | | | | -| userId | varchar | | false | | [user](user.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (serverSlug) REFERENCES mcp_registry_server (slug) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_instance_ai_mcp_registry_connections_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -50,52 +50,52 @@ erDiagram "instance_ai_mcp_registry_connections" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_mcp_registry_connections" { - varchar id PK + datetime_3_ createdAt varchar_36_ credentialId FK + varchar id PK varchar_255_ serverSlug FK TEXT toolFilter - varchar userId FK - datetime_3_ createdAt datetime_3_ updatedAt + varchar userId FK } "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_32_ type + datetime_3_ updatedAt } "mcp_registry_server" { + datetime_3_ createdAt + TEXT data + datetime_3_ registryUpdatedAt varchar_255_ slug PK varchar_50_ status - varchar_50_ version - datetime_3_ registryUpdatedAt - TEXT data - datetime_3_ createdAt datetime_3_ updatedAt + varchar_50_ version } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_messages.md b/docs/generated/sqlite-schema/instance_ai_messages.md index f40df2ec079..da85559999f 100644 --- a/docs/generated/sqlite-schema/instance_ai_messages.md +++ b/docs/generated/sqlite-schema/instance_ai_messages.md @@ -15,29 +15,29 @@ CREATE TABLE "instance_ai_messages" ("id" varchar(36) PRIMARY KEY NOT NULL, "thr | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | content | TEXT | | false | | | | -| role | varchar(16) | | false | | | | -| type | varchar(32) | | true | | | | -| resourceId | varchar(255) | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | | | | +| resourceId | varchar(255) | | true | | | | +| role | varchar(16) | | false | | | | +| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | +| type | varchar(32) | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_instance_ai_messages_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_76e212c6867fbaa06bf0decd6f | CREATE INDEX "IDX_76e212c6867fbaa06bf0decd6f" ON "instance_ai_messages" ("resourceId") | | IDX_1eeb64cb9d66a927988de759e6 | CREATE INDEX "IDX_1eeb64cb9d66a927988de759e6" ON "instance_ai_messages" ("threadId") | +| IDX_76e212c6867fbaa06bf0decd6f | CREATE INDEX "IDX_76e212c6867fbaa06bf0decd6f" ON "instance_ai_messages" ("resourceId") | | sqlite_autoindex_instance_ai_messages_1 | PRIMARY KEY (id) | ## Relations @@ -48,22 +48,22 @@ erDiagram "instance_ai_messages" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_messages" { - varchar_36_ id PK - varchar threadId FK TEXT content - varchar_16_ role - varchar_32_ type - varchar_255_ resourceId datetime_3_ createdAt + varchar_36_ id PK + varchar_255_ resourceId + varchar_16_ role + varchar threadId FK + varchar_32_ type datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_observation_cursors.md b/docs/generated/sqlite-schema/instance_ai_observation_cursors.md index c092509f5c7..ec509059190 100644 --- a/docs/generated/sqlite-schema/instance_ai_observation_cursors.md +++ b/docs/generated/sqlite-schema/instance_ai_observation_cursors.md @@ -15,18 +15,18 @@ CREATE TABLE "instance_ai_observation_cursors" ("observationScopeId" varchar PRI | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| observationScopeId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | -| lastObservedMessageId | varchar(36) | | false | | | | -| lastObservedAt | datetime(3) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| lastObservedAt | datetime(3) | | false | | | | +| lastObservedMessageId | varchar(36) | | false | | | | +| observationScopeId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | | sqlite_autoindex_instance_ai_observation_cursors_1 | PRIMARY KEY | PRIMARY KEY (observationScopeId) | ## Indexes @@ -43,19 +43,19 @@ erDiagram "instance_ai_observation_cursors" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_observation_cursors" { - varchar observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar observationScopeId PK datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_observation_locks.md b/docs/generated/sqlite-schema/instance_ai_observation_locks.md index 6eb62c3b343..198ae078192 100644 --- a/docs/generated/sqlite-schema/instance_ai_observation_locks.md +++ b/docs/generated/sqlite-schema/instance_ai_observation_locks.md @@ -15,22 +15,22 @@ CREATE TABLE "instance_ai_observation_locks" ("observationScopeId" varchar NOT N | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| heldUntil | datetime(3) | | false | | | | +| holderId | varchar(64) | | false | | | | | observationScopeId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | taskKind | varchar(20) | | false | | | | -| holderId | varchar(64) | | false | | | | -| heldUntil | datetime(3) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | -| taskKind | PRIMARY KEY | PRIMARY KEY (taskKind) | -| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_instance_ai_observation_locks_1 | PRIMARY KEY | PRIMARY KEY (observationScopeId, taskKind) | | - | CHECK | CHECK ("taskKind" IN ('observer', 'reflector')) | +| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| observationScopeId | PRIMARY KEY | PRIMARY KEY (observationScopeId) | +| sqlite_autoindex_instance_ai_observation_locks_1 | PRIMARY KEY | PRIMARY KEY (observationScopeId, taskKind) | +| taskKind | PRIMARY KEY | PRIMARY KEY (taskKind) | ## Indexes @@ -46,20 +46,20 @@ erDiagram "instance_ai_observation_locks" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_observation_locks" { + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId varchar observationScopeId PK varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_observational_memory.md b/docs/generated/sqlite-schema/instance_ai_observational_memory.md index b1a75dd6066..f4d64b5370e 100644 --- a/docs/generated/sqlite-schema/instance_ai_observational_memory.md +++ b/docs/generated/sqlite-schema/instance_ai_observational_memory.md @@ -15,53 +15,53 @@ CREATE TABLE "instance_ai_observational_memory" ("id" varchar(36) PRIMARY KEY NO | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| lookupKey | varchar(255) | | false | | | | -| scope | varchar(16) | | false | | | | -| threadId | varchar | | true | | [instance_ai_threads](instance_ai_threads.md) | | -| resourceId | varchar(255) | | false | | | | | activeObservations | TEXT | '' | false | | | | -| originType | varchar(32) | | false | | | | -| config | TEXT | | false | | | | -| generationCount | INTEGER | 0 | false | | | | -| lastObservedAt | datetime(3) | | true | | | | -| pendingMessageTokens | INTEGER | 0 | false | | | | -| totalTokensObserved | INTEGER | 0 | false | | | | -| observationTokenCount | INTEGER | 0 | false | | | | -| isObserving | boolean | false | false | | | | -| isReflecting | boolean | false | false | | | | -| observedMessageIds | TEXT | | true | | | | -| observedTimezone | varchar | | true | | | | -| bufferedObservations | TEXT | | true | | | | -| bufferedObservationTokens | INTEGER | | true | | | | | bufferedMessageIds | TEXT | | true | | | | -| bufferedReflection | TEXT | | true | | | | -| bufferedReflectionTokens | INTEGER | | true | | | | -| bufferedReflectionInputTokens | INTEGER | | true | | | | -| reflectedObservationLineCount | INTEGER | | true | | | | | bufferedObservationChunks | TEXT | | true | | | | +| bufferedObservationTokens | INTEGER | | true | | | | +| bufferedObservations | TEXT | | true | | | | +| bufferedReflection | TEXT | | true | | | | +| bufferedReflectionInputTokens | INTEGER | | true | | | | +| bufferedReflectionTokens | INTEGER | | true | | | | +| config | TEXT | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| generationCount | INTEGER | 0 | false | | | | +| id | varchar(36) | | false | | | | | isBufferingObservation | boolean | false | false | | | | | isBufferingReflection | boolean | false | false | | | | -| lastBufferedAtTokens | INTEGER | 0 | false | | | | +| isObserving | boolean | false | false | | | | +| isReflecting | boolean | false | false | | | | | lastBufferedAtTime | datetime(3) | | true | | | | +| lastBufferedAtTokens | INTEGER | 0 | false | | | | +| lastObservedAt | datetime(3) | | true | | | | +| lookupKey | varchar(255) | | false | | | | | metadata | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| observationTokenCount | INTEGER | 0 | false | | | | +| observedMessageIds | TEXT | | true | | | | +| observedTimezone | varchar | | true | | | | +| originType | varchar(32) | | false | | | | +| pendingMessageTokens | INTEGER | 0 | false | | | | +| reflectedObservationLineCount | INTEGER | | true | | | | +| resourceId | varchar(255) | | false | | | | +| scope | varchar(16) | | false | | | | +| threadId | varchar | | true | | [instance_ai_threads](instance_ai_threads.md) | | +| totalTokensObserved | INTEGER | 0 | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_instance_ai_observational_memory_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_a680ac96aae02dc887bbaac512 | CREATE UNIQUE INDEX "IDX_a680ac96aae02dc887bbaac512" ON "instance_ai_observational_memory" ("scope", "threadId", "resourceId") | | IDX_92f13cb6bc694227e069447f7b | CREATE INDEX "IDX_92f13cb6bc694227e069447f7b" ON "instance_ai_observational_memory" ("lookupKey") | +| IDX_a680ac96aae02dc887bbaac512 | CREATE UNIQUE INDEX "IDX_a680ac96aae02dc887bbaac512" ON "instance_ai_observational_memory" ("scope", "threadId", "resourceId") | | sqlite_autoindex_instance_ai_observational_memory_1 | PRIMARY KEY (id) | ## Relations @@ -72,46 +72,46 @@ erDiagram "instance_ai_observational_memory" }o--o| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "instance_ai_observational_memory" { - varchar_36_ id PK - varchar_255_ lookupKey - varchar_16_ scope - varchar threadId FK - varchar_255_ resourceId TEXT activeObservations - varchar_32_ originType - TEXT config - INTEGER generationCount - datetime_3_ lastObservedAt - INTEGER pendingMessageTokens - INTEGER totalTokensObserved - INTEGER observationTokenCount - boolean isObserving - boolean isReflecting - TEXT observedMessageIds - varchar observedTimezone - TEXT bufferedObservations - INTEGER bufferedObservationTokens TEXT bufferedMessageIds - TEXT bufferedReflection - INTEGER bufferedReflectionTokens - INTEGER bufferedReflectionInputTokens - INTEGER reflectedObservationLineCount TEXT bufferedObservationChunks + INTEGER bufferedObservationTokens + TEXT bufferedObservations + TEXT bufferedReflection + INTEGER bufferedReflectionInputTokens + INTEGER bufferedReflectionTokens + TEXT config + datetime_3_ createdAt + INTEGER generationCount + varchar_36_ id PK boolean isBufferingObservation boolean isBufferingReflection - INTEGER lastBufferedAtTokens + boolean isObserving + boolean isReflecting datetime_3_ lastBufferedAtTime + INTEGER lastBufferedAtTokens + datetime_3_ lastObservedAt + varchar_255_ lookupKey TEXT metadata - datetime_3_ createdAt + INTEGER observationTokenCount + TEXT observedMessageIds + varchar observedTimezone + varchar_32_ originType + INTEGER pendingMessageTokens + INTEGER reflectedObservationLineCount + varchar_255_ resourceId + varchar_16_ scope + varchar threadId FK + INTEGER totalTokensObserved datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_observations.md b/docs/generated/sqlite-schema/instance_ai_observations.md index 1c8bc4315f2..ab4a4c77b68 100644 --- a/docs/generated/sqlite-schema/instance_ai_observations.md +++ b/docs/generated/sqlite-schema/instance_ai_observations.md @@ -15,36 +15,36 @@ CREATE TABLE "instance_ai_observations" ("id" varchar(36) PRIMARY KEY NOT NULL, | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | varchar(36) | | false | [instance_ai_observations](instance_ai_observations.md) | | | -| observationScopeId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | marker | varchar(16) | | false | | | | -| text | TEXT | | false | | | | +| observationScopeId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | | parentId | varchar(36) | | true | | [instance_ai_observations](instance_ai_observations.md) | | -| tokenCount | INTEGER | 0 | false | | | | | status | varchar(16) | | false | | | | | supersededBy | varchar(36) | | true | | [instance_ai_observations](instance_ai_observations.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| text | TEXT | | false | | | | +| tokenCount | INTEGER | 0 | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | +| - | CHECK | CHECK ("marker" IN ('critical', 'important', 'info', 'completion')) | +| - | CHECK | CHECK ("status" IN ('active', 'superseded', 'dropped')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (supersededBy) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (parentId) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_instance_ai_observations_1 | PRIMARY KEY | PRIMARY KEY (id) | -| - | CHECK | CHECK ("marker" IN ('critical', 'important', 'info', 'completion')) | -| - | CHECK | CHECK ("status" IN ('active', 'superseded', 'dropped')) | ## Indexes | Name | Definition | | ---- | ---------- | +| IDX_0d5db648188d338df7fb2a8064 | CREATE INDEX "IDX_0d5db648188d338df7fb2a8064" ON "instance_ai_observations" ("observationScopeId", "status", "createdAt", "id") | | IDX_a80e0ee839a2f10ba4b86e1999 | CREATE INDEX "IDX_a80e0ee839a2f10ba4b86e1999" ON "instance_ai_observations" ("supersededBy") | | IDX_daef2195a4a846eb70eed15e03 | CREATE INDEX "IDX_daef2195a4a846eb70eed15e03" ON "instance_ai_observations" ("parentId") | -| IDX_0d5db648188d338df7fb2a8064 | CREATE INDEX "IDX_0d5db648188d338df7fb2a8064" ON "instance_ai_observations" ("observationScopeId", "status", "createdAt", "id") | | sqlite_autoindex_instance_ai_observations_1 | PRIMARY KEY (id) | ## Relations @@ -57,24 +57,24 @@ erDiagram "instance_ai_observations" }o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_observations" { + datetime_3_ createdAt varchar_36_ id PK - varchar observationScopeId FK varchar_16_ marker - TEXT text + varchar observationScopeId FK varchar_36_ parentId FK - INTEGER tokenCount varchar_16_ status varchar_36_ supersededBy FK - datetime_3_ createdAt + TEXT text + INTEGER tokenCount datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_pending_confirmations.md b/docs/generated/sqlite-schema/instance_ai_pending_confirmations.md index ace96eac86c..af0c868e2a2 100644 --- a/docs/generated/sqlite-schema/instance_ai_pending_confirmations.md +++ b/docs/generated/sqlite-schema/instance_ai_pending_confirmations.md @@ -15,38 +15,38 @@ CREATE TABLE "instance_ai_pending_confirmations" ("requestId" varchar(36) PRIMAR | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| requestId | varchar(36) | | false | | | | -| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | -| userId | varchar | | false | | [user](user.md) | | -| kind | varchar(16) | | false | | | | -| runId | varchar(36) | | false | | | | -| toolCallId | varchar(64) | | true | | | | -| messageGroupId | varchar(36) | | true | | | | | checkpointKey | varchar(255) | | true | | [instance_ai_checkpoints](instance_ai_checkpoints.md) | | | checkpointTaskId | varchar(36) | | true | | | | -| expiresAt | datetime(3) | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| expiresAt | datetime(3) | | true | | | | +| kind | varchar(16) | | false | | | | +| messageGroupId | varchar(36) | | true | | | | +| requestId | varchar(36) | | false | | | | +| runId | varchar(36) | | false | | | | +| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | +| toolCallId | varchar(64) | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| requestId | PRIMARY KEY | PRIMARY KEY (requestId) | +| - | CHECK | CHECK ("kind" IN ('suspended', 'inline')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| requestId | PRIMARY KEY | PRIMARY KEY (requestId) | | sqlite_autoindex_instance_ai_pending_confirmations_1 | PRIMARY KEY | PRIMARY KEY (requestId) | -| - | CHECK | CHECK ("kind" IN ('suspended', 'inline')) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_d7a4aba7440449865e2b924377 | CREATE INDEX "IDX_d7a4aba7440449865e2b924377" ON "instance_ai_pending_confirmations" ("expiresAt") | | IDX_0babdf6e3b897a86fe4678355e | CREATE INDEX "IDX_0babdf6e3b897a86fe4678355e" ON "instance_ai_pending_confirmations" ("checkpointKey") | -| IDX_df5fd25c8bbfd2b042602600d8 | CREATE INDEX "IDX_df5fd25c8bbfd2b042602600d8" ON "instance_ai_pending_confirmations" ("userId") | | IDX_ba67ee8dc311830a2eea89b6e9 | CREATE INDEX "IDX_ba67ee8dc311830a2eea89b6e9" ON "instance_ai_pending_confirmations" ("threadId") | +| IDX_d7a4aba7440449865e2b924377 | CREATE INDEX "IDX_d7a4aba7440449865e2b924377" ON "instance_ai_pending_confirmations" ("expiresAt") | +| IDX_df5fd25c8bbfd2b042602600d8 | CREATE INDEX "IDX_df5fd25c8bbfd2b042602600d8" ON "instance_ai_pending_confirmations" ("userId") | | sqlite_autoindex_instance_ai_pending_confirmations_1 | PRIMARY KEY (requestId) | ## Relations @@ -54,59 +54,59 @@ CREATE TABLE "instance_ai_pending_confirmations" ("requestId" varchar(36) PRIMAR ```mermaid erDiagram +"instance_ai_pending_confirmations" }o--o| "instance_ai_checkpoints" : "FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_pending_confirmations" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_pending_confirmations" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_pending_confirmations" }o--o| "instance_ai_checkpoints" : "FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_pending_confirmations" { - varchar_36_ requestId PK - varchar threadId FK - varchar userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId - datetime_3_ expiresAt datetime_3_ createdAt + datetime_3_ expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId PK + varchar_36_ runId + varchar threadId FK + varchar_64_ toolCallId + datetime_3_ updatedAt + varchar userId FK +} +"instance_ai_checkpoints" { + datetime_3_ createdAt + datetime_3_ expiredAt + varchar_255_ key PK + varchar_255_ resourceId + varchar_255_ runId + TEXT state + varchar threadId FK datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"instance_ai_checkpoints" { - varchar_255_ key PK - varchar_255_ runId - varchar threadId FK - varchar_255_ resourceId - TEXT state - datetime_3_ createdAt + TEXT settings datetime_3_ updatedAt - datetime_3_ expiredAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_resources.md b/docs/generated/sqlite-schema/instance_ai_resources.md index 7a953639fd2..661f893e8ec 100644 --- a/docs/generated/sqlite-schema/instance_ai_resources.md +++ b/docs/generated/sqlite-schema/instance_ai_resources.md @@ -15,11 +15,11 @@ CREATE TABLE "instance_ai_resources" ("id" varchar(255) PRIMARY KEY NOT NULL, "w | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(255) | | false | | | | -| workingMemory | TEXT | | true | | | | -| metadata | TEXT | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(255) | | false | | | | +| metadata | TEXT | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workingMemory | TEXT | | true | | | | ## Constraints @@ -41,11 +41,11 @@ erDiagram "instance_ai_resources" { - varchar_255_ id PK - TEXT workingMemory - TEXT metadata datetime_3_ createdAt + varchar_255_ id PK + TEXT metadata datetime_3_ updatedAt + TEXT workingMemory } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_run_snapshots.md b/docs/generated/sqlite-schema/instance_ai_run_snapshots.md index e0c8629c39f..b0296d14fa2 100644 --- a/docs/generated/sqlite-schema/instance_ai_run_snapshots.md +++ b/docs/generated/sqlite-schema/instance_ai_run_snapshots.md @@ -15,26 +15,26 @@ CREATE TABLE "instance_ai_run_snapshots" ("threadId" varchar NOT NULL, "runId" v | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | -| runId | varchar(36) | | false | | | | -| messageGroupId | varchar(36) | | true | | | | -| runIds | TEXT | | true | | | | -| tree | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | langsmithRunId | varchar(36) | | true | | | | | langsmithTraceId | varchar(36) | | true | | | | -| traceId | varchar(64) | | true | | | | +| messageGroupId | varchar(36) | | true | | | | +| runId | varchar(36) | | false | | | | +| runIds | TEXT | | true | | | | | spanId | varchar(64) | | true | | | | +| threadId | varchar | | false | | [instance_ai_threads](instance_ai_threads.md) | | +| traceId | varchar(64) | | true | | | | +| tree | TEXT | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| threadId | PRIMARY KEY | PRIMARY KEY (threadId) | -| runId | PRIMARY KEY | PRIMARY KEY (runId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| runId | PRIMARY KEY | PRIMARY KEY (runId) | | sqlite_autoindex_instance_ai_run_snapshots_1 | PRIMARY KEY | PRIMARY KEY (threadId, runId) | +| threadId | PRIMARY KEY | PRIMARY KEY (threadId) | ## Indexes @@ -52,25 +52,25 @@ erDiagram "instance_ai_run_snapshots" |o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_run_snapshots" { - varchar threadId PK - varchar_36_ runId PK - varchar_36_ messageGroupId - TEXT runIds - TEXT tree datetime_3_ createdAt - datetime_3_ updatedAt varchar_36_ langsmithRunId varchar_36_ langsmithTraceId - varchar_64_ traceId + varchar_36_ messageGroupId + varchar_36_ runId PK + TEXT runIds varchar_64_ spanId + varchar threadId PK + varchar_64_ traceId + TEXT tree + datetime_3_ updatedAt } "instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_threads.md b/docs/generated/sqlite-schema/instance_ai_threads.md index 7cb48c22c3f..e6b321e4a5f 100644 --- a/docs/generated/sqlite-schema/instance_ai_threads.md +++ b/docs/generated/sqlite-schema/instance_ai_threads.md @@ -15,20 +15,20 @@ CREATE TABLE "instance_ai_threads" ("id" varchar PRIMARY KEY NOT NULL, "resource | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [instance_ai_messages](instance_ai_messages.md) [instance_ai_observational_memory](instance_ai_observational_memory.md) [instance_ai_iteration_logs](instance_ai_iteration_logs.md) [ai_builder_temporary_workflow](ai_builder_temporary_workflow.md) [instance_ai_run_snapshots](instance_ai_run_snapshots.md) [instance_ai_observations](instance_ai_observations.md) [instance_ai_observation_cursors](instance_ai_observation_cursors.md) [instance_ai_observation_locks](instance_ai_observation_locks.md) [instance_ai_checkpoints](instance_ai_checkpoints.md) [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) | | | -| resourceId | varchar(255) | | false | | | | -| projectId | varchar(36) | | false | | [project](project.md) | | -| title | TEXT | '' | false | | | | -| metadata | TEXT | | true | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar | | false | [ai_builder_temporary_workflow](ai_builder_temporary_workflow.md) [instance_ai_checkpoints](instance_ai_checkpoints.md) [instance_ai_iteration_logs](instance_ai_iteration_logs.md) [instance_ai_messages](instance_ai_messages.md) [instance_ai_observation_cursors](instance_ai_observation_cursors.md) [instance_ai_observation_locks](instance_ai_observation_locks.md) [instance_ai_observational_memory](instance_ai_observational_memory.md) [instance_ai_observations](instance_ai_observations.md) [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) [instance_ai_run_snapshots](instance_ai_run_snapshots.md) | | | +| metadata | TEXT | | true | | | | +| projectId | varchar(36) | | false | | [project](project.md) | | +| resourceId | varchar(255) | | false | | | | +| title | TEXT | '' | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_instance_ai_threads_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -44,159 +44,159 @@ CREATE TABLE "instance_ai_threads" ("id" varchar PRIMARY KEY NOT NULL, "resource ```mermaid erDiagram -"instance_ai_messages" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_observational_memory" }o--o| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"instance_ai_iteration_logs" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "ai_builder_temporary_workflow" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_run_snapshots" |o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_observations" }o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_checkpoints" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_iteration_logs" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_messages" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_observation_cursors" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_observation_locks" |o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_checkpoints" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_observational_memory" }o--o| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"instance_ai_observations" }o--|| "instance_ai_threads" : "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_pending_confirmations" }o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_run_snapshots" |o--|| "instance_ai_threads" : "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "instance_ai_threads" { + datetime_3_ createdAt varchar id PK - varchar_255_ resourceId + TEXT metadata varchar_36_ projectId FK + varchar_255_ resourceId TEXT title - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_messages" { - varchar_36_ id PK - varchar threadId FK - TEXT content - varchar_16_ role - varchar_32_ type - varchar_255_ resourceId - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_observational_memory" { - varchar_36_ id PK - varchar_255_ lookupKey - varchar_16_ scope - varchar threadId FK - varchar_255_ resourceId - TEXT activeObservations - varchar_32_ originType - TEXT config - INTEGER generationCount - datetime_3_ lastObservedAt - INTEGER pendingMessageTokens - INTEGER totalTokensObserved - INTEGER observationTokenCount - boolean isObserving - boolean isReflecting - TEXT observedMessageIds - varchar observedTimezone - TEXT bufferedObservations - INTEGER bufferedObservationTokens - TEXT bufferedMessageIds - TEXT bufferedReflection - INTEGER bufferedReflectionTokens - INTEGER bufferedReflectionInputTokens - INTEGER reflectedObservationLineCount - TEXT bufferedObservationChunks - boolean isBufferingObservation - boolean isBufferingReflection - INTEGER lastBufferedAtTokens - datetime_3_ lastBufferedAtTime - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt -} -"instance_ai_iteration_logs" { - varchar_36_ id PK - varchar threadId FK - varchar taskKey - TEXT entry - datetime_3_ createdAt datetime_3_ updatedAt } "ai_builder_temporary_workflow" { - varchar_36_ workflowId PK + datetime_3_ createdAt varchar threadId FK + datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"instance_ai_checkpoints" { datetime_3_ createdAt + datetime_3_ expiredAt + varchar_255_ key PK + varchar_255_ resourceId + varchar_255_ runId + TEXT state + varchar threadId FK datetime_3_ updatedAt } -"instance_ai_run_snapshots" { - varchar threadId PK - varchar_36_ runId PK - varchar_36_ messageGroupId - TEXT runIds - TEXT tree +"instance_ai_iteration_logs" { datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ langsmithRunId - varchar_36_ langsmithTraceId - varchar_64_ traceId - varchar_64_ spanId -} -"instance_ai_observations" { + TEXT entry varchar_36_ id PK - varchar observationScopeId FK - varchar_16_ marker - TEXT text - varchar_36_ parentId FK - INTEGER tokenCount - varchar_16_ status - varchar_36_ supersededBy FK + varchar taskKey + varchar threadId FK + datetime_3_ updatedAt +} +"instance_ai_messages" { + TEXT content datetime_3_ createdAt + varchar_36_ id PK + varchar_255_ resourceId + varchar_16_ role + varchar threadId FK + varchar_32_ type datetime_3_ updatedAt } "instance_ai_observation_cursors" { - varchar observationScopeId PK - varchar_36_ lastObservedMessageId - datetime_3_ lastObservedAt datetime_3_ createdAt + datetime_3_ lastObservedAt + varchar_36_ lastObservedMessageId + varchar observationScopeId PK datetime_3_ updatedAt } "instance_ai_observation_locks" { + datetime_3_ createdAt + datetime_3_ heldUntil + varchar_64_ holderId varchar observationScopeId PK varchar_20_ taskKind PK - varchar_64_ holderId - datetime_3_ heldUntil - datetime_3_ createdAt datetime_3_ updatedAt } -"instance_ai_checkpoints" { - varchar_255_ key PK - varchar_255_ runId - varchar threadId FK - varchar_255_ resourceId - TEXT state +"instance_ai_observational_memory" { + TEXT activeObservations + TEXT bufferedMessageIds + TEXT bufferedObservationChunks + INTEGER bufferedObservationTokens + TEXT bufferedObservations + TEXT bufferedReflection + INTEGER bufferedReflectionInputTokens + INTEGER bufferedReflectionTokens + TEXT config datetime_3_ createdAt + INTEGER generationCount + varchar_36_ id PK + boolean isBufferingObservation + boolean isBufferingReflection + boolean isObserving + boolean isReflecting + datetime_3_ lastBufferedAtTime + INTEGER lastBufferedAtTokens + datetime_3_ lastObservedAt + varchar_255_ lookupKey + TEXT metadata + INTEGER observationTokenCount + TEXT observedMessageIds + varchar observedTimezone + varchar_32_ originType + INTEGER pendingMessageTokens + INTEGER reflectedObservationLineCount + varchar_255_ resourceId + varchar_16_ scope + varchar threadId FK + INTEGER totalTokensObserved + datetime_3_ updatedAt +} +"instance_ai_observations" { + datetime_3_ createdAt + varchar_36_ id PK + varchar_16_ marker + varchar observationScopeId FK + varchar_36_ parentId FK + varchar_16_ status + varchar_36_ supersededBy FK + TEXT text + INTEGER tokenCount datetime_3_ updatedAt - datetime_3_ expiredAt } "instance_ai_pending_confirmations" { - varchar_36_ requestId PK - varchar threadId FK - varchar userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId - datetime_3_ expiresAt datetime_3_ createdAt + datetime_3_ expiresAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId PK + varchar_36_ runId + varchar threadId FK + varchar_64_ toolCallId + datetime_3_ updatedAt + varchar userId FK +} +"instance_ai_run_snapshots" { + datetime_3_ createdAt + varchar_36_ langsmithRunId + varchar_36_ langsmithTraceId + varchar_36_ messageGroupId + varchar_36_ runId PK + TEXT runIds + varchar_64_ spanId + varchar threadId PK + varchar_64_ traceId + TEXT tree datetime_3_ updatedAt } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } ``` diff --git a/docs/generated/sqlite-schema/instance_ai_workflow_snapshots.md b/docs/generated/sqlite-schema/instance_ai_workflow_snapshots.md index 830cdb8046b..0252e891312 100644 --- a/docs/generated/sqlite-schema/instance_ai_workflow_snapshots.md +++ b/docs/generated/sqlite-schema/instance_ai_workflow_snapshots.md @@ -15,21 +15,21 @@ CREATE TABLE "instance_ai_workflow_snapshots" ("runId" varchar(36) NOT NULL, "wo | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| runId | varchar(36) | | false | | | | -| workflowName | varchar(255) | | false | | | | -| resourceId | varchar(255) | | true | | | | -| status | varchar | | true | | | | -| snapshot | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| resourceId | varchar(255) | | true | | | | +| runId | varchar(36) | | false | | | | +| snapshot | TEXT | | false | | | | +| status | varchar | | true | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowName | varchar(255) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | | runId | PRIMARY KEY | PRIMARY KEY (runId) | -| workflowName | PRIMARY KEY | PRIMARY KEY (workflowName) | | sqlite_autoindex_instance_ai_workflow_snapshots_1 | PRIMARY KEY | PRIMARY KEY (runId, workflowName) | +| workflowName | PRIMARY KEY | PRIMARY KEY (workflowName) | ## Indexes @@ -45,13 +45,13 @@ erDiagram "instance_ai_workflow_snapshots" { - varchar_36_ runId PK - varchar_255_ workflowName PK - varchar_255_ resourceId - varchar status - TEXT snapshot datetime_3_ createdAt + varchar_255_ resourceId + varchar_36_ runId PK + TEXT snapshot + varchar status datetime_3_ updatedAt + varchar_255_ workflowName PK } ``` diff --git a/docs/generated/sqlite-schema/instance_version_history.md b/docs/generated/sqlite-schema/instance_version_history.md index c6ac6c5de28..8245d42b0ea 100644 --- a/docs/generated/sqlite-schema/instance_version_history.md +++ b/docs/generated/sqlite-schema/instance_version_history.md @@ -15,11 +15,11 @@ CREATE TABLE "instance_version_history" ("id" integer PRIMARY KEY AUTOINCREMENT | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | INTEGER | | false | | | | | major | INTEGER | | false | | | | | minor | INTEGER | | false | | | | | patch | INTEGER | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -34,11 +34,11 @@ erDiagram "instance_version_history" { + datetime_3_ createdAt INTEGER id INTEGER major INTEGER minor INTEGER patch - datetime_3_ createdAt } ``` diff --git a/docs/generated/sqlite-schema/invalid_auth_token.md b/docs/generated/sqlite-schema/invalid_auth_token.md index d491f81dbf5..27647341e24 100644 --- a/docs/generated/sqlite-schema/invalid_auth_token.md +++ b/docs/generated/sqlite-schema/invalid_auth_token.md @@ -15,15 +15,15 @@ CREATE TABLE "invalid_auth_token" ("token" varchar(512) PRIMARY KEY NOT NULL, "e | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| token | varchar(512) | | false | | | | | expiresAt | datetime(3) | | false | | | | +| token | varchar(512) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| token | PRIMARY KEY | PRIMARY KEY (token) | | sqlite_autoindex_invalid_auth_token_1 | PRIMARY KEY | PRIMARY KEY (token) | +| token | PRIMARY KEY | PRIMARY KEY (token) | ## Indexes @@ -38,8 +38,8 @@ erDiagram "invalid_auth_token" { - varchar_512_ token PK datetime_3_ expiresAt + varchar_512_ token PK } ``` diff --git a/docs/generated/sqlite-schema/mcp_registry_server.md b/docs/generated/sqlite-schema/mcp_registry_server.md index 87df7b165da..5083e42d24b 100644 --- a/docs/generated/sqlite-schema/mcp_registry_server.md +++ b/docs/generated/sqlite-schema/mcp_registry_server.md @@ -15,21 +15,21 @@ CREATE TABLE "mcp_registry_server" ("slug" varchar(255) PRIMARY KEY NOT NULL, "s | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| data | TEXT | '{}' | false | | | | +| registryUpdatedAt | datetime(3) | | false | | | | | slug | varchar(255) | | false | [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) | | | | status | varchar(50) | | false | | | | -| version | varchar(50) | | false | | | | -| registryUpdatedAt | datetime(3) | | false | | | | -| data | TEXT | '{}' | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| version | varchar(50) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | +| - | CHECK | CHECK ("status" IN ('active', 'deprecated')) | | slug | PRIMARY KEY | PRIMARY KEY (slug) | | sqlite_autoindex_mcp_registry_server_1 | PRIMARY KEY | PRIMARY KEY (slug) | -| - | CHECK | CHECK ("status" IN ('active', 'deprecated')) | ## Indexes @@ -45,22 +45,22 @@ erDiagram "instance_ai_mcp_registry_connections" }o--|| "mcp_registry_server" : "FOREIGN KEY (serverSlug) REFERENCES mcp_registry_server (slug) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "mcp_registry_server" { + datetime_3_ createdAt + TEXT data + datetime_3_ registryUpdatedAt varchar_255_ slug PK varchar_50_ status - varchar_50_ version - datetime_3_ registryUpdatedAt - TEXT data - datetime_3_ createdAt datetime_3_ updatedAt + varchar_50_ version } "instance_ai_mcp_registry_connections" { - varchar id PK + datetime_3_ createdAt varchar_36_ credentialId FK + varchar id PK varchar_255_ serverSlug FK TEXT toolFilter - varchar userId FK - datetime_3_ createdAt datetime_3_ updatedAt + varchar userId FK } ``` diff --git a/docs/generated/sqlite-schema/oauth_access_tokens.md b/docs/generated/sqlite-schema/oauth_access_tokens.md index 64e4370a0bc..b8e4d97757b 100644 --- a/docs/generated/sqlite-schema/oauth_access_tokens.md +++ b/docs/generated/sqlite-schema/oauth_access_tokens.md @@ -15,18 +15,18 @@ CREATE TABLE "oauth_access_tokens" ("token" varchar PRIMARY KEY NOT NULL, "clien | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| token | varchar | | false | | | | | clientId | varchar | | false | | [oauth_clients](oauth_clients.md) | | +| token | varchar | | false | | | | | userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| token | PRIMARY KEY | PRIMARY KEY (token) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_oauth_access_tokens_1 | PRIMARY KEY | PRIMARY KEY (token) | +| token | PRIMARY KEY | PRIMARY KEY (token) | ## Indexes @@ -43,37 +43,37 @@ erDiagram "oauth_access_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_access_tokens" { - varchar token PK varchar clientId FK + varchar token PK varchar userId FK } "oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + datetime_3_ createdAt + TEXT grantTypes varchar id PK varchar_255_ name TEXT redirectUris - TEXT grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - datetime_3_ createdAt datetime_3_ updatedAt } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/oauth_authorization_codes.md b/docs/generated/sqlite-schema/oauth_authorization_codes.md index da1d21912d6..446e13cb6ae 100644 --- a/docs/generated/sqlite-schema/oauth_authorization_codes.md +++ b/docs/generated/sqlite-schema/oauth_authorization_codes.md @@ -15,27 +15,27 @@ CREATE TABLE "oauth_authorization_codes" ("code" varchar(255) PRIMARY KEY NOT NU | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| code | varchar(255) | | false | | | | | clientId | varchar | | false | | [oauth_clients](oauth_clients.md) | | -| userId | varchar | | false | | [user](user.md) | | -| redirectUri | varchar | | false | | | | +| code | varchar(255) | | false | | | | | codeChallenge | varchar | | false | | | | | codeChallengeMethod | varchar(255) | | false | | | | -| expiresAt | bigint | | false | | | | -| state | varchar | | true | | | | -| used | boolean | false | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| expiresAt | bigint | | false | | | | +| redirectUri | varchar | | false | | | | | resource | varchar | | true | | | | | scope | TEXT | '["tool:listWorkflows","tool:getWorkflowDetails"]' | false | | | | +| state | varchar | | true | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| used | boolean | false | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| code | PRIMARY KEY | PRIMARY KEY (code) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| code | PRIMARY KEY | PRIMARY KEY (code) | | sqlite_autoindex_oauth_authorization_codes_1 | PRIMARY KEY | PRIMARY KEY (code) | ## Indexes @@ -53,47 +53,47 @@ erDiagram "oauth_authorization_codes" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_authorization_codes" { - varchar_255_ code PK varchar clientId FK - varchar userId FK - varchar redirectUri + varchar_255_ code PK varchar codeChallenge varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used datetime_3_ createdAt - datetime_3_ updatedAt + bigint expiresAt + varchar redirectUri varchar resource TEXT scope + varchar state + datetime_3_ updatedAt + boolean used + varchar userId FK } "oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + datetime_3_ createdAt + TEXT grantTypes varchar id PK varchar_255_ name TEXT redirectUris - TEXT grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - datetime_3_ createdAt datetime_3_ updatedAt } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/oauth_clients.md b/docs/generated/sqlite-schema/oauth_clients.md index 165739d6f46..d7f41c6b15e 100644 --- a/docs/generated/sqlite-schema/oauth_clients.md +++ b/docs/generated/sqlite-schema/oauth_clients.md @@ -15,14 +15,14 @@ CREATE TABLE "oauth_clients" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar( | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | false | [oauth_access_tokens](oauth_access_tokens.md) [oauth_user_consents](oauth_user_consents.md) [oauth_authorization_codes](oauth_authorization_codes.md) [oauth_refresh_tokens](oauth_refresh_tokens.md) | | | -| name | varchar(255) | | false | | | | -| redirectUris | TEXT | | false | | | | -| grantTypes | TEXT | | false | | | | | clientSecret | varchar(255) | | true | | | | | clientSecretExpiresAt | bigint | | true | | | | -| tokenEndpointAuthMethod | varchar(255) | 'none' | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| grantTypes | TEXT | | false | | | | +| id | varchar | | false | [oauth_access_tokens](oauth_access_tokens.md) [oauth_authorization_codes](oauth_authorization_codes.md) [oauth_refresh_tokens](oauth_refresh_tokens.md) [oauth_user_consents](oauth_user_consents.md) | | | +| name | varchar(255) | | false | | | | +| redirectUris | TEXT | | false | | | | +| tokenEndpointAuthMethod | varchar(255) | 'none' | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -44,55 +44,55 @@ CREATE TABLE "oauth_clients" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar( erDiagram "oauth_access_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_authorization_codes" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_refresh_tokens" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + datetime_3_ createdAt + TEXT grantTypes varchar id PK varchar_255_ name TEXT redirectUris - TEXT grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - datetime_3_ createdAt datetime_3_ updatedAt } "oauth_access_tokens" { - varchar token PK varchar clientId FK + varchar token PK + varchar userId FK +} +"oauth_authorization_codes" { + varchar clientId FK + varchar_255_ code PK + varchar codeChallenge + varchar_255_ codeChallengeMethod + datetime_3_ createdAt + bigint expiresAt + varchar redirectUri + varchar resource + TEXT scope + varchar state + datetime_3_ updatedAt + boolean used + varchar userId FK +} +"oauth_refresh_tokens" { + varchar clientId FK + datetime_3_ createdAt + bigint expiresAt + TEXT scope + varchar_255_ token PK + datetime_3_ updatedAt varchar userId FK } "oauth_user_consents" { - INTEGER id - varchar userId FK varchar clientId FK bigint grantedAt -} -"oauth_authorization_codes" { - varchar_255_ code PK - varchar clientId FK + INTEGER id varchar userId FK - varchar redirectUri - varchar codeChallenge - varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used - datetime_3_ createdAt - datetime_3_ updatedAt - varchar resource - TEXT scope -} -"oauth_refresh_tokens" { - varchar_255_ token PK - varchar clientId FK - varchar userId FK - bigint expiresAt - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT scope } ``` diff --git a/docs/generated/sqlite-schema/oauth_refresh_tokens.md b/docs/generated/sqlite-schema/oauth_refresh_tokens.md index 4009cf9ae95..075a5050cfd 100644 --- a/docs/generated/sqlite-schema/oauth_refresh_tokens.md +++ b/docs/generated/sqlite-schema/oauth_refresh_tokens.md @@ -15,22 +15,22 @@ CREATE TABLE "oauth_refresh_tokens" ("token" varchar(255) PRIMARY KEY NOT NULL, | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| token | varchar(255) | | false | | | | | clientId | varchar | | false | | [oauth_clients](oauth_clients.md) | | -| userId | varchar | | false | | [user](user.md) | | -| expiresAt | bigint | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| expiresAt | bigint | | false | | | | | scope | TEXT | '["tool:listWorkflows","tool:getWorkflowDetails"]' | false | | | | +| token | varchar(255) | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| token | PRIMARY KEY | PRIMARY KEY (token) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_oauth_refresh_tokens_1 | PRIMARY KEY | PRIMARY KEY (token) | +| token | PRIMARY KEY | PRIMARY KEY (token) | ## Indexes @@ -47,41 +47,41 @@ erDiagram "oauth_refresh_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_refresh_tokens" { - varchar_255_ token PK varchar clientId FK - varchar userId FK - bigint expiresAt datetime_3_ createdAt - datetime_3_ updatedAt + bigint expiresAt TEXT scope + varchar_255_ token PK + datetime_3_ updatedAt + varchar userId FK } "oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + datetime_3_ createdAt + TEXT grantTypes varchar id PK varchar_255_ name TEXT redirectUris - TEXT grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod - datetime_3_ createdAt datetime_3_ updatedAt } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/oauth_user_consents.md b/docs/generated/sqlite-schema/oauth_user_consents.md index e0ce4550f49..9488f8c1ffd 100644 --- a/docs/generated/sqlite-schema/oauth_user_consents.md +++ b/docs/generated/sqlite-schema/oauth_user_consents.md @@ -15,18 +15,18 @@ CREATE TABLE "oauth_user_consents" ("id" integer PRIMARY KEY NOT NULL, "userId" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | | | | -| userId | varchar | | false | | [user](user.md) | | | clientId | varchar | | false | | [oauth_clients](oauth_clients.md) | | | grantedAt | bigint | | false | | | | +| id | INTEGER | | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_oauth_user_consents_1 | UNIQUE | UNIQUE (userId, clientId) | ## Indexes @@ -40,41 +40,41 @@ CREATE TABLE "oauth_user_consents" ("id" integer PRIMARY KEY NOT NULL, "userId" ```mermaid erDiagram -"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_user_consents" { - INTEGER id - varchar userId FK varchar clientId FK bigint grantedAt -} -"user" { - varchar id PK - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar password - TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK + INTEGER id + varchar userId FK } "oauth_clients" { + varchar_255_ clientSecret + bigint clientSecretExpiresAt + datetime_3_ createdAt + TEXT grantTypes varchar id PK varchar_255_ name TEXT redirectUris - TEXT grantTypes - varchar_255_ clientSecret - bigint clientSecretExpiresAt varchar_255_ tokenEndpointAuthMethod + datetime_3_ updatedAt +} +"user" { datetime_3_ createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + varchar id PK + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret + varchar password + TEXT personalizationAnswers + varchar_128_ roleSlug FK + TEXT settings datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/processed_data.md b/docs/generated/sqlite-schema/processed_data.md index 28d6eb358ab..0680dae9992 100644 --- a/docs/generated/sqlite-schema/processed_data.md +++ b/docs/generated/sqlite-schema/processed_data.md @@ -15,20 +15,20 @@ CREATE TABLE "processed_data" ("workflowId" varchar(36) NOT NULL, "context" varc | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | | context | varchar(255) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | value | TEXT | | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | -| context | PRIMARY KEY | PRIMARY KEY (context) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| context | PRIMARY KEY | PRIMARY KEY (context) | | sqlite_autoindex_processed_data_1 | PRIMARY KEY | PRIMARY KEY (workflowId, context) | +| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | ## Indexes @@ -44,33 +44,33 @@ erDiagram "processed_data" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "processed_data" { - varchar_36_ workflowId PK varchar_255_ context PK datetime_3_ createdAt datetime_3_ updatedAt TEXT value + varchar_36_ workflowId PK } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/project.md b/docs/generated/sqlite-schema/project.md index 3c547cf881f..dae80983604 100644 --- a/docs/generated/sqlite-schema/project.md +++ b/docs/generated/sqlite-schema/project.md @@ -15,22 +15,22 @@ CREATE TABLE "project" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(25 | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [shared_credentials](shared_credentials.md) [shared_workflow](shared_workflow.md) [folder](folder.md) [insights_metadata](insights_metadata.md) [project_relation](project_relation.md) [data_table](data_table.md) [variables](variables.md) [project_secrets_provider_access](project_secrets_provider_access.md) [role_mapping_rule_project](role_mapping_rule_project.md) [agents](agents.md) [agent_execution_threads](agent_execution_threads.md) [instance_ai_threads](instance_ai_threads.md) | | | -| name | varchar(255) | | false | | | | -| type | varchar(36) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| icon | TEXT | | true | | | | -| description | varchar(512) | | true | | | | | creatorId | varchar | | true | | [user](user.md) | | | customTelemetryTags | TEXT | '[]' | false | | | | +| description | varchar(512) | | true | | | | +| icon | TEXT | | true | | | | +| id | varchar(36) | | false | [agent_execution_threads](agent_execution_threads.md) [agents](agents.md) [data_table](data_table.md) [folder](folder.md) [insights_metadata](insights_metadata.md) [instance_ai_threads](instance_ai_threads.md) [project_relation](project_relation.md) [project_secrets_provider_access](project_secrets_provider_access.md) [role_mapping_rule_project](role_mapping_rule_project.md) [shared_credentials](shared_credentials.md) [shared_workflow](shared_workflow.md) [variables](variables.md) | | | +| name | varchar(255) | | false | | | | +| type | varchar(36) | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_project_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -44,150 +44,150 @@ CREATE TABLE "project" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar(25 ```mermaid erDiagram -"shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "folder" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "insights_metadata" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"instance_ai_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project_relation" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"data_table" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"variables" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project_secrets_provider_access" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agents" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"agent_execution_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"instance_ai_threads" }o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"variables" }o--o| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon +} +"user" { + datetime_3_ createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + varchar id PK + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret + varchar password + TEXT personalizationAnswers + varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt +} +"agent_execution_threads" { + varchar_36_ agentId FK + varchar_255_ agentName + datetime_3_ createdAt + varchar_8_ emoji + varchar_128_ id PK + varchar_36_ parentAgentId + varchar_128_ parentThreadId + varchar_255_ projectId FK + INTEGER sessionNumber + varchar_32_ taskId + varchar_36_ taskVersionId FK + varchar_255_ title + INTEGER totalCompletionTokens + REAL totalCost + INTEGER totalDuration + INTEGER totalPromptTokens + datetime_3_ updatedAt +} +"agents" { + varchar_36_ activeVersionId FK + datetime_3_ createdAt varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags -} -"shared_credentials" { - varchar_36_ credentialsId PK - varchar_36_ projectId PK - TEXT role - datetime_3_ createdAt + varchar_36_ id PK + TEXT integrations + varchar_128_ name + varchar_255_ projectId FK + TEXT schema + TEXT skills + TEXT tools datetime_3_ updatedAt + varchar_36_ versionId } -"shared_workflow" { - varchar_36_ workflowId PK - varchar_36_ projectId PK - TEXT role +"data_table" { datetime_3_ createdAt + varchar_36_ id PK + varchar_128_ name + varchar_36_ projectId FK datetime_3_ updatedAt } "folder" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - datetime_3_ createdAt datetime_3_ updatedAt } "insights_metadata" { INTEGER metaId - varchar_16_ workflowId FK varchar_36_ projectId FK - varchar_128_ workflowName varchar_255_ projectName + varchar_16_ workflowId FK + varchar_128_ workflowName +} +"instance_ai_threads" { + datetime_3_ createdAt + varchar id PK + TEXT metadata + varchar_36_ projectId FK + varchar_255_ resourceId + TEXT title + datetime_3_ updatedAt } "project_relation" { - varchar_36_ projectId PK - varchar userId PK - varchar role FK datetime_3_ createdAt + varchar_36_ projectId PK + varchar role FK + datetime_3_ updatedAt + varchar userId PK +} +"project_secrets_provider_access" { + datetime_3_ createdAt + varchar_36_ projectId PK + varchar_128_ role + INTEGER secretsProviderConnectionId PK datetime_3_ updatedAt } -"data_table" { - varchar_36_ id PK - varchar_128_ name - varchar_36_ projectId FK +"role_mapping_rule_project" { + varchar_36_ projectId PK + varchar_16_ roleMappingRuleId PK +} +"shared_credentials" { datetime_3_ createdAt + varchar_36_ credentialsId PK + varchar_36_ projectId PK + TEXT role datetime_3_ updatedAt } +"shared_workflow" { + datetime_3_ createdAt + varchar_36_ projectId PK + TEXT role + datetime_3_ updatedAt + varchar_36_ workflowId PK +} "variables" { varchar_36_ id PK TEXT key + varchar_36_ projectId FK TEXT type TEXT value - varchar_36_ projectId FK -} -"project_secrets_provider_access" { - INTEGER secretsProviderConnectionId PK - varchar_36_ projectId PK - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_128_ role -} -"role_mapping_rule_project" { - varchar_16_ roleMappingRuleId PK - varchar_36_ projectId PK -} -"agents" { - varchar_36_ id PK - varchar_128_ name - varchar_512_ description - varchar_255_ projectId FK - TEXT integrations - TEXT schema - TEXT tools - TEXT skills - varchar_36_ versionId - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ activeVersionId FK -} -"agent_execution_threads" { - varchar_128_ id PK - varchar_36_ agentId FK - varchar_255_ agentName - varchar_255_ projectId FK - INTEGER sessionNumber - INTEGER totalPromptTokens - INTEGER totalCompletionTokens - REAL totalCost - INTEGER totalDuration - varchar_255_ title - varchar_8_ emoji - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_32_ taskId - varchar_36_ taskVersionId FK - varchar_128_ parentThreadId - varchar_36_ parentAgentId -} -"instance_ai_threads" { - varchar id PK - varchar_255_ resourceId - varchar_36_ projectId FK - TEXT title - TEXT metadata - datetime_3_ createdAt - datetime_3_ updatedAt -} -"user" { - varchar id PK - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar password - TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK } ``` diff --git a/docs/generated/sqlite-schema/project_relation.md b/docs/generated/sqlite-schema/project_relation.md index 5e5b49ffb13..fa531fcae4f 100644 --- a/docs/generated/sqlite-schema/project_relation.md +++ b/docs/generated/sqlite-schema/project_relation.md @@ -15,31 +15,31 @@ CREATE TABLE "project_relation" ("projectId" varchar(36) NOT NULL, "userId" varc | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| projectId | varchar(36) | | false | | [project](project.md) | | -| userId | varchar | | false | | [user](user.md) | | -| role | varchar | | false | | [role](role.md) | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| projectId | varchar(36) | | false | | [project](project.md) | | +| role | varchar | | false | | [role](role.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | -| userId | PRIMARY KEY | PRIMARY KEY (userId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | | sqlite_autoindex_project_relation_1 | PRIMARY KEY | PRIMARY KEY (projectId, userId) | +| userId | PRIMARY KEY | PRIMARY KEY (userId) | ## Indexes | Name | Definition | | ---- | ---------- | -| project_relation_role_project_idx | CREATE INDEX "project_relation_role_project_idx" ON "project_relation" ("projectId", "role") | -| project_relation_role_idx | CREATE INDEX "project_relation_role_idx" ON "project_relation" ("role") | -| IDX_61448d56d61802b5dfde5cdb00 | CREATE INDEX "IDX_61448d56d61802b5dfde5cdb00" ON "project_relation" ("projectId") | | IDX_5f0643f6717905a05164090dde | CREATE INDEX "IDX_5f0643f6717905a05164090dde" ON "project_relation" ("userId") | +| IDX_61448d56d61802b5dfde5cdb00 | CREATE INDEX "IDX_61448d56d61802b5dfde5cdb00" ON "project_relation" ("projectId") | +| project_relation_role_idx | CREATE INDEX "project_relation_role_idx" ON "project_relation" ("role") | +| project_relation_role_project_idx | CREATE INDEX "project_relation_role_project_idx" ON "project_relation" ("projectId", "role") | | sqlite_autoindex_project_relation_1 | PRIMARY KEY (projectId, userId) | ## Relations @@ -48,51 +48,51 @@ CREATE TABLE "project_relation" ("projectId" varchar(36) NOT NULL, "userId" varc erDiagram "project_relation" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project_relation" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" +"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project_relation" { - varchar_36_ projectId PK - varchar userId PK - varchar role FK datetime_3_ createdAt + varchar_36_ projectId PK + varchar role FK datetime_3_ updatedAt + varchar userId PK } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags -} -"user" { - varchar id PK - varchar_255_ email - varchar_32_ firstName - varchar_32_ lastName - varchar password - TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt - varchar_128_ roleSlug FK } "role" { - varchar_128_ slug PK - TEXT displayName - TEXT description - TEXT roleType - boolean systemRole datetime_3_ createdAt + TEXT description + TEXT displayName + TEXT roleType + varchar_128_ slug PK + boolean systemRole + datetime_3_ updatedAt +} +"user" { + datetime_3_ createdAt + boolean disabled + varchar_255_ email + varchar_32_ firstName + varchar id PK + date lastActiveAt + varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret + varchar password + TEXT personalizationAnswers + varchar_128_ roleSlug FK + TEXT settings datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/project_secrets_provider_access.md b/docs/generated/sqlite-schema/project_secrets_provider_access.md index 748906b7b07..094d6f230d9 100644 --- a/docs/generated/sqlite-schema/project_secrets_provider_access.md +++ b/docs/generated/sqlite-schema/project_secrets_provider_access.md @@ -15,22 +15,22 @@ CREATE TABLE "project_secrets_provider_access" ("secretsProviderConnectionId" in | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| secretsProviderConnectionId | INTEGER | | false | | [secrets_provider_connection](secrets_provider_connection.md) | | -| projectId | varchar(36) | | false | | [project](project.md) | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| projectId | varchar(36) | | false | | [project](project.md) | | | role | varchar(128) | 'secretsProviderConnection:user' | false | | | | +| secretsProviderConnectionId | INTEGER | | false | | [secrets_provider_connection](secrets_provider_connection.md) | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| secretsProviderConnectionId | PRIMARY KEY | PRIMARY KEY (secretsProviderConnectionId) | -| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | +| - | CHECK | CHECK ("role" IN ('secretsProviderConnection:owner', 'secretsProviderConnection:user')) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | +| secretsProviderConnectionId | PRIMARY KEY | PRIMARY KEY (secretsProviderConnectionId) | | sqlite_autoindex_project_secrets_provider_access_1 | PRIMARY KEY | PRIMARY KEY (secretsProviderConnectionId, projectId) | -| - | CHECK | CHECK ("role" IN ('secretsProviderConnection:owner', 'secretsProviderConnection:user')) | ## Indexes @@ -43,35 +43,35 @@ CREATE TABLE "project_secrets_provider_access" ("secretsProviderConnectionId" in ```mermaid erDiagram -"project_secrets_provider_access" |o--|| "secrets_provider_connection" : "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project_secrets_provider_access" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project_secrets_provider_access" |o--|| "secrets_provider_connection" : "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "project_secrets_provider_access" { - INTEGER secretsProviderConnectionId PK + datetime_3_ createdAt varchar_36_ projectId PK - datetime_3_ createdAt - datetime_3_ updatedAt varchar_128_ role -} -"secrets_provider_connection" { - INTEGER id - varchar_128_ providerKey - varchar_36_ type - TEXT encryptedSettings - boolean isEnabled - datetime_3_ createdAt + INTEGER secretsProviderConnectionId PK datetime_3_ updatedAt } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags +} +"secrets_provider_connection" { + datetime_3_ createdAt + TEXT encryptedSettings + INTEGER id + boolean isEnabled + varchar_128_ providerKey + varchar_36_ type + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/role.md b/docs/generated/sqlite-schema/role.md index de7c753e4c6..2b63304b9c6 100644 --- a/docs/generated/sqlite-schema/role.md +++ b/docs/generated/sqlite-schema/role.md @@ -15,12 +15,12 @@ CREATE TABLE "role" ("slug" varchar(128) PRIMARY KEY NOT NULL, "displayName" tex | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| slug | varchar(128) | | false | [role_scope](role_scope.md) [user](user.md) [project_relation](project_relation.md) [role_mapping_rule](role_mapping_rule.md) | | | -| displayName | TEXT | | true | | | | -| description | TEXT | | true | | | | -| roleType | TEXT | | true | | | | -| systemRole | boolean | false | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| description | TEXT | | true | | | | +| displayName | TEXT | | true | | | | +| roleType | TEXT | | true | | | | +| slug | varchar(128) | | false | [project_relation](project_relation.md) [role_mapping_rule](role_mapping_rule.md) [role_scope](role_scope.md) [user](user.md) | | | +| systemRole | boolean | false | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -42,18 +42,34 @@ CREATE TABLE "role" ("slug" varchar(128) PRIMARY KEY NOT NULL, "displayName" tex ```mermaid erDiagram -"role_scope" |o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" -"user" }o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "project_relation" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "role_mapping_rule" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" +"role_scope" |o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" +"user" }o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "role" { - varchar_128_ slug PK - TEXT displayName - TEXT description - TEXT roleType - boolean systemRole datetime_3_ createdAt + TEXT description + TEXT displayName + TEXT roleType + varchar_128_ slug PK + boolean systemRole + datetime_3_ updatedAt +} +"project_relation" { + datetime_3_ createdAt + varchar_36_ projectId PK + varchar role FK + datetime_3_ updatedAt + varchar userId PK +} +"role_mapping_rule" { + datetime_3_ createdAt + TEXT expression + varchar_16_ id PK + INTEGER order + varchar_128_ role FK + varchar_64_ type datetime_3_ updatedAt } "role_scope" { @@ -61,36 +77,20 @@ erDiagram VARCHAR_128_ scopeSlug PK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"project_relation" { - varchar_36_ projectId PK - varchar userId PK - varchar role FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"role_mapping_rule" { - varchar_16_ id PK - TEXT expression - varchar_128_ role FK - varchar_64_ type - INTEGER order - datetime_3_ createdAt + TEXT settings datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/role_mapping_rule.md b/docs/generated/sqlite-schema/role_mapping_rule.md index 879418486f3..b45a577f818 100644 --- a/docs/generated/sqlite-schema/role_mapping_rule.md +++ b/docs/generated/sqlite-schema/role_mapping_rule.md @@ -15,30 +15,30 @@ CREATE TABLE "role_mapping_rule" ("id" varchar(16) PRIMARY KEY NOT NULL, "expres | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(16) | | false | [role_mapping_rule_project](role_mapping_rule_project.md) | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | expression | TEXT | | false | | | | +| id | varchar(16) | | false | [role_mapping_rule_project](role_mapping_rule_project.md) | | | +| order | INTEGER | | false | | | | | role | varchar(128) | | false | | [role](role.md) | | | type | varchar(64) | | false | | | | -| order | INTEGER | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_role_mapping_rule_2 | UNIQUE | UNIQUE (type, order) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_role_mapping_rule_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_role_mapping_rule_2 | UNIQUE | UNIQUE (type, order) | ## Indexes | Name | Definition | | ---- | ---------- | | IDX_bb66e404c35996b0d694617750 | CREATE INDEX "IDX_bb66e404c35996b0d694617750" ON "role_mapping_rule" ("role") | -| sqlite_autoindex_role_mapping_rule_2 | UNIQUE (type, order) | | sqlite_autoindex_role_mapping_rule_1 | PRIMARY KEY (id) | +| sqlite_autoindex_role_mapping_rule_2 | UNIQUE (type, order) | ## Relations @@ -49,25 +49,25 @@ erDiagram "role_mapping_rule" }o--|| "role" : "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" "role_mapping_rule" { - varchar_16_ id PK + datetime_3_ createdAt TEXT expression + varchar_16_ id PK + INTEGER order varchar_128_ role FK varchar_64_ type - INTEGER order - datetime_3_ createdAt datetime_3_ updatedAt } "role_mapping_rule_project" { - varchar_16_ roleMappingRuleId PK varchar_36_ projectId PK + varchar_16_ roleMappingRuleId PK } "role" { - varchar_128_ slug PK - TEXT displayName - TEXT description - TEXT roleType - boolean systemRole datetime_3_ createdAt + TEXT description + TEXT displayName + TEXT roleType + varchar_128_ slug PK + boolean systemRole datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/role_mapping_rule_project.md b/docs/generated/sqlite-schema/role_mapping_rule_project.md index fb52f22e372..7aac7703163 100644 --- a/docs/generated/sqlite-schema/role_mapping_rule_project.md +++ b/docs/generated/sqlite-schema/role_mapping_rule_project.md @@ -15,17 +15,17 @@ CREATE TABLE "role_mapping_rule_project" ("roleMappingRuleId" varchar(16) NOT NU | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| roleMappingRuleId | varchar(16) | | false | | [role_mapping_rule](role_mapping_rule.md) | | | projectId | varchar(36) | | false | | [project](project.md) | | +| roleMappingRuleId | varchar(16) | | false | | [role_mapping_rule](role_mapping_rule.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| roleMappingRuleId | PRIMARY KEY | PRIMARY KEY (roleMappingRuleId) | -| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | +| roleMappingRuleId | PRIMARY KEY | PRIMARY KEY (roleMappingRuleId) | | sqlite_autoindex_role_mapping_rule_project_1 | PRIMARY KEY | PRIMARY KEY (roleMappingRuleId, projectId) | ## Indexes @@ -40,32 +40,32 @@ CREATE TABLE "role_mapping_rule_project" ("roleMappingRuleId" varchar(16) NOT NU ```mermaid erDiagram -"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "role_mapping_rule_project" { - varchar_16_ roleMappingRuleId PK varchar_36_ projectId PK -} -"role_mapping_rule" { - varchar_16_ id PK - TEXT expression - varchar_128_ role FK - varchar_64_ type - INTEGER order - datetime_3_ createdAt - datetime_3_ updatedAt + varchar_16_ roleMappingRuleId PK } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags +} +"role_mapping_rule" { + datetime_3_ createdAt + TEXT expression + varchar_16_ id PK + INTEGER order + varchar_128_ role FK + varchar_64_ type + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/role_scope.md b/docs/generated/sqlite-schema/role_scope.md index b6bb6e1eeff..bc5e294e0ac 100644 --- a/docs/generated/sqlite-schema/role_scope.md +++ b/docs/generated/sqlite-schema/role_scope.md @@ -28,10 +28,10 @@ CREATE TABLE role_scope ( | Name | Type | Definition | | ---- | ---- | ---------- | -| roleSlug | PRIMARY KEY | PRIMARY KEY (roleSlug) | -| scopeSlug | PRIMARY KEY | PRIMARY KEY (scopeSlug) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (scopeSlug) REFERENCES scope (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE | +| roleSlug | PRIMARY KEY | PRIMARY KEY (roleSlug) | +| scopeSlug | PRIMARY KEY | PRIMARY KEY (scopeSlug) | | sqlite_autoindex_role_scope_1 | PRIMARY KEY | PRIMARY KEY (roleSlug, scopeSlug) | ## Indexes @@ -54,18 +54,18 @@ erDiagram VARCHAR_128_ scopeSlug PK } "role" { - varchar_128_ slug PK - TEXT displayName - TEXT description - TEXT roleType - boolean systemRole datetime_3_ createdAt + TEXT description + TEXT displayName + TEXT roleType + varchar_128_ slug PK + boolean systemRole datetime_3_ updatedAt } "scope" { - varchar_128_ slug PK - TEXT displayName TEXT description + TEXT displayName + varchar_128_ slug PK } ``` diff --git a/docs/generated/sqlite-schema/schema.json b/docs/generated/sqlite-schema/schema.json deleted file mode 100644 index a61c8422cd3..00000000000 --- a/docs/generated/sqlite-schema/schema.json +++ /dev/null @@ -1,13672 +0,0 @@ -{ - "name": "n8n database schema (SQLite)", - "desc": "Auto-generated from the SQLite migrations in @n8n/db. Do not edit by hand.", - "tables": [ - { - "name": "settings", - "type": "table", - "columns": [ - { - "name": "key", - "type": "TEXT", - "nullable": false - }, - { - "name": "value", - "type": "TEXT", - "nullable": false, - "default": "''" - }, - { - "name": "loadOnStartup", - "type": "boolean", - "nullable": false, - "default": "false" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_settings_1", - "def": "PRIMARY KEY (key)", - "table": "settings", - "columns": [ - "key" - ] - } - ], - "constraints": [ - { - "name": "key", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (key)", - "table": "settings", - "columns": [ - "key" - ] - }, - { - "name": "sqlite_autoindex_settings_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (key)", - "table": "settings", - "columns": [ - "key" - ] - } - ], - "def": "CREATE TABLE \"settings\" (\"key\"\tTEXT NOT NULL,\"value\"\tTEXT NOT NULL DEFAULT '',\"loadOnStartup\"\tboolean NOT NULL default false,PRIMARY KEY(\"key\"))" - }, - { - "name": "installed_packages", - "type": "table", - "columns": [ - { - "name": "packageName", - "type": "char(214)", - "nullable": false - }, - { - "name": "installedVersion", - "type": "char(50)", - "nullable": false - }, - { - "name": "authorName", - "type": "char(70)", - "nullable": true - }, - { - "name": "authorEmail", - "type": "char(70)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')'" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_installed_packages_1", - "def": "PRIMARY KEY (packageName)", - "table": "installed_packages", - "columns": [ - "packageName" - ] - } - ], - "constraints": [ - { - "name": "packageName", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (packageName)", - "table": "installed_packages", - "columns": [ - "packageName" - ] - }, - { - "name": "sqlite_autoindex_installed_packages_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (packageName)", - "table": "installed_packages", - "columns": [ - "packageName" - ] - } - ], - "def": "CREATE TABLE \"installed_packages\" (\"packageName\"\tchar(214) NOT NULL,\"installedVersion\"\tchar(50) NOT NULL,\"authorName\"\tchar(70) NULL,\"authorEmail\"\tchar(70) NULL,\"createdAt\"\tdatetime(3) NOT NULL DEFAULT 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')',\"updatedAt\"\tdatetime(3) NOT NULL DEFAULT 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')',PRIMARY KEY(\"packageName\"))" - }, - { - "name": "installed_nodes", - "type": "table", - "columns": [ - { - "name": "name", - "type": "char(200)", - "nullable": false - }, - { - "name": "type", - "type": "char(200)", - "nullable": false - }, - { - "name": "latestVersion", - "type": "INTEGER", - "nullable": true, - "default": "1" - }, - { - "name": "package", - "type": "char(214)", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_installed_nodes_1", - "def": "PRIMARY KEY (name)", - "table": "installed_nodes", - "columns": [ - "name" - ] - } - ], - "constraints": [ - { - "name": "name", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (name)", - "table": "installed_nodes", - "columns": [ - "name" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE", - "table": "installed_nodes", - "referenced_table": "installed_packages", - "columns": [ - "package" - ], - "referenced_columns": [ - "packageName" - ] - }, - { - "name": "sqlite_autoindex_installed_nodes_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (name)", - "table": "installed_nodes", - "columns": [ - "name" - ] - } - ], - "def": "CREATE TABLE \"installed_nodes\" (\"name\"\tchar(200) NOT NULL,\"type\"\tchar(200) NOT NULL,\"latestVersion\"\tINTEGER DEFAULT 1,\"package\"\tchar(214) NOT NULL,PRIMARY KEY(\"name\"),FOREIGN KEY(\"package\") REFERENCES \"installed_packages\"(\"packageName\") ON DELETE CASCADE ON UPDATE CASCADE)" - }, - { - "name": "event_destinations", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "destination", - "type": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')'" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_event_destinations_1", - "def": "PRIMARY KEY (id)", - "table": "event_destinations", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "event_destinations", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_event_destinations_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "event_destinations", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"event_destinations\" (\"id\"\tvarchar(36) PRIMARY KEY NOT NULL,\"destination\" text NOT NULL,\"createdAt\"\tdatetime(3) NOT NULL DEFAULT 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')',\"updatedAt\"\tdatetime(3) NOT NULL DEFAULT 'STRFTIME(''%Y-%m-%d %H:%M:%f'', ''NOW'')')" - }, - { - "name": "auth_identity", - "type": "table", - "columns": [ - { - "name": "userId", - "type": "VARCHAR(36)", - "nullable": true - }, - { - "name": "providerId", - "type": "VARCHAR(64)", - "nullable": false - }, - { - "name": "providerType", - "type": "VARCHAR(32)", - "nullable": false - }, - { - "name": "createdAt", - "type": "timestamp", - "nullable": false, - "default": "CURRENT_TIMESTAMP" - }, - { - "name": "updatedAt", - "type": "timestamp", - "nullable": false, - "default": "CURRENT_TIMESTAMP" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_auth_identity_1", - "def": "PRIMARY KEY (providerId, providerType)", - "table": "auth_identity", - "columns": [ - "providerId", - "providerType" - ] - } - ], - "constraints": [ - { - "name": "providerId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (providerId)", - "table": "auth_identity", - "columns": [ - "providerId" - ] - }, - { - "name": "providerType", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (providerType)", - "table": "auth_identity", - "columns": [ - "providerType" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "auth_identity", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_auth_identity_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (providerId, providerType)", - "table": "auth_identity", - "columns": [ - "providerId", - "providerType" - ] - } - ], - "def": "CREATE TABLE \"auth_identity\" (\n\t\t\t\t\"userId\" VARCHAR(36) REFERENCES \"user\" (id),\n\t\t\t\t\"providerId\" VARCHAR(64) NOT NULL,\n\t\t\t\t\"providerType\" VARCHAR(32) NOT NULL,\n\t\t\t\t\"createdAt\" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\t\t\"updatedAt\" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\t\tPRIMARY KEY(\"providerId\", \"providerType\")\n\t\t\t)" - }, - { - "name": "auth_provider_sync_history", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": true - }, - { - "name": "providerType", - "type": "VARCHAR(32)", - "nullable": false - }, - { - "name": "runMode", - "type": "TEXT", - "nullable": false - }, - { - "name": "status", - "type": "TEXT", - "nullable": false - }, - { - "name": "startedAt", - "type": "DATETIME", - "nullable": false - }, - { - "name": "endedAt", - "type": "DATETIME", - "nullable": false - }, - { - "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 - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "auth_provider_sync_history", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"auth_provider_sync_history\" (\n\t\t\t\t\"id\" INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\t\"providerType\" VARCHAR(32) NOT NULL,\n\t\t\t\t\"runMode\" TEXT NOT NULL,\n\t\t\t\t\"status\" TEXT NOT NULL,\n\t\t\t\t\"startedAt\" DATETIME NOT NULL,\n\t\t\t\t\"endedAt\" DATETIME NOT NULL,\n\t\t\t\t\"scanned\" INTEGER NOT NULL,\n\t\t\t\t\"created\" INTEGER NOT NULL,\n\t\t\t\t\"updated\" INTEGER NOT NULL,\n\t\t\t\t\"disabled\" INTEGER NOT NULL,\n\t\t\t\t\"error\" TEXT\n\t\t\t)" - }, - { - "name": "tag_entity", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(24)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_8f949d7a3a984759044054e89b", - "def": "CREATE UNIQUE INDEX \"IDX_8f949d7a3a984759044054e89b\" ON \"tag_entity\" (\"name\") ", - "table": "tag_entity", - "columns": [ - "name" - ] - }, - { - "name": "sqlite_autoindex_tag_entity_1", - "def": "PRIMARY KEY (id)", - "table": "tag_entity", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "tag_entity", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_tag_entity_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "tag_entity", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"tag_entity\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(24) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "workflows_tags", - "type": "table", - "columns": [ - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "tagId", - "type": "INTEGER", - "nullable": false - } - ], - "indexes": [ - { - "name": "idx_workflows_tags_workflow_id", - "def": "CREATE INDEX \"idx_workflows_tags_workflow_id\" ON \"workflows_tags\" (\"workflowId\")", - "table": "workflows_tags", - "columns": [ - "workflowId" - ] - }, - { - "name": "idx_workflows_tags_tag_id", - "def": "CREATE INDEX \"idx_workflows_tags_tag_id\" ON \"workflows_tags\" (\"tagId\")", - "table": "workflows_tags", - "columns": [ - "tagId" - ] - }, - { - "name": "sqlite_autoindex_workflows_tags_1", - "def": "PRIMARY KEY (workflowId, tagId)", - "table": "workflows_tags", - "columns": [ - "workflowId", - "tagId" - ] - } - ], - "constraints": [ - { - "name": "workflowId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "workflows_tags", - "columns": [ - "workflowId" - ] - }, - { - "name": "tagId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (tagId)", - "table": "workflows_tags", - "columns": [ - "tagId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflows_tags", - "referenced_table": "tag_entity", - "columns": [ - "tagId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflows_tags", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_workflows_tags_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId, tagId)", - "table": "workflows_tags", - "columns": [ - "workflowId", - "tagId" - ] - } - ], - "def": "CREATE TABLE \"workflows_tags\" (\"workflowId\" varchar(36) NOT NULL, \"tagId\" integer NOT NULL, CONSTRAINT \"FK_workflows_tags_workflow_entity\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_workflows_tags_tag_entity\" FOREIGN KEY (\"tagId\") REFERENCES \"tag_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, PRIMARY KEY (\"workflowId\", \"tagId\"))" - }, - { - "name": "webhook_entity", - "type": "table", - "columns": [ - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "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 - } - ], - "indexes": [ - { - "name": "idx_webhook_entity_webhook_path_method", - "def": "CREATE INDEX \"idx_webhook_entity_webhook_path_method\" ON \"webhook_entity\" (\"webhookId\",\"method\",\"pathLength\")", - "table": "webhook_entity", - "columns": [ - "webhookId", - "method", - "pathLength" - ] - }, - { - "name": "sqlite_autoindex_webhook_entity_1", - "def": "PRIMARY KEY (webhookPath, method)", - "table": "webhook_entity", - "columns": [ - "webhookPath", - "method" - ] - } - ], - "constraints": [ - { - "name": "webhookPath", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (webhookPath)", - "table": "webhook_entity", - "columns": [ - "webhookPath" - ] - }, - { - "name": "method", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (method)", - "table": "webhook_entity", - "columns": [ - "method" - ] - }, - { - "name": "sqlite_autoindex_webhook_entity_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (webhookPath, method)", - "table": "webhook_entity", - "columns": [ - "webhookPath", - "method" - ] - } - ], - "def": "CREATE TABLE \"webhook_entity\" (\"workflowId\" varchar(36) NOT NULL, \"webhookPath\" varchar NOT NULL, \"method\" varchar NOT NULL, \"node\" varchar NOT NULL, \"webhookId\" varchar, \"pathLength\" integer, PRIMARY KEY (\"webhookPath\", \"method\"))" - }, - { - "name": "execution_data", - "type": "table", - "columns": [ - { - "name": "executionId", - "type": "INT", - "nullable": false - }, - { - "name": "workflowData", - "type": "TEXT", - "nullable": false - }, - { - "name": "data", - "type": "TEXT", - "nullable": false - }, - { - "name": "workflowVersionId", - "type": "VARCHAR(36)", - "nullable": true - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_execution_data_1", - "def": "PRIMARY KEY (executionId)", - "table": "execution_data", - "columns": [ - "executionId" - ] - } - ], - "constraints": [ - { - "name": "executionId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (executionId)", - "table": "execution_data", - "columns": [ - "executionId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "execution_data", - "referenced_table": "execution_entity", - "columns": [ - "executionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_execution_data_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (executionId)", - "table": "execution_data", - "columns": [ - "executionId" - ] - } - ], - "def": "CREATE TABLE \"execution_data\" (\n\t\t\t\t\"executionId\" int PRIMARY KEY NOT NULL,\n\t\t\t\t\"workflowData\" text NOT NULL,\n\t\t\t\t\"data\" text NOT NULL, \"workflowVersionId\" VARCHAR(36),\n\t\t\t\tFOREIGN KEY(\"executionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE CASCADE\n\t\t\t)" - }, - { - "name": "shared_credentials", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_shared_credentials_1", - "def": "PRIMARY KEY (credentialsId, projectId)", - "table": "shared_credentials", - "columns": [ - "credentialsId", - "projectId" - ] - } - ], - "constraints": [ - { - "name": "credentialsId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credentialsId)", - "table": "shared_credentials", - "columns": [ - "credentialsId" - ] - }, - { - "name": "projectId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (projectId)", - "table": "shared_credentials", - "columns": [ - "projectId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "shared_credentials", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "shared_credentials", - "referenced_table": "credentials_entity", - "columns": [ - "credentialsId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_shared_credentials_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credentialsId, projectId)", - "table": "shared_credentials", - "columns": [ - "credentialsId", - "projectId" - ] - } - ], - "def": "CREATE TABLE \"shared_credentials\" (\"credentialsId\" varchar(36) NOT NULL, \"projectId\" varchar(36) NOT NULL, \"role\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_416f66fc846c7c442970c094ccf\" FOREIGN KEY (\"credentialsId\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_812c2852270da1247756e77f5a4\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"credentialsId\", \"projectId\"))" - }, - { - "name": "shared_workflow", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_shared_workflow_projectId", - "def": "CREATE INDEX \"IDX_shared_workflow_projectId\" ON \"shared_workflow\" (\"projectId\") ", - "table": "shared_workflow", - "columns": [ - "projectId" - ] - }, - { - "name": "sqlite_autoindex_shared_workflow_1", - "def": "PRIMARY KEY (workflowId, projectId)", - "table": "shared_workflow", - "columns": [ - "workflowId", - "projectId" - ] - } - ], - "constraints": [ - { - "name": "workflowId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "shared_workflow", - "columns": [ - "workflowId" - ] - }, - { - "name": "projectId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (projectId)", - "table": "shared_workflow", - "columns": [ - "projectId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "shared_workflow", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "shared_workflow", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_shared_workflow_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId, projectId)", - "table": "shared_workflow", - "columns": [ - "workflowId", - "projectId" - ] - } - ], - "def": "CREATE TABLE \"shared_workflow\" (\"workflowId\" varchar(36) NOT NULL, \"projectId\" varchar(36) NOT NULL, \"role\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_daa206a04983d47d0a9c34649ce\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_a45ea5f27bcfdc21af9b4188560\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"workflowId\", \"projectId\"))" - }, - { - "name": "execution_metadata", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "executionId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "key", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "value", - "type": "TEXT", - "nullable": false - } - ], - "indexes": [ - { - "name": "IDX_cec8eea3bf49551482ccb4933e", - "def": "CREATE UNIQUE INDEX \"IDX_cec8eea3bf49551482ccb4933e\" ON \"execution_metadata\" (\"executionId\", \"key\") ", - "table": "execution_metadata", - "columns": [ - "executionId", - "key" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "execution_metadata", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "execution_metadata", - "referenced_table": "execution_entity", - "columns": [ - "executionId" - ], - "referenced_columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"execution_metadata\" (\"id\" integer PRIMARY KEY AUTOINCREMENT NOT NULL, \"executionId\" integer NOT NULL, \"key\" varchar(255) NOT NULL, \"value\" text NOT NULL, CONSTRAINT \"FK_31d0b4c93fb85ced26f6005cda3\" FOREIGN KEY (\"executionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "invalid_auth_token", - "type": "table", - "columns": [ - { - "name": "token", - "type": "varchar(512)", - "nullable": false - }, - { - "name": "expiresAt", - "type": "datetime(3)", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_invalid_auth_token_1", - "def": "PRIMARY KEY (token)", - "table": "invalid_auth_token", - "columns": [ - "token" - ] - } - ], - "constraints": [ - { - "name": "token", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (token)", - "table": "invalid_auth_token", - "columns": [ - "token" - ] - }, - { - "name": "sqlite_autoindex_invalid_auth_token_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (token)", - "table": "invalid_auth_token", - "columns": [ - "token" - ] - } - ], - "def": "CREATE TABLE \"invalid_auth_token\" (\"token\" varchar(512) PRIMARY KEY NOT NULL, \"expiresAt\" datetime(3) NOT NULL)" - }, - { - "name": "execution_annotations", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "executionId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "vote", - "type": "varchar(6)", - "nullable": true - }, - { - "name": "note", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_97f863fa83c4786f1956508496", - "def": "CREATE UNIQUE INDEX \"IDX_97f863fa83c4786f1956508496\" ON \"execution_annotations\" (\"executionId\") ", - "table": "execution_annotations", - "columns": [ - "executionId" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "execution_annotations", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "execution_annotations", - "referenced_table": "execution_entity", - "columns": [ - "executionId" - ], - "referenced_columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"execution_annotations\" (\"id\" integer PRIMARY KEY AUTOINCREMENT NOT NULL, \"executionId\" integer NOT NULL, \"vote\" varchar(6), \"note\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_97f863fa83c4786f19565084960\" FOREIGN KEY (\"executionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "annotation_tag_entity", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(24)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_ae51b54c4bb430cf92f48b623f", - "def": "CREATE UNIQUE INDEX \"IDX_ae51b54c4bb430cf92f48b623f\" ON \"annotation_tag_entity\" (\"name\") ", - "table": "annotation_tag_entity", - "columns": [ - "name" - ] - }, - { - "name": "sqlite_autoindex_annotation_tag_entity_1", - "def": "PRIMARY KEY (id)", - "table": "annotation_tag_entity", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "annotation_tag_entity", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_annotation_tag_entity_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "annotation_tag_entity", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"annotation_tag_entity\" (\"id\" varchar(16) PRIMARY KEY NOT NULL, \"name\" varchar(24) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "execution_annotation_tags", - "type": "table", - "columns": [ - { - "name": "annotationId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "tagId", - "type": "varchar(24)", - "nullable": false - } - ], - "indexes": [ - { - "name": "IDX_c1519757391996eb06064f0e7c", - "def": "CREATE INDEX \"IDX_c1519757391996eb06064f0e7c\" ON \"execution_annotation_tags\" (\"annotationId\") ", - "table": "execution_annotation_tags", - "columns": [ - "annotationId" - ] - }, - { - "name": "IDX_a3697779b366e131b2bbdae297", - "def": "CREATE INDEX \"IDX_a3697779b366e131b2bbdae297\" ON \"execution_annotation_tags\" (\"tagId\") ", - "table": "execution_annotation_tags", - "columns": [ - "tagId" - ] - }, - { - "name": "sqlite_autoindex_execution_annotation_tags_1", - "def": "PRIMARY KEY (annotationId, tagId)", - "table": "execution_annotation_tags", - "columns": [ - "annotationId", - "tagId" - ] - } - ], - "constraints": [ - { - "name": "annotationId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (annotationId)", - "table": "execution_annotation_tags", - "columns": [ - "annotationId" - ] - }, - { - "name": "tagId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (tagId)", - "table": "execution_annotation_tags", - "columns": [ - "tagId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (tagId) REFERENCES annotation_tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "execution_annotation_tags", - "referenced_table": "annotation_tag_entity", - "columns": [ - "tagId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "execution_annotation_tags", - "referenced_table": "execution_annotations", - "columns": [ - "annotationId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_execution_annotation_tags_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (annotationId, tagId)", - "table": "execution_annotation_tags", - "columns": [ - "annotationId", - "tagId" - ] - } - ], - "def": "CREATE TABLE \"execution_annotation_tags\" (\"annotationId\" integer NOT NULL, \"tagId\" varchar(24) NOT NULL, CONSTRAINT \"FK_c1519757391996eb06064f0e7c8\" FOREIGN KEY (\"annotationId\") REFERENCES \"execution_annotations\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_a3697779b366e131b2bbdae2976\" FOREIGN KEY (\"tagId\") REFERENCES \"annotation_tag_entity\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"annotationId\", \"tagId\"))" - }, - { - "name": "processed_data", - "type": "table", - "columns": [ - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "context", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "value", - "type": "TEXT", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_processed_data_1", - "def": "PRIMARY KEY (workflowId, context)", - "table": "processed_data", - "columns": [ - "workflowId", - "context" - ] - } - ], - "constraints": [ - { - "name": "workflowId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "processed_data", - "columns": [ - "workflowId" - ] - }, - { - "name": "context", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (context)", - "table": "processed_data", - "columns": [ - "context" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "processed_data", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_processed_data_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId, context)", - "table": "processed_data", - "columns": [ - "workflowId", - "context" - ] - } - ], - "def": "CREATE TABLE \"processed_data\" (\"workflowId\" varchar(36) NOT NULL, \"context\" varchar(255) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"value\" text NOT NULL, CONSTRAINT \"FK_06a69a7032c97a763c2c7599464\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, PRIMARY KEY (\"workflowId\", \"context\"))" - }, - { - "name": "folder", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_14f68deffaf858465715995508", - "def": "CREATE UNIQUE INDEX \"IDX_14f68deffaf858465715995508\" ON \"folder\" (\"projectId\", \"id\") ", - "table": "folder", - "columns": [ - "projectId", - "id" - ] - }, - { - "name": "sqlite_autoindex_folder_1", - "def": "PRIMARY KEY (id)", - "table": "folder", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "folder", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "folder", - "referenced_table": "folder", - "columns": [ - "parentFolderId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "folder", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_folder_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "folder", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"folder\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"parentFolderId\" varchar(36), \"projectId\" varchar(36) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_a8260b0b36939c6247f385b8221\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_804ea52f6729e3940498bd54d78\" FOREIGN KEY (\"parentFolderId\") REFERENCES \"folder\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "folder_tag", - "type": "table", - "columns": [ - { - "name": "folderId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "tagId", - "type": "varchar(36)", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_folder_tag_1", - "def": "PRIMARY KEY (folderId, tagId)", - "table": "folder_tag", - "columns": [ - "folderId", - "tagId" - ] - } - ], - "constraints": [ - { - "name": "folderId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (folderId)", - "table": "folder_tag", - "columns": [ - "folderId" - ] - }, - { - "name": "tagId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (tagId)", - "table": "folder_tag", - "columns": [ - "tagId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "folder_tag", - "referenced_table": "tag_entity", - "columns": [ - "tagId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (folderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "folder_tag", - "referenced_table": "folder", - "columns": [ - "folderId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_folder_tag_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (folderId, tagId)", - "table": "folder_tag", - "columns": [ - "folderId", - "tagId" - ] - } - ], - "def": "CREATE TABLE \"folder_tag\" (\"folderId\" varchar(36) NOT NULL, \"tagId\" varchar(36) NOT NULL, CONSTRAINT \"FK_94a60854e06f2897b2e0d39edba\" FOREIGN KEY (\"folderId\") REFERENCES \"folder\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_dc88164176283de80af47621746\" FOREIGN KEY (\"tagId\") REFERENCES \"tag_entity\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"folderId\", \"tagId\"))" - }, - { - "name": "insights_metadata", - "type": "table", - "columns": [ - { - "name": "metaId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "workflowId", - "type": "varchar(16)", - "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": "IDX_1d8ab99d5861c9388d2dc1cf73", - "def": "CREATE UNIQUE INDEX \"IDX_1d8ab99d5861c9388d2dc1cf73\" ON \"insights_metadata\" (\"workflowId\") ", - "table": "insights_metadata", - "columns": [ - "workflowId" - ] - } - ], - "constraints": [ - { - "name": "metaId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (metaId)", - "table": "insights_metadata", - "columns": [ - "metaId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "insights_metadata", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "insights_metadata", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"insights_metadata\" (\"metaId\" integer PRIMARY KEY NOT NULL, \"workflowId\" varchar(16), \"projectId\" varchar(36), \"workflowName\" varchar(128) NOT NULL, \"projectName\" varchar(255) NOT NULL, CONSTRAINT \"FK_1d8ab99d5861c9388d2dc1cf733\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE SET NULL, CONSTRAINT \"FK_2375a1eda085adb16b24615b69c\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "scope", - "type": "table", - "columns": [ - { - "name": "slug", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "displayName", - "type": "TEXT", - "nullable": true - }, - { - "name": "description", - "type": "TEXT", - "nullable": true - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_scope_1", - "def": "PRIMARY KEY (slug)", - "table": "scope", - "columns": [ - "slug" - ] - } - ], - "constraints": [ - { - "name": "slug", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (slug)", - "table": "scope", - "columns": [ - "slug" - ] - }, - { - "name": "sqlite_autoindex_scope_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (slug)", - "table": "scope", - "columns": [ - "slug" - ] - } - ], - "def": "CREATE TABLE \"scope\" (\"slug\" varchar(128) PRIMARY KEY NOT NULL, \"displayName\" text, \"description\" text)" - }, - { - "name": "role_scope", - "type": "table", - "columns": [ - { - "name": "roleSlug", - "type": "VARCHAR(128)", - "nullable": false - }, - { - "name": "scopeSlug", - "type": "VARCHAR(128)", - "nullable": false - } - ], - "indexes": [ - { - "name": "IDX_role_scope_scopeSlug", - "def": "CREATE INDEX \"IDX_role_scope_scopeSlug\" ON \"role_scope\" (\"scopeSlug\") ", - "table": "role_scope", - "columns": [ - "scopeSlug" - ] - }, - { - "name": "sqlite_autoindex_role_scope_1", - "def": "PRIMARY KEY (roleSlug, scopeSlug)", - "table": "role_scope", - "columns": [ - "roleSlug", - "scopeSlug" - ] - } - ], - "constraints": [ - { - "name": "roleSlug", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (roleSlug)", - "table": "role_scope", - "columns": [ - "roleSlug" - ] - }, - { - "name": "scopeSlug", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (scopeSlug)", - "table": "role_scope", - "columns": [ - "scopeSlug" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (scopeSlug) REFERENCES scope (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE", - "table": "role_scope", - "referenced_table": "scope", - "columns": [ - "scopeSlug" - ], - "referenced_columns": [ - "slug" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE", - "table": "role_scope", - "referenced_table": "role", - "columns": [ - "roleSlug" - ], - "referenced_columns": [ - "slug" - ] - }, - { - "name": "sqlite_autoindex_role_scope_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (roleSlug, scopeSlug)", - "table": "role_scope", - "columns": [ - "roleSlug", - "scopeSlug" - ] - } - ], - "def": "CREATE TABLE role_scope (\n\t\t\t\t\t\"roleSlug\" VARCHAR(128) NOT NULL,\n\t\t\t\t\t\"scopeSlug\" VARCHAR(128) NOT NULL,\n\t\t\t\t\tCONSTRAINT \"PK_role_scope\" PRIMARY KEY (\"roleSlug\", \"scopeSlug\"),\n\t\t\t\t\tCONSTRAINT \"FK_role\" FOREIGN KEY (\"roleSlug\") REFERENCES role (\"slug\") ON DELETE CASCADE ON UPDATE CASCADE,\n\t\t\t\t\tCONSTRAINT \"FK_scope\" FOREIGN KEY (\"scopeSlug\") REFERENCES \"scope\" (\"slug\") ON DELETE CASCADE ON UPDATE CASCADE\n\t\t\t\t)" - }, - { - "name": "user", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": true - }, - { - "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", - "nullable": true - }, - { - "name": "personalizationAnswers", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "settings", - "type": "TEXT", - "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'" - } - ], - "indexes": [ - { - "name": "user_role_idx", - "def": "CREATE INDEX \"user_role_idx\" ON \"user\" (\"roleSlug\") ", - "table": "user", - "columns": [ - "roleSlug" - ] - }, - { - "name": "sqlite_autoindex_user_2", - "def": "UNIQUE (email)", - "table": "user", - "columns": [ - "email" - ] - }, - { - "name": "sqlite_autoindex_user_1", - "def": "PRIMARY KEY (id)", - "table": "user", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "user", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "user", - "referenced_table": "role", - "columns": [ - "roleSlug" - ], - "referenced_columns": [ - "slug" - ] - }, - { - "name": "sqlite_autoindex_user_2", - "type": "UNIQUE", - "def": "UNIQUE (email)", - "table": "user", - "columns": [ - "email" - ] - }, - { - "name": "sqlite_autoindex_user_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "user", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"user\" (\"id\" varchar PRIMARY KEY, \"email\" varchar(255), \"firstName\" varchar(32), \"lastName\" varchar(32), \"password\" varchar, \"personalizationAnswers\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"settings\" text, \"disabled\" boolean NOT NULL DEFAULT (FALSE), \"mfaEnabled\" boolean NOT NULL DEFAULT (FALSE), \"mfaSecret\" text, \"mfaRecoveryCodes\" text, \"lastActiveAt\" date, \"roleSlug\" varchar(128) NOT NULL DEFAULT ('global:member'), CONSTRAINT \"UQ_e12875dfb3b1d92d7d7c5377e22\" UNIQUE (\"email\"), CONSTRAINT \"FK_eaea92ee7bfb9c1b6cd01505d56\" FOREIGN KEY (\"roleSlug\") REFERENCES \"role\" (\"slug\"))" - }, - { - "name": "test_case_execution", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "testRunId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "pastExecutionId", - "type": "INTEGER", - "nullable": true - }, - { - "name": "executionId", - "type": "INTEGER", - "nullable": true - }, - { - "name": "evaluationExecutionId", - "type": "INTEGER", - "nullable": true - }, - { - "name": "status", - "type": "varchar", - "nullable": false - }, - { - "name": "runAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "completedAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "errorCode", - "type": "varchar", - "nullable": true - }, - { - "name": "errorDetails", - "type": "TEXT", - "nullable": true - }, - { - "name": "metrics", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "inputs", - "type": "TEXT", - "nullable": true - }, - { - "name": "outputs", - "type": "TEXT", - "nullable": true - }, - { - "name": "runIndex", - "type": "INTEGER", - "nullable": true, - "default": "NULL" - } - ], - "indexes": [ - { - "name": "IDX_8e4b4774db42f1e6dda3452b2a", - "def": "CREATE INDEX \"IDX_8e4b4774db42f1e6dda3452b2a\" ON \"test_case_execution\" (\"testRunId\") ", - "table": "test_case_execution", - "columns": [ - "testRunId" - ] - }, - { - "name": "sqlite_autoindex_test_case_execution_1", - "def": "PRIMARY KEY (id)", - "table": "test_case_execution", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "test_case_execution", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "test_case_execution", - "referenced_table": "test_run", - "columns": [ - "testRunId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "test_case_execution", - "referenced_table": "execution_entity", - "columns": [ - "pastExecutionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "test_case_execution", - "referenced_table": "execution_entity", - "columns": [ - "executionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "test_case_execution", - "referenced_table": "execution_entity", - "columns": [ - "evaluationExecutionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_test_case_execution_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "test_case_execution", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"test_case_execution\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"testRunId\" varchar(36) NOT NULL, \"pastExecutionId\" integer, \"executionId\" integer, \"evaluationExecutionId\" integer, \"status\" varchar NOT NULL, \"runAt\" datetime(3), \"completedAt\" datetime(3), \"errorCode\" varchar, \"errorDetails\" text, \"metrics\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"inputs\" text, \"outputs\" text, \"runIndex\" INTEGER DEFAULT NULL, CONSTRAINT \"FK_dfbe194e3ebdfe49a87bc4692ca\" FOREIGN KEY (\"evaluationExecutionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_e48965fac35d0f5b9e7f51d8c44\" FOREIGN KEY (\"executionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_258d954733841d51edd826a562b\" FOREIGN KEY (\"pastExecutionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_8e4b4774db42f1e6dda3452b2af\" FOREIGN KEY (\"testRunId\") REFERENCES \"test_run\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "project_relation", - "type": "table", - "columns": [ - { - "name": "projectId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "role", - "type": "varchar", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "project_relation_role_project_idx", - "def": "CREATE INDEX \"project_relation_role_project_idx\" ON \"project_relation\" (\"projectId\", \"role\") ", - "table": "project_relation", - "columns": [ - "projectId", - "role" - ] - }, - { - "name": "project_relation_role_idx", - "def": "CREATE INDEX \"project_relation_role_idx\" ON \"project_relation\" (\"role\") ", - "table": "project_relation", - "columns": [ - "role" - ] - }, - { - "name": "IDX_61448d56d61802b5dfde5cdb00", - "def": "CREATE INDEX \"IDX_61448d56d61802b5dfde5cdb00\" ON \"project_relation\" (\"projectId\") ", - "table": "project_relation", - "columns": [ - "projectId" - ] - }, - { - "name": "IDX_5f0643f6717905a05164090dde", - "def": "CREATE INDEX \"IDX_5f0643f6717905a05164090dde\" ON \"project_relation\" (\"userId\") ", - "table": "project_relation", - "columns": [ - "userId" - ] - }, - { - "name": "sqlite_autoindex_project_relation_1", - "def": "PRIMARY KEY (projectId, userId)", - "table": "project_relation", - "columns": [ - "projectId", - "userId" - ] - } - ], - "constraints": [ - { - "name": "projectId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (projectId)", - "table": "project_relation", - "columns": [ - "projectId" - ] - }, - { - "name": "userId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (userId)", - "table": "project_relation", - "columns": [ - "userId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "project_relation", - "referenced_table": "role", - "columns": [ - "role" - ], - "referenced_columns": [ - "slug" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "project_relation", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "project_relation", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_project_relation_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (projectId, userId)", - "table": "project_relation", - "columns": [ - "projectId", - "userId" - ] - } - ], - "def": "CREATE TABLE \"project_relation\" (\"projectId\" varchar(36) NOT NULL, \"userId\" varchar NOT NULL, \"role\" varchar NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_5f0643f6717905a05164090dde7\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_61448d56d61802b5dfde5cdb002\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_c6b99592dc96b0d836d7a21db91\" FOREIGN KEY (\"role\") REFERENCES \"role\" (\"slug\"), PRIMARY KEY (\"projectId\", \"userId\"))" - }, - { - "name": "data_table", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_data_table_2", - "def": "UNIQUE (projectId, name)", - "table": "data_table", - "columns": [ - "projectId", - "name" - ] - }, - { - "name": "sqlite_autoindex_data_table_1", - "def": "PRIMARY KEY (id)", - "table": "data_table", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "data_table", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "data_table", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_data_table_2", - "type": "UNIQUE", - "def": "UNIQUE (projectId, name)", - "table": "data_table", - "columns": [ - "projectId", - "name" - ] - }, - { - "name": "sqlite_autoindex_data_table_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "data_table", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"data_table\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"projectId\" varchar(36) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"UQ_b23096ef747281ac944d28e8b0d\" UNIQUE (\"projectId\", \"name\"), CONSTRAINT \"FK_c2a794257dee48af7c9abf681de\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "data_table_column", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "type", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "index", - "type": "INTEGER", - "nullable": false - }, - { - "name": "dataTableId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_data_table_column_2", - "def": "UNIQUE (dataTableId, name)", - "table": "data_table_column", - "columns": [ - "dataTableId", - "name" - ] - }, - { - "name": "sqlite_autoindex_data_table_column_1", - "def": "PRIMARY KEY (id)", - "table": "data_table_column", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "data_table_column", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (dataTableId) REFERENCES data_table (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "data_table_column", - "referenced_table": "data_table", - "columns": [ - "dataTableId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_data_table_column_2", - "type": "UNIQUE", - "def": "UNIQUE (dataTableId, name)", - "table": "data_table_column", - "columns": [ - "dataTableId", - "name" - ] - }, - { - "name": "sqlite_autoindex_data_table_column_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "data_table_column", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"data_table_column\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"type\" varchar(32) NOT NULL, \"index\" integer NOT NULL, \"dataTableId\" varchar(36) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"UQ_8082ec4890f892f0bc77473a123\" UNIQUE (\"dataTableId\", \"name\"), CONSTRAINT \"FK_930b6e8faaf88294cef23484160\" FOREIGN KEY (\"dataTableId\") REFERENCES \"data_table\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "role", - "type": "table", - "columns": [ - { - "name": "slug", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "displayName", - "type": "TEXT", - "nullable": true - }, - { - "name": "description", - "type": "TEXT", - "nullable": true - }, - { - "name": "roleType", - "type": "TEXT", - "nullable": true - }, - { - "name": "systemRole", - "type": "boolean", - "nullable": false, - "default": "false" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_UniqueRoleDisplayName", - "def": "CREATE UNIQUE INDEX \"IDX_UniqueRoleDisplayName\" ON \"role\" (\"displayName\")", - "table": "role", - "columns": [ - "displayName" - ] - }, - { - "name": "sqlite_autoindex_role_1", - "def": "PRIMARY KEY (slug)", - "table": "role", - "columns": [ - "slug" - ] - } - ], - "constraints": [ - { - "name": "slug", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (slug)", - "table": "role", - "columns": [ - "slug" - ] - }, - { - "name": "sqlite_autoindex_role_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (slug)", - "table": "role", - "columns": [ - "slug" - ] - } - ], - "def": "CREATE TABLE \"role\" (\"slug\" varchar(128) PRIMARY KEY NOT NULL, \"displayName\" text, \"description\" text, \"roleType\" text, \"systemRole\" boolean NOT NULL DEFAULT (false), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "variables", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "key", - "type": "TEXT", - "nullable": false - }, - { - "name": "type", - "type": "TEXT", - "nullable": false, - "default": "'string'" - }, - { - "name": "value", - "type": "TEXT", - "nullable": true - }, - { - "name": "projectId", - "type": "varchar(36)", - "nullable": true - } - ], - "indexes": [ - { - "name": "variables_global_key_unique", - "def": "CREATE UNIQUE INDEX \"variables_global_key_unique\"\n\t\t\t ON \"variables\" (\"key\")\n\t\t\t WHERE projectId IS NULL", - "table": "variables", - "columns": [ - "key" - ] - }, - { - "name": "variables_project_key_unique", - "def": "CREATE UNIQUE INDEX \"variables_project_key_unique\" ON \"variables\" (\"projectId\", \"key\") ", - "table": "variables", - "columns": [ - "projectId", - "key" - ] - }, - { - "name": "sqlite_autoindex_variables_1", - "def": "PRIMARY KEY (id)", - "table": "variables", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "variables", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "variables", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_variables_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "variables", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"variables\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"key\" text NOT NULL, \"type\" text NOT NULL DEFAULT ('string'), \"value\" text, \"projectId\" varchar(36), CONSTRAINT \"FK_a0f13eaa709a21b77a3a9721319\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "insights_raw", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "metaId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "type", - "type": "INTEGER", - "nullable": false - }, - { - "name": "value", - "type": "bigint", - "nullable": false - }, - { - "name": "timestamp", - "type": "datetime(0)", - "nullable": false, - "default": "CURRENT_TIMESTAMP" - } - ], - "indexes": [ - { - "name": "IDX_insights_raw_timestamp_id", - "def": "CREATE INDEX \"IDX_insights_raw_timestamp_id\" ON \"insights_raw\" (\"timestamp\", \"id\") ", - "table": "insights_raw", - "columns": [ - "timestamp", - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "insights_raw", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "insights_raw", - "referenced_table": "insights_metadata", - "columns": [ - "metaId" - ], - "referenced_columns": [ - "metaId" - ] - } - ], - "def": "CREATE TABLE \"insights_raw\" (\"id\" integer PRIMARY KEY NOT NULL, \"metaId\" integer NOT NULL, \"type\" integer NOT NULL, \"value\" bigint NOT NULL, \"timestamp\" datetime(0) NOT NULL DEFAULT (CURRENT_TIMESTAMP), CONSTRAINT \"FK_d66d942bc9907488832eb0eed81\" FOREIGN KEY (\"metaId\") REFERENCES \"insights_metadata\" (\"metaId\") ON DELETE CASCADE)" - }, - { - "name": "insights_by_period", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "metaId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "type", - "type": "INTEGER", - "nullable": false - }, - { - "name": "value", - "type": "bigint", - "nullable": false - }, - { - "name": "periodUnit", - "type": "INTEGER", - "nullable": false - }, - { - "name": "periodStart", - "type": "datetime(0)", - "nullable": true, - "default": "CURRENT_TIMESTAMP" - } - ], - "indexes": [ - { - "name": "IDX_a4da41795da1422f680c723e80", - "def": "CREATE UNIQUE INDEX \"IDX_a4da41795da1422f680c723e80\" ON \"insights_by_period\" (\"periodStart\", \"type\", \"periodUnit\", \"metaId\") ", - "table": "insights_by_period", - "columns": [ - "periodStart", - "type", - "periodUnit", - "metaId" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "insights_by_period", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "insights_by_period", - "referenced_table": "insights_metadata", - "columns": [ - "metaId" - ], - "referenced_columns": [ - "metaId" - ] - } - ], - "def": "CREATE TABLE \"insights_by_period\" (\"id\" integer PRIMARY KEY NOT NULL, \"metaId\" integer NOT NULL, \"type\" integer NOT NULL, \"value\" bigint NOT NULL, \"periodUnit\" integer NOT NULL, \"periodStart\" datetime(0) DEFAULT (CURRENT_TIMESTAMP), CONSTRAINT \"FK_e8881f2214df046dc2740260fe8\" FOREIGN KEY (\"metaId\") REFERENCES \"insights_metadata\" (\"metaId\") ON DELETE CASCADE)" - }, - { - "name": "oauth_clients", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "name", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "redirectUris", - "type": "TEXT", - "nullable": false - }, - { - "name": "grantTypes", - "type": "TEXT", - "nullable": false - }, - { - "name": "clientSecret", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "clientSecretExpiresAt", - "type": "bigint", - "nullable": true - }, - { - "name": "tokenEndpointAuthMethod", - "type": "varchar(255)", - "nullable": false, - "default": "'none'" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_oauth_clients_1", - "def": "PRIMARY KEY (id)", - "table": "oauth_clients", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "oauth_clients", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_oauth_clients_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "oauth_clients", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"oauth_clients\" (\"id\" varchar PRIMARY KEY NOT NULL, \"name\" varchar(255) NOT NULL, \"redirectUris\" text NOT NULL, \"grantTypes\" text NOT NULL, \"clientSecret\" varchar(255), \"clientSecretExpiresAt\" bigint, \"tokenEndpointAuthMethod\" varchar(255) NOT NULL DEFAULT ('none'), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "oauth_access_tokens", - "type": "table", - "columns": [ - { - "name": "token", - "type": "varchar", - "nullable": false - }, - { - "name": "clientId", - "type": "varchar", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_oauth_access_tokens_1", - "def": "PRIMARY KEY (token)", - "table": "oauth_access_tokens", - "columns": [ - "token" - ] - } - ], - "constraints": [ - { - "name": "token", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (token)", - "table": "oauth_access_tokens", - "columns": [ - "token" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_access_tokens", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_access_tokens", - "referenced_table": "oauth_clients", - "columns": [ - "clientId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_oauth_access_tokens_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (token)", - "table": "oauth_access_tokens", - "columns": [ - "token" - ] - } - ], - "def": "CREATE TABLE \"oauth_access_tokens\" (\"token\" varchar PRIMARY KEY NOT NULL, \"clientId\" varchar NOT NULL, \"userId\" varchar NOT NULL, CONSTRAINT \"FK_78b26968132b7e5e45b75876481\" FOREIGN KEY (\"clientId\") REFERENCES \"oauth_clients\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_7234a36d8e49a1fa85095328845\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "oauth_user_consents", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "clientId", - "type": "varchar", - "nullable": false - }, - { - "name": "grantedAt", - "type": "bigint", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_oauth_user_consents_1", - "def": "UNIQUE (userId, clientId)", - "table": "oauth_user_consents", - "columns": [ - "userId", - "clientId" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "oauth_user_consents", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_user_consents", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_user_consents", - "referenced_table": "oauth_clients", - "columns": [ - "clientId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_oauth_user_consents_1", - "type": "UNIQUE", - "def": "UNIQUE (userId, clientId)", - "table": "oauth_user_consents", - "columns": [ - "userId", - "clientId" - ] - } - ], - "def": "CREATE TABLE \"oauth_user_consents\" (\"id\" integer PRIMARY KEY NOT NULL, \"userId\" varchar NOT NULL, \"clientId\" varchar NOT NULL, \"grantedAt\" bigint NOT NULL, CONSTRAINT \"UQ_083721d99ce8db4033e2958ebb4\" UNIQUE (\"userId\", \"clientId\"), CONSTRAINT \"FK_a651acea2f6c97f8c4514935486\" FOREIGN KEY (\"clientId\") REFERENCES \"oauth_clients\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_21e6c3c2d78a097478fae6aaefa\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "dynamic_credential_resolver", - "type": "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 - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_9c9ee9df586e60bb723234e499", - "def": "CREATE INDEX \"IDX_9c9ee9df586e60bb723234e499\" ON \"dynamic_credential_resolver\" (\"type\") ", - "table": "dynamic_credential_resolver", - "columns": [ - "type" - ] - }, - { - "name": "sqlite_autoindex_dynamic_credential_resolver_1", - "def": "PRIMARY KEY (id)", - "table": "dynamic_credential_resolver", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "dynamic_credential_resolver", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_dynamic_credential_resolver_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "dynamic_credential_resolver", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"dynamic_credential_resolver\" (\"id\" varchar(16) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"type\" varchar(128) NOT NULL, \"config\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "credentials_entity", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "data", - "type": "TEXT", - "nullable": false - }, - { - "name": "type", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "isManaged", - "type": "boolean", - "nullable": false, - "default": "0" - }, - { - "name": "isGlobal", - "type": "boolean", - "nullable": false, - "default": "0" - }, - { - "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_credentials_entity_type", - "def": "CREATE INDEX \"idx_credentials_entity_type\" ON \"credentials_entity\" (\"type\") ", - "table": "credentials_entity", - "columns": [ - "type" - ] - }, - { - "name": "sqlite_autoindex_credentials_entity_1", - "def": "PRIMARY KEY (id)", - "table": "credentials_entity", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "credentials_entity", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "credentials_entity", - "referenced_table": "dynamic_credential_resolver", - "columns": [ - "resolverId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_credentials_entity_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "credentials_entity", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"credentials_entity\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"data\" text NOT NULL, \"type\" varchar(32) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"isManaged\" boolean NOT NULL DEFAULT (0), \"isGlobal\" boolean NOT NULL DEFAULT (0), \"isResolvable\" boolean NOT NULL DEFAULT (false), \"resolvableAllowFallback\" boolean NOT NULL DEFAULT (false), \"resolverId\" varchar(16), CONSTRAINT \"credentials_entity_resolverId_foreign\" FOREIGN KEY (\"resolverId\") REFERENCES \"dynamic_credential_resolver\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "chat_hub_messages", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "sessionId", - "type": "varchar", - "nullable": false - }, - { - "name": "previousMessageId", - "type": "varchar", - "nullable": true - }, - { - "name": "revisionOfMessageId", - "type": "varchar", - "nullable": true - }, - { - "name": "retryOfMessageId", - "type": "varchar", - "nullable": true - }, - { - "name": "type", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "content", - "type": "TEXT", - "nullable": false - }, - { - "name": "provider", - "type": "varchar(16)", - "nullable": true - }, - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "executionId", - "type": "INTEGER", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "status", - "type": "varchar(16)", - "nullable": false, - "default": "'success'" - }, - { - "name": "attachments", - "type": "TEXT", - "nullable": true - }, - { - "name": "model", - "type": "VARCHAR(256)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_chat_hub_messages_sessionId", - "def": "CREATE INDEX \"IDX_chat_hub_messages_sessionId\"\n\t\t\tON \"chat_hub_messages\"(\"sessionId\")", - "table": "chat_hub_messages", - "columns": [ - "sessionId" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_messages_1", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_messages", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_messages", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "chat_hub_agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "execution_entity", - "columns": [ - "executionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (revisionOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "chat_hub_messages", - "columns": [ - "revisionOfMessageId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (retryOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "chat_hub_messages", - "columns": [ - "retryOfMessageId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 4)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 5)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (previousMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "chat_hub_messages", - "columns": [ - "previousMessageId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 6)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_messages", - "referenced_table": "chat_hub_sessions", - "columns": [ - "sessionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_messages_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_messages", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"chat_hub_messages\" (\"id\" varchar PRIMARY KEY NOT NULL, \"sessionId\" varchar NOT NULL, \"previousMessageId\" varchar, \"revisionOfMessageId\" varchar, \"retryOfMessageId\" varchar, \"type\" varchar(16) NOT NULL, \"name\" varchar(128) NOT NULL, \"content\" text NOT NULL, \"provider\" varchar(16), \"workflowId\" varchar(36), \"executionId\" integer, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"agentId\" varchar(36), \"status\" varchar(16) NOT NULL DEFAULT ('success'), \"attachments\" text, \"model\" VARCHAR(256), CONSTRAINT \"FK_e22538eb50a71a17954cd7e076c\" FOREIGN KEY (\"sessionId\") REFERENCES \"chat_hub_sessions\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_e5d1fa722c5a8d38ac204746662\" FOREIGN KEY (\"previousMessageId\") REFERENCES \"chat_hub_messages\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_acf8926098f063cdbbad8497fd1\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_25c9736e7f769f3a005eef4b372\" FOREIGN KEY (\"retryOfMessageId\") REFERENCES \"chat_hub_messages\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_1f4998c8a7dec9e00a9ab15550e\" FOREIGN KEY (\"revisionOfMessageId\") REFERENCES \"chat_hub_messages\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_6afb260449dd7a9b85355d4e0c9\" FOREIGN KEY (\"executionId\") REFERENCES \"execution_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_chat_hub_messages_agentId\" FOREIGN KEY (\"agentId\") REFERENCES \"chat_hub_agents\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "workflow_statistics", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": true - }, - { - "name": "count", - "type": "INTEGER", - "nullable": true, - "default": "0" - }, - { - "name": "latestEvent", - "type": "DATETIME", - "nullable": true - }, - { - "name": "name", - "type": "VARCHAR(128)", - "nullable": false - }, - { - "name": "workflowId", - "type": "VARCHAR(36)", - "nullable": false - }, - { - "name": "workflowName", - "type": "VARCHAR(128)", - "nullable": true - }, - { - "name": "rootCount", - "type": "INTEGER", - "nullable": true, - "default": "0" - } - ], - "indexes": [ - { - "name": "IDX_workflow_statistics_workflow_name", - "def": "CREATE UNIQUE INDEX \"IDX_workflow_statistics_workflow_name\" ON \"workflow_statistics\" (\"workflowId\", \"name\")", - "table": "workflow_statistics", - "columns": [ - "workflowId", - "name" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_statistics", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"workflow_statistics\" (\n\t\t\t\t\"id\" INTEGER PRIMARY KEY AUTOINCREMENT,\n\t\t\t\t\"count\" INTEGER DEFAULT 0,\n\t\t\t\t\"latestEvent\" DATETIME,\n\t\t\t\t\"name\" VARCHAR(128) NOT NULL,\n\t\t\t\t\"workflowId\" VARCHAR(36) NOT NULL,\n\t\t\t\t\"workflowName\" VARCHAR(128),\n\t\t\t\t\"rootCount\" INTEGER DEFAULT 0\n\t\t\t)" - }, - { - "name": "dynamic_credential_user_entry", - "type": "table", - "columns": [ - { - "name": "credentialId", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "resolverId", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "data", - "type": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_6edec973a6450990977bb854c3", - "def": "CREATE INDEX \"IDX_6edec973a6450990977bb854c3\" ON \"dynamic_credential_user_entry\" (\"resolverId\") ", - "table": "dynamic_credential_user_entry", - "columns": [ - "resolverId" - ] - }, - { - "name": "IDX_a36dc616fabc3f736bb82410a2", - "def": "CREATE INDEX \"IDX_a36dc616fabc3f736bb82410a2\" ON \"dynamic_credential_user_entry\" (\"userId\") ", - "table": "dynamic_credential_user_entry", - "columns": [ - "userId" - ] - }, - { - "name": "sqlite_autoindex_dynamic_credential_user_entry_1", - "def": "PRIMARY KEY (credentialId, userId, resolverId)", - "table": "dynamic_credential_user_entry", - "columns": [ - "credentialId", - "userId", - "resolverId" - ] - } - ], - "constraints": [ - { - "name": "credentialId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credentialId)", - "table": "dynamic_credential_user_entry", - "columns": [ - "credentialId" - ] - }, - { - "name": "userId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (userId)", - "table": "dynamic_credential_user_entry", - "columns": [ - "userId" - ] - }, - { - "name": "resolverId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (resolverId)", - "table": "dynamic_credential_user_entry", - "columns": [ - "resolverId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "dynamic_credential_user_entry", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "dynamic_credential_user_entry", - "referenced_table": "dynamic_credential_resolver", - "columns": [ - "resolverId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "dynamic_credential_user_entry", - "referenced_table": "credentials_entity", - "columns": [ - "credentialId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_dynamic_credential_user_entry_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credentialId, userId, resolverId)", - "table": "dynamic_credential_user_entry", - "columns": [ - "credentialId", - "userId", - "resolverId" - ] - } - ], - "def": "CREATE TABLE \"dynamic_credential_user_entry\" (\"credentialId\" varchar(16) NOT NULL, \"userId\" varchar NOT NULL, \"resolverId\" varchar(16) NOT NULL, \"data\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_945ba70b342a066d1306b12ccd2\" FOREIGN KEY (\"credentialId\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_6edec973a6450990977bb854c38\" FOREIGN KEY (\"resolverId\") REFERENCES \"dynamic_credential_resolver\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_a36dc616fabc3f736bb82410a22\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"credentialId\", \"userId\", \"resolverId\"))" - }, - { - "name": "workflow_dependency", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "workflowVersionId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "dependencyType", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "dependencyKey", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "indexVersionId", - "type": "smallint", - "nullable": false, - "default": "1" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "dependencyInfo", - "type": "TEXT", - "nullable": true - }, - { - "name": "publishedVersionId", - "type": "varchar(36)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_workflow_dependency_publishedVersionId", - "def": "CREATE INDEX \"IDX_workflow_dependency_publishedVersionId\" ON \"workflow_dependency\" (\"publishedVersionId\") ", - "table": "workflow_dependency", - "columns": [ - "publishedVersionId" - ] - }, - { - "name": "IDX_a4ff2d9b9628ea988fa9e7d0bf", - "def": "CREATE INDEX \"IDX_a4ff2d9b9628ea988fa9e7d0bf\" ON \"workflow_dependency\" (\"workflowId\") ", - "table": "workflow_dependency", - "columns": [ - "workflowId" - ] - }, - { - "name": "IDX_e7fe1cfda990c14a445937d0b9", - "def": "CREATE INDEX \"IDX_e7fe1cfda990c14a445937d0b9\" ON \"workflow_dependency\" (\"dependencyType\") ", - "table": "workflow_dependency", - "columns": [ - "dependencyType" - ] - }, - { - "name": "IDX_e48a201071ab85d9d09119d640", - "def": "CREATE INDEX \"IDX_e48a201071ab85d9d09119d640\" ON \"workflow_dependency\" (\"dependencyKey\") ", - "table": "workflow_dependency", - "columns": [ - "dependencyKey" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_dependency", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_dependency", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"workflow_dependency\" (\"id\" integer PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"workflowVersionId\" integer NOT NULL, \"dependencyType\" varchar(32) NOT NULL, \"dependencyKey\" varchar(255) NOT NULL, \"indexVersionId\" smallint NOT NULL DEFAULT (1), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"dependencyInfo\" text, \"publishedVersionId\" varchar(36), CONSTRAINT \"FK_a4ff2d9b9628ea988fa9e7d0bf8\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "secrets_provider_connection", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "providerKey", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "type", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "encryptedSettings", - "type": "TEXT", - "nullable": false - }, - { - "name": "isEnabled", - "type": "boolean", - "nullable": false, - "default": "false" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_secrets_provider_connection_providerKey", - "def": "CREATE UNIQUE INDEX \"IDX_secrets_provider_connection_providerKey\" ON \"secrets_provider_connection\" (\"providerKey\") ", - "table": "secrets_provider_connection", - "columns": [ - "providerKey" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "secrets_provider_connection", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"secrets_provider_connection\" (\"id\" integer PRIMARY KEY NOT NULL, \"providerKey\" varchar(128) NOT NULL, \"type\" varchar(36) NOT NULL, \"encryptedSettings\" text NOT NULL, \"isEnabled\" boolean NOT NULL DEFAULT (false), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "dynamic_credential_entry", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_d61a12235d268a49af6a3c09c1", - "def": "CREATE INDEX \"IDX_d61a12235d268a49af6a3c09c1\" ON \"dynamic_credential_entry\" (\"resolver_id\") ", - "table": "dynamic_credential_entry", - "columns": [ - "resolver_id" - ] - }, - { - "name": "IDX_62476b94b56d9dc7ed9ed75d3d", - "def": "CREATE INDEX \"IDX_62476b94b56d9dc7ed9ed75d3d\" ON \"dynamic_credential_entry\" (\"subject_id\") ", - "table": "dynamic_credential_entry", - "columns": [ - "subject_id" - ] - }, - { - "name": "sqlite_autoindex_dynamic_credential_entry_1", - "def": "PRIMARY KEY (credential_id, subject_id, resolver_id)", - "table": "dynamic_credential_entry", - "columns": [ - "credential_id", - "subject_id", - "resolver_id" - ] - } - ], - "constraints": [ - { - "name": "credential_id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credential_id)", - "table": "dynamic_credential_entry", - "columns": [ - "credential_id" - ] - }, - { - "name": "subject_id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (subject_id)", - "table": "dynamic_credential_entry", - "columns": [ - "subject_id" - ] - }, - { - "name": "resolver_id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (resolver_id)", - "table": "dynamic_credential_entry", - "columns": [ - "resolver_id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "dynamic_credential_entry", - "referenced_table": "dynamic_credential_resolver", - "columns": [ - "resolver_id" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "dynamic_credential_entry", - "referenced_table": "credentials_entity", - "columns": [ - "credential_id" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_dynamic_credential_entry_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credential_id, subject_id, resolver_id)", - "table": "dynamic_credential_entry", - "columns": [ - "credential_id", - "subject_id", - "resolver_id" - ] - } - ], - "def": "CREATE TABLE \"dynamic_credential_entry\" (\"credential_id\" varchar(16) NOT NULL, \"subject_id\" varchar(2048) NOT NULL, \"resolver_id\" varchar(16) NOT NULL, \"data\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_a6d1dd080958304a47a02952aab\" FOREIGN KEY (\"credential_id\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_d61a12235d268a49af6a3c09c13\" FOREIGN KEY (\"resolver_id\") REFERENCES \"dynamic_credential_resolver\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"credential_id\", \"subject_id\", \"resolver_id\"))" - }, - { - "name": "chat_hub_tools", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "name", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "type", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "typeVersion", - "type": "REAL", - "nullable": false - }, - { - "name": "ownerId", - "type": "varchar", - "nullable": false - }, - { - "name": "definition", - "type": "TEXT", - "nullable": false - }, - { - "name": "enabled", - "type": "boolean", - "nullable": false, - "default": "true" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_4c72ebdb265d1775bf61147af0", - "def": "CREATE UNIQUE INDEX \"IDX_4c72ebdb265d1775bf61147af0\" ON \"chat_hub_tools\" (\"ownerId\", \"name\") ", - "table": "chat_hub_tools", - "columns": [ - "ownerId", - "name" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_tools_1", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_tools", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_tools", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_tools", - "referenced_table": "user", - "columns": [ - "ownerId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_tools_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_tools", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"chat_hub_tools\" (\"id\" varchar PRIMARY KEY NOT NULL, \"name\" varchar(255) NOT NULL, \"type\" varchar(255) NOT NULL, \"typeVersion\" real NOT NULL, \"ownerId\" varchar NOT NULL, \"definition\" text NOT NULL, \"enabled\" boolean NOT NULL DEFAULT (true), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_b8030b47af9213f1fd15450fb7f\" FOREIGN KEY (\"ownerId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "chat_hub_session_tools", - "type": "table", - "columns": [ - { - "name": "sessionId", - "type": "varchar", - "nullable": false - }, - { - "name": "toolId", - "type": "varchar", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_chat_hub_session_tools_1", - "def": "PRIMARY KEY (sessionId, toolId)", - "table": "chat_hub_session_tools", - "columns": [ - "sessionId", - "toolId" - ] - } - ], - "constraints": [ - { - "name": "sessionId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (sessionId)", - "table": "chat_hub_session_tools", - "columns": [ - "sessionId" - ] - }, - { - "name": "toolId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (toolId)", - "table": "chat_hub_session_tools", - "columns": [ - "toolId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_session_tools", - "referenced_table": "chat_hub_tools", - "columns": [ - "toolId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_session_tools", - "referenced_table": "chat_hub_sessions", - "columns": [ - "sessionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_session_tools_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (sessionId, toolId)", - "table": "chat_hub_session_tools", - "columns": [ - "sessionId", - "toolId" - ] - } - ], - "def": "CREATE TABLE \"chat_hub_session_tools\" (\"sessionId\" varchar NOT NULL, \"toolId\" varchar NOT NULL, CONSTRAINT \"FK_e649bf1295f4ed8d4299ed290f9\" FOREIGN KEY (\"sessionId\") REFERENCES \"chat_hub_sessions\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_6596a328affd8d4967ffb303eee\" FOREIGN KEY (\"toolId\") REFERENCES \"chat_hub_tools\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"sessionId\", \"toolId\"))" - }, - { - "name": "chat_hub_agent_tools", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar", - "nullable": false - }, - { - "name": "toolId", - "type": "varchar", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_chat_hub_agent_tools_1", - "def": "PRIMARY KEY (agentId, toolId)", - "table": "chat_hub_agent_tools", - "columns": [ - "agentId", - "toolId" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "chat_hub_agent_tools", - "columns": [ - "agentId" - ] - }, - { - "name": "toolId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (toolId)", - "table": "chat_hub_agent_tools", - "columns": [ - "toolId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_agent_tools", - "referenced_table": "chat_hub_tools", - "columns": [ - "toolId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_agent_tools", - "referenced_table": "chat_hub_agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_agent_tools_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, toolId)", - "table": "chat_hub_agent_tools", - "columns": [ - "agentId", - "toolId" - ] - } - ], - "def": "CREATE TABLE \"chat_hub_agent_tools\" (\"agentId\" varchar NOT NULL, \"toolId\" varchar NOT NULL, CONSTRAINT \"FK_2b53d796b3dbae91b1a9553c048\" FOREIGN KEY (\"agentId\") REFERENCES \"chat_hub_agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_43e70f04c53344f82483d0570f6\" FOREIGN KEY (\"toolId\") REFERENCES \"chat_hub_tools\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"toolId\"))" - }, - { - "name": "chat_hub_agents", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "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": "varchar", - "nullable": false - }, - { - "name": "credentialId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "provider", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "model", - "type": "varchar(64)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "icon", - "type": "TEXT", - "nullable": true - }, - { - "name": "files", - "type": "TEXT", - "nullable": false, - "default": "'[]'" - }, - { - "name": "suggestedPrompts", - "type": "TEXT", - "nullable": false, - "default": "'[]'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_chat_hub_agents_1", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_agents", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_agents", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_agents", - "referenced_table": "user", - "columns": [ - "ownerId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_agents", - "referenced_table": "credentials_entity", - "columns": [ - "credentialId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_agents_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_agents", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"chat_hub_agents\" (\"id\" varchar PRIMARY KEY NOT NULL, \"name\" varchar(256) NOT NULL, \"description\" varchar(512), \"systemPrompt\" text NOT NULL, \"ownerId\" varchar NOT NULL, \"credentialId\" varchar(36), \"provider\" varchar(16) NOT NULL, \"model\" varchar(64) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"icon\" text, \"files\" text NOT NULL DEFAULT ('[]'), \"suggestedPrompts\" text NOT NULL DEFAULT ('[]'), CONSTRAINT \"FK_9c61ad497dcbae499c96a6a78ba\" FOREIGN KEY (\"credentialId\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_441ba2caba11e077ce3fbfa2cd8\" FOREIGN KEY (\"ownerId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "project_secrets_provider_access", - "type": "table", - "columns": [ - { - "name": "secretsProviderConnectionId", - "type": "INTEGER", - "nullable": false - }, - { - "name": "projectId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "role", - "type": "varchar(128)", - "nullable": false, - "default": "'secretsProviderConnection:user'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_project_secrets_provider_access_1", - "def": "PRIMARY KEY (secretsProviderConnectionId, projectId)", - "table": "project_secrets_provider_access", - "columns": [ - "secretsProviderConnectionId", - "projectId" - ] - } - ], - "constraints": [ - { - "name": "secretsProviderConnectionId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (secretsProviderConnectionId)", - "table": "project_secrets_provider_access", - "columns": [ - "secretsProviderConnectionId" - ] - }, - { - "name": "projectId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (projectId)", - "table": "project_secrets_provider_access", - "columns": [ - "projectId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "project_secrets_provider_access", - "referenced_table": "secrets_provider_connection", - "columns": [ - "secretsProviderConnectionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "project_secrets_provider_access", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_project_secrets_provider_access_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (secretsProviderConnectionId, projectId)", - "table": "project_secrets_provider_access", - "columns": [ - "secretsProviderConnectionId", - "projectId" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"role\" IN ('secretsProviderConnection:owner', 'secretsProviderConnection:user'))", - "table": "project_secrets_provider_access", - "columns": [ - "role" - ] - } - ], - "def": "CREATE TABLE \"project_secrets_provider_access\" (\"secretsProviderConnectionId\" integer NOT NULL, \"projectId\" varchar(36) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"role\" varchar(128) NOT NULL DEFAULT ('secretsProviderConnection:user'), CONSTRAINT \"CHK_project_secrets_provider_access_role\" CHECK (\"role\" IN ('secretsProviderConnection:owner', 'secretsProviderConnection:user')), CONSTRAINT \"FK_bd264b81209355b543878deedb1\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_18e5c27d2524b1638b292904e48\" FOREIGN KEY (\"secretsProviderConnectionId\") REFERENCES \"secrets_provider_connection\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, PRIMARY KEY (\"secretsProviderConnectionId\", \"projectId\"))" - }, - { - "name": "workflow_published_version", - "type": "table", - "columns": [ - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "publishedVersionId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_workflow_published_version_1", - "def": "PRIMARY KEY (workflowId)", - "table": "workflow_published_version", - "columns": [ - "workflowId" - ] - } - ], - "constraints": [ - { - "name": "workflowId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "workflow_published_version", - "columns": [ - "workflowId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE", - "table": "workflow_published_version", - "referenced_table": "workflow_history", - "columns": [ - "publishedVersionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE", - "table": "workflow_published_version", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_published_version", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_published_version", - "referenced_table": "workflow_history", - "columns": [ - "publishedVersionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "sqlite_autoindex_workflow_published_version_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "workflow_published_version", - "columns": [ - "workflowId" - ] - } - ], - "def": "CREATE TABLE \"workflow_published_version\" (\"workflowId\" varchar(36) PRIMARY KEY NOT NULL, \"publishedVersionId\" varchar(36) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_df3428a541b802d6a63ac56e330\" FOREIGN KEY (\"publishedVersionId\") REFERENCES \"workflow_history\" (\"versionId\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_5c76fb7ee939fe2530374d3f75a\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_5c76fb7ee939fe2530374d3f75a\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE RESTRICT, CONSTRAINT \"FK_df3428a541b802d6a63ac56e330\" FOREIGN KEY (\"publishedVersionId\") REFERENCES \"workflow_history\" (\"versionId\") ON DELETE RESTRICT)" - }, - { - "name": "chat_hub_sessions", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "title", - "type": "varchar(256)", - "nullable": false - }, - { - "name": "ownerId", - "type": "varchar", - "nullable": false - }, - { - "name": "lastMessageAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "credentialId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "provider", - "type": "varchar(16)", - "nullable": true - }, - { - "name": "model", - "type": "varchar(64)", - "nullable": true - }, - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "agentName", - "type": "varchar(128)", - "nullable": true - }, - { - "name": "type", - "type": "varchar(16)", - "nullable": false, - "default": "'production'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_chat_hub_sessions_1", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_sessions", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_sessions", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "chat_hub_sessions", - "referenced_table": "user", - "columns": [ - "ownerId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_sessions", - "referenced_table": "credentials_entity", - "columns": [ - "credentialId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_sessions", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "chat_hub_sessions", - "referenced_table": "chat_hub_agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_chat_hub_sessions_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "chat_hub_sessions", - "columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"type\" IN ('production', 'manual'))", - "table": "chat_hub_sessions", - "columns": [ - "type" - ] - } - ], - "def": "CREATE TABLE \"chat_hub_sessions\" (\"id\" varchar PRIMARY KEY NOT NULL, \"title\" varchar(256) NOT NULL, \"ownerId\" varchar NOT NULL, \"lastMessageAt\" datetime(3) NOT NULL, \"credentialId\" varchar(36), \"provider\" varchar(16), \"model\" varchar(64), \"workflowId\" varchar(36), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"agentId\" varchar(36), \"agentName\" varchar(128), \"type\" varchar(16) NOT NULL DEFAULT ('production'), CONSTRAINT \"CHK_chat_hub_sessions_type\" CHECK (\"type\" IN ('production', 'manual')), CONSTRAINT \"FK_chat_hub_sessions_agentId\" FOREIGN KEY (\"agentId\") REFERENCES \"chat_hub_agents\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_9f9293d9f552496c40e0d1a8f80\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_7bc13b4c7e6afbfaf9be326c189\" FOREIGN KEY (\"credentialId\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_e9ecf8ede7d989fcd18790fe36a\" FOREIGN KEY (\"ownerId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "role_mapping_rule", - "type": "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 - }, - { - "name": "order", - "type": "INTEGER", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_bb66e404c35996b0d694617750", - "def": "CREATE INDEX \"IDX_bb66e404c35996b0d694617750\" ON \"role_mapping_rule\" (\"role\") ", - "table": "role_mapping_rule", - "columns": [ - "role" - ] - }, - { - "name": "sqlite_autoindex_role_mapping_rule_2", - "def": "UNIQUE (type, order)", - "table": "role_mapping_rule", - "columns": [ - "type", - "order" - ] - }, - { - "name": "sqlite_autoindex_role_mapping_rule_1", - "def": "PRIMARY KEY (id)", - "table": "role_mapping_rule", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "role_mapping_rule", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE", - "table": "role_mapping_rule", - "referenced_table": "role", - "columns": [ - "role" - ], - "referenced_columns": [ - "slug" - ] - }, - { - "name": "sqlite_autoindex_role_mapping_rule_2", - "type": "UNIQUE", - "def": "UNIQUE (type, order)", - "table": "role_mapping_rule", - "columns": [ - "type", - "order" - ] - }, - { - "name": "sqlite_autoindex_role_mapping_rule_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "role_mapping_rule", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"role_mapping_rule\" (\"id\" varchar(16) PRIMARY KEY NOT NULL, \"expression\" text NOT NULL, \"role\" varchar(128) NOT NULL, \"type\" varchar(64) NOT NULL, \"order\" integer NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"UQ_b33ac896ad3099fc8de36fdc1c4\" UNIQUE (\"type\", \"order\"), CONSTRAINT \"FK_bb66e404c35996b0d6946177501\" FOREIGN KEY (\"role\") REFERENCES \"role\" (\"slug\") ON DELETE CASCADE ON UPDATE CASCADE)" - }, - { - "name": "role_mapping_rule_project", - "type": "table", - "columns": [ - { - "name": "roleMappingRuleId", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "projectId", - "type": "varchar(36)", - "nullable": false - } - ], - "indexes": [ - { - "name": "IDX_35a78869286c65d9330d02b88f", - "def": "CREATE INDEX \"IDX_35a78869286c65d9330d02b88f\" ON \"role_mapping_rule_project\" (\"projectId\") ", - "table": "role_mapping_rule_project", - "columns": [ - "projectId" - ] - }, - { - "name": "sqlite_autoindex_role_mapping_rule_project_1", - "def": "PRIMARY KEY (roleMappingRuleId, projectId)", - "table": "role_mapping_rule_project", - "columns": [ - "roleMappingRuleId", - "projectId" - ] - } - ], - "constraints": [ - { - "name": "roleMappingRuleId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (roleMappingRuleId)", - "table": "role_mapping_rule_project", - "columns": [ - "roleMappingRuleId" - ] - }, - { - "name": "projectId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (projectId)", - "table": "role_mapping_rule_project", - "columns": [ - "projectId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "role_mapping_rule_project", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "role_mapping_rule_project", - "referenced_table": "role_mapping_rule", - "columns": [ - "roleMappingRuleId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_role_mapping_rule_project_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (roleMappingRuleId, projectId)", - "table": "role_mapping_rule_project", - "columns": [ - "roleMappingRuleId", - "projectId" - ] - } - ], - "def": "CREATE TABLE \"role_mapping_rule_project\" (\"roleMappingRuleId\" varchar(16) NOT NULL, \"projectId\" varchar(36) NOT NULL, CONSTRAINT \"FK_dd7ce4dfa09e95b36a626bd9de3\" FOREIGN KEY (\"roleMappingRuleId\") REFERENCES \"role_mapping_rule\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_35a78869286c65d9330d02b88f5\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"roleMappingRuleId\", \"projectId\"))" - }, - { - "name": "credential_dependency", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_credential_dependency_credentialId_dependencyType_dependencyId", - "def": "CREATE UNIQUE INDEX \"IDX_credential_dependency_credentialId_dependencyType_dependencyId\" ON \"credential_dependency\" (\"credentialId\", \"dependencyType\", \"dependencyId\") ", - "table": "credential_dependency", - "columns": [ - "credentialId", - "dependencyType", - "dependencyId" - ] - }, - { - "name": "IDX_91ee85fa9619dd6776725e117b", - "def": "CREATE INDEX \"IDX_91ee85fa9619dd6776725e117b\" ON \"credential_dependency\" (\"dependencyType\", \"dependencyId\") ", - "table": "credential_dependency", - "columns": [ - "dependencyType", - "dependencyId" - ] - }, - { - "name": "IDX_5ec8e8c8d3539f3696cf73b43b", - "def": "CREATE INDEX \"IDX_5ec8e8c8d3539f3696cf73b43b\" ON \"credential_dependency\" (\"credentialId\") ", - "table": "credential_dependency", - "columns": [ - "credentialId" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "credential_dependency", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "credential_dependency", - "referenced_table": "credentials_entity", - "columns": [ - "credentialId" - ], - "referenced_columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"credential_dependency\" (\"id\" integer PRIMARY KEY NOT NULL, \"credentialId\" varchar(36) NOT NULL, \"dependencyType\" varchar(64) NOT NULL, \"dependencyId\" varchar(255) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_5ec8e8c8d3539f3696cf73b43bf\" FOREIGN KEY (\"credentialId\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "workflow_builder_session", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "messages", - "type": "TEXT", - "nullable": false, - "default": "'[]'" - }, - { - "name": "previousSummary", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "activeVersionCardId", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "resumeAfterRestoreMessageId", - "type": "varchar(255)", - "nullable": true - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_workflow_builder_session_2", - "def": "UNIQUE (workflowId, userId)", - "table": "workflow_builder_session", - "columns": [ - "workflowId", - "userId" - ] - }, - { - "name": "sqlite_autoindex_workflow_builder_session_1", - "def": "PRIMARY KEY (id)", - "table": "workflow_builder_session", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_builder_session", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_builder_session", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_builder_session", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_workflow_builder_session_2", - "type": "UNIQUE", - "def": "UNIQUE (workflowId, userId)", - "table": "workflow_builder_session", - "columns": [ - "workflowId", - "userId" - ] - }, - { - "name": "sqlite_autoindex_workflow_builder_session_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_builder_session", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"workflow_builder_session\" (\"id\" varchar PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"userId\" varchar NOT NULL, \"messages\" text NOT NULL DEFAULT ('[]'), \"previousSummary\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"activeVersionCardId\" varchar(255), \"resumeAfterRestoreMessageId\" varchar(255), CONSTRAINT \"UQ_ec2aa73632932d485a1d5192ce1\" UNIQUE (\"workflowId\", \"userId\"), CONSTRAINT \"FK_00290cdeee4d4d7db84709be936\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_7983c618db48f47bf5a4cc1e1e4\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "instance_version_history", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "major", - "type": "INTEGER", - "nullable": false - }, - { - "name": "minor", - "type": "INTEGER", - "nullable": false - }, - { - "name": "patch", - "type": "INTEGER", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_version_history", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_version_history\" (\"id\" integer PRIMARY KEY AUTOINCREMENT NOT NULL, \"major\" integer NOT NULL, \"minor\" integer NOT NULL, \"patch\" integer NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "instance_ai_messages", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "threadId", - "type": "varchar", - "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_76e212c6867fbaa06bf0decd6f", - "def": "CREATE INDEX \"IDX_76e212c6867fbaa06bf0decd6f\" ON \"instance_ai_messages\" (\"resourceId\") ", - "table": "instance_ai_messages", - "columns": [ - "resourceId" - ] - }, - { - "name": "IDX_1eeb64cb9d66a927988de759e6", - "def": "CREATE INDEX \"IDX_1eeb64cb9d66a927988de759e6\" ON \"instance_ai_messages\" (\"threadId\") ", - "table": "instance_ai_messages", - "columns": [ - "threadId" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_messages_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_messages", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_messages", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_messages", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_messages_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_messages", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_messages\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"threadId\" varchar NOT NULL, \"content\" text NOT NULL, \"role\" varchar(16) NOT NULL, \"type\" varchar(32), \"resourceId\" varchar(255), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_1eeb64cb9d66a927988de759e6e\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "instance_ai_resources", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "workingMemory", - "type": "TEXT", - "nullable": true - }, - { - "name": "metadata", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_instance_ai_resources_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_resources", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_resources", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_resources_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_resources", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_resources\" (\"id\" varchar(255) PRIMARY KEY NOT NULL, \"workingMemory\" text, \"metadata\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "instance_ai_observational_memory", - "type": "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": "varchar", - "nullable": true - }, - { - "name": "resourceId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "activeObservations", - "type": "TEXT", - "nullable": false, - "default": "''" - }, - { - "name": "originType", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "config", - "type": "TEXT", - "nullable": false - }, - { - "name": "generationCount", - "type": "INTEGER", - "nullable": false, - "default": "0" - }, - { - "name": "lastObservedAt", - "type": "datetime(3)", - "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": "TEXT", - "nullable": true - }, - { - "name": "observedTimezone", - "type": "varchar", - "nullable": true - }, - { - "name": "bufferedObservations", - "type": "TEXT", - "nullable": true - }, - { - "name": "bufferedObservationTokens", - "type": "INTEGER", - "nullable": true - }, - { - "name": "bufferedMessageIds", - "type": "TEXT", - "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": "TEXT", - "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": "datetime(3)", - "nullable": true - }, - { - "name": "metadata", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_a680ac96aae02dc887bbaac512", - "def": "CREATE UNIQUE INDEX \"IDX_a680ac96aae02dc887bbaac512\" ON \"instance_ai_observational_memory\" (\"scope\", \"threadId\", \"resourceId\") ", - "table": "instance_ai_observational_memory", - "columns": [ - "scope", - "threadId", - "resourceId" - ] - }, - { - "name": "IDX_92f13cb6bc694227e069447f7b", - "def": "CREATE INDEX \"IDX_92f13cb6bc694227e069447f7b\" ON \"instance_ai_observational_memory\" (\"lookupKey\") ", - "table": "instance_ai_observational_memory", - "columns": [ - "lookupKey" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_observational_memory_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_observational_memory", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_observational_memory", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "instance_ai_observational_memory", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_observational_memory_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_observational_memory", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_observational_memory\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"lookupKey\" varchar(255) NOT NULL, \"scope\" varchar(16) NOT NULL, \"threadId\" varchar, \"resourceId\" varchar(255) NOT NULL, \"activeObservations\" text NOT NULL DEFAULT (''), \"originType\" varchar(32) NOT NULL, \"config\" text NOT NULL, \"generationCount\" integer NOT NULL DEFAULT (0), \"lastObservedAt\" datetime(3), \"pendingMessageTokens\" integer NOT NULL DEFAULT (0), \"totalTokensObserved\" integer NOT NULL DEFAULT (0), \"observationTokenCount\" integer NOT NULL DEFAULT (0), \"isObserving\" boolean NOT NULL DEFAULT (false), \"isReflecting\" boolean NOT NULL DEFAULT (false), \"observedMessageIds\" text, \"observedTimezone\" varchar, \"bufferedObservations\" text, \"bufferedObservationTokens\" integer, \"bufferedMessageIds\" text, \"bufferedReflection\" text, \"bufferedReflectionTokens\" integer, \"bufferedReflectionInputTokens\" integer, \"reflectedObservationLineCount\" integer, \"bufferedObservationChunks\" text, \"isBufferingObservation\" boolean NOT NULL DEFAULT (false), \"isBufferingReflection\" boolean NOT NULL DEFAULT (false), \"lastBufferedAtTokens\" integer NOT NULL DEFAULT (0), \"lastBufferedAtTime\" datetime(3), \"metadata\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_34018c303885cd37093458e6409\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "instance_ai_workflow_snapshots", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_a371ee6b8e0ebb5635f8baa46d", - "def": "CREATE INDEX \"IDX_a371ee6b8e0ebb5635f8baa46d\" ON \"instance_ai_workflow_snapshots\" (\"workflowName\", \"status\") ", - "table": "instance_ai_workflow_snapshots", - "columns": [ - "workflowName", - "status" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_workflow_snapshots_1", - "def": "PRIMARY KEY (runId, workflowName)", - "table": "instance_ai_workflow_snapshots", - "columns": [ - "runId", - "workflowName" - ] - } - ], - "constraints": [ - { - "name": "runId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (runId)", - "table": "instance_ai_workflow_snapshots", - "columns": [ - "runId" - ] - }, - { - "name": "workflowName", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowName)", - "table": "instance_ai_workflow_snapshots", - "columns": [ - "workflowName" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_workflow_snapshots_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (runId, workflowName)", - "table": "instance_ai_workflow_snapshots", - "columns": [ - "runId", - "workflowName" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_workflow_snapshots\" (\"runId\" varchar(36) NOT NULL, \"workflowName\" varchar(255) NOT NULL, \"resourceId\" varchar(255), \"status\" varchar, \"snapshot\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), PRIMARY KEY (\"runId\", \"workflowName\"))" - }, - { - "name": "instance_ai_iteration_logs", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "threadId", - "type": "varchar", - "nullable": false - }, - { - "name": "taskKey", - "type": "varchar", - "nullable": false - }, - { - "name": "entry", - "type": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_02751202c9a2ad75f2d8e14f5e", - "def": "CREATE INDEX \"IDX_02751202c9a2ad75f2d8e14f5e\" ON \"instance_ai_iteration_logs\" (\"threadId\", \"taskKey\", \"createdAt\") ", - "table": "instance_ai_iteration_logs", - "columns": [ - "threadId", - "taskKey", - "createdAt" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_iteration_logs_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_iteration_logs", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_iteration_logs", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_iteration_logs", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_iteration_logs_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_iteration_logs", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_iteration_logs\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"threadId\" varchar NOT NULL, \"taskKey\" varchar NOT NULL, \"entry\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_8bfcc6c51fd3d69b1eae8aebd49\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "token_exchange_jti", - "type": "table", - "columns": [ - { - "name": "jti", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "expiresAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_token_exchange_jti_1", - "def": "PRIMARY KEY (jti)", - "table": "token_exchange_jti", - "columns": [ - "jti" - ] - } - ], - "constraints": [ - { - "name": "jti", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (jti)", - "table": "token_exchange_jti", - "columns": [ - "jti" - ] - }, - { - "name": "sqlite_autoindex_token_exchange_jti_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (jti)", - "table": "token_exchange_jti", - "columns": [ - "jti" - ] - } - ], - "def": "CREATE TABLE \"token_exchange_jti\" (\"jti\" varchar(255) PRIMARY KEY NOT NULL, \"expiresAt\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL)" - }, - { - "name": "workflow_publish_history", - "type": "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 - }, - { - "name": "userId", - "type": "varchar", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_070b5de842ece9ccdda0d9738b", - "def": "CREATE INDEX \"IDX_070b5de842ece9ccdda0d9738b\" ON \"workflow_publish_history\" (\"workflowId\", \"versionId\") ", - "table": "workflow_publish_history", - "columns": [ - "workflowId", - "versionId" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_publish_history", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "workflow_publish_history", - "referenced_table": "workflow_history", - "columns": [ - "versionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "workflow_publish_history", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_publish_history", - "referenced_table": "workflow_history", - "columns": [ - "versionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_publish_history", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (((\"event\" IN ('activated', 'deactivated'))))", - "table": "workflow_publish_history", - "columns": [ - "event" - ] - } - ], - "def": "CREATE TABLE \"workflow_publish_history\" (\"id\" integer PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"versionId\" varchar(36), \"event\" varchar(36) NOT NULL, \"userId\" varchar, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_workflow_publish_history_event\" CHECK (((\"event\" IN ('activated', 'deactivated')))), CONSTRAINT \"FK_c01316f8c2d7101ec4fa9809267\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_b4cfbc7556d07f36ca177f5e473\" FOREIGN KEY (\"versionId\") REFERENCES \"workflow_history\" (\"versionId\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_6eab5bd9eedabe9c54bd879fc40\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_b4cfbc7556d07f36ca177f5e473\" FOREIGN KEY (\"versionId\") REFERENCES \"workflow_history\" (\"versionId\") ON DELETE SET NULL)" - }, - { - "name": "trusted_key_source", - "type": "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'" - }, - { - "name": "lastError", - "type": "TEXT", - "nullable": true - }, - { - "name": "lastRefreshedAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_trusted_key_source_1", - "def": "PRIMARY KEY (id)", - "table": "trusted_key_source", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "trusted_key_source", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_trusted_key_source_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "trusted_key_source", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"trusted_key_source\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"type\" varchar(32) NOT NULL, \"config\" text NOT NULL, \"status\" varchar(32) NOT NULL DEFAULT ('pending'), \"lastError\" text, \"lastRefreshedAt\" datetime(3), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "trusted_key", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_trusted_key_1", - "def": "PRIMARY KEY (sourceId, kid)", - "table": "trusted_key", - "columns": [ - "sourceId", - "kid" - ] - } - ], - "constraints": [ - { - "name": "sourceId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (sourceId)", - "table": "trusted_key", - "columns": [ - "sourceId" - ] - }, - { - "name": "kid", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (kid)", - "table": "trusted_key", - "columns": [ - "kid" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "trusted_key", - "referenced_table": "trusted_key_source", - "columns": [ - "sourceId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_trusted_key_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (sourceId, kid)", - "table": "trusted_key", - "columns": [ - "sourceId", - "kid" - ] - } - ], - "def": "CREATE TABLE \"trusted_key\" (\"sourceId\" varchar(36) NOT NULL, \"kid\" varchar(255) NOT NULL, \"data\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_8c2938d746943dd8f608d23c891\" FOREIGN KEY (\"sourceId\") REFERENCES \"trusted_key_source\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"sourceId\", \"kid\"))" - }, - { - "name": "user_favorites", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "resourceId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "resourceType", - "type": "varchar(64)", - "nullable": false - } - ], - "indexes": [ - { - "name": "IDX_1d11050a381548c42c32cc25c4", - "def": "CREATE INDEX \"IDX_1d11050a381548c42c32cc25c4\" ON \"user_favorites\" (\"resourceType\", \"resourceId\") ", - "table": "user_favorites", - "columns": [ - "resourceType", - "resourceId" - ] - }, - { - "name": "IDX_1dd5c393ad0517be3c31a7af83", - "def": "CREATE INDEX \"IDX_1dd5c393ad0517be3c31a7af83\" ON \"user_favorites\" (\"userId\") ", - "table": "user_favorites", - "columns": [ - "userId" - ] - }, - { - "name": "sqlite_autoindex_user_favorites_1", - "def": "UNIQUE (userId, resourceId, resourceType)", - "table": "user_favorites", - "columns": [ - "userId", - "resourceId", - "resourceType" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "user_favorites", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "user_favorites", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_user_favorites_1", - "type": "UNIQUE", - "def": "UNIQUE (userId, resourceId, resourceType)", - "table": "user_favorites", - "columns": [ - "userId", - "resourceId", - "resourceType" - ] - } - ], - "def": "CREATE TABLE \"user_favorites\" (\"id\" integer PRIMARY KEY NOT NULL, \"userId\" varchar NOT NULL, \"resourceId\" varchar(255) NOT NULL, \"resourceType\" varchar(64) NOT NULL, CONSTRAINT \"UQ_cf6ae658ead9ffc124723413c65\" UNIQUE (\"userId\", \"resourceId\", \"resourceType\"), CONSTRAINT \"FK_1dd5c393ad0517be3c31a7af836\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "deployment_key", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_deployment_key_jwe_private_key_active", - "def": "CREATE UNIQUE INDEX \"IDX_deployment_key_jwe_private_key_active\" ON \"deployment_key\" (\"type\", \"algorithm\") WHERE status = 'active' AND type = 'jwe.private-key'", - "table": "deployment_key", - "columns": [ - "type", - "algorithm" - ] - }, - { - "name": "IDX_deployment_key_signing_binary_data_active", - "def": "CREATE UNIQUE INDEX \"IDX_deployment_key_signing_binary_data_active\" ON \"deployment_key\" (\"type\") WHERE status = 'active' AND type = 'signing.binary_data'", - "table": "deployment_key", - "columns": [ - "type" - ] - }, - { - "name": "IDX_deployment_key_signing_hmac_active", - "def": "CREATE UNIQUE INDEX \"IDX_deployment_key_signing_hmac_active\" ON \"deployment_key\" (\"type\") WHERE status = 'active' AND type = 'signing.hmac'", - "table": "deployment_key", - "columns": [ - "type" - ] - }, - { - "name": "IDX_deployment_key_signing_jwt_active", - "def": "CREATE UNIQUE INDEX \"IDX_deployment_key_signing_jwt_active\" ON \"deployment_key\" (\"type\") WHERE status = 'active' AND type = 'signing.jwt'", - "table": "deployment_key", - "columns": [ - "type" - ] - }, - { - "name": "IDX_deployment_key_instance_id_active", - "def": "CREATE UNIQUE INDEX \"IDX_deployment_key_instance_id_active\" ON \"deployment_key\" (\"type\") WHERE status = 'active' AND type = 'instance.id'", - "table": "deployment_key", - "columns": [ - "type" - ] - }, - { - "name": "IDX_deployment_key_data_encryption_active", - "def": "CREATE UNIQUE INDEX \"IDX_deployment_key_data_encryption_active\" ON \"deployment_key\" (\"type\") WHERE status = 'active' AND type = 'data_encryption'", - "table": "deployment_key", - "columns": [ - "type" - ] - }, - { - "name": "sqlite_autoindex_deployment_key_1", - "def": "PRIMARY KEY (id)", - "table": "deployment_key", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "deployment_key", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_deployment_key_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "deployment_key", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"deployment_key\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"type\" varchar(64) NOT NULL, \"value\" text NOT NULL, \"algorithm\" varchar(20), \"status\" varchar(20) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "ai_builder_temporary_workflow", - "type": "table", - "columns": [ - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "threadId", - "type": "varchar", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_39b07732e819fb561d74c38763", - "def": "CREATE INDEX \"IDX_39b07732e819fb561d74c38763\" ON \"ai_builder_temporary_workflow\" (\"threadId\") ", - "table": "ai_builder_temporary_workflow", - "columns": [ - "threadId" - ] - }, - { - "name": "sqlite_autoindex_ai_builder_temporary_workflow_1", - "def": "PRIMARY KEY (workflowId)", - "table": "ai_builder_temporary_workflow", - "columns": [ - "workflowId" - ] - } - ], - "constraints": [ - { - "name": "workflowId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "ai_builder_temporary_workflow", - "columns": [ - "workflowId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "ai_builder_temporary_workflow", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "ai_builder_temporary_workflow", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_ai_builder_temporary_workflow_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (workflowId)", - "table": "ai_builder_temporary_workflow", - "columns": [ - "workflowId" - ] - } - ], - "def": "CREATE TABLE \"ai_builder_temporary_workflow\" (\"workflowId\" varchar(36) PRIMARY KEY NOT NULL, \"threadId\" varchar NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_85a87a1ba0f61999fe11dc56325\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_39b07732e819fb561d74c38763f\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "execution_entity", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "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": "datetime", - "nullable": true - }, - { - "name": "stoppedAt", - "type": "datetime", - "nullable": true - }, - { - "name": "waitTill", - "type": "datetime", - "nullable": true - }, - { - "name": "status", - "type": "varchar", - "nullable": false - }, - { - "name": "deletedAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "storedAt", - "type": "varchar(2)", - "nullable": false, - "default": "'db'" - }, - { - "name": "tracingContext", - "type": "TEXT", - "nullable": true - }, - { - "name": "deduplicationKey", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "jsonSizeBytes", - "type": "BIGINT", - "nullable": false, - "default": "0" - }, - { - "name": "workflowVersionId", - "type": "VARCHAR(36)", - "nullable": true, - "default": "NULL" - } - ], - "indexes": [ - { - "name": "IDX_execution_entity_deduplicationKey", - "def": "CREATE UNIQUE INDEX \"IDX_execution_entity_deduplicationKey\" ON \"execution_entity\" (\"deduplicationKey\") WHERE \"deduplicationKey\" IS NOT NULL", - "table": "execution_entity", - "columns": [ - "deduplicationKey" - ] - }, - { - "name": "IDX_execution_entity_stoppedAt", - "def": "CREATE INDEX \"IDX_execution_entity_stoppedAt\" ON \"execution_entity\" (\"stoppedAt\") ", - "table": "execution_entity", - "columns": [ - "stoppedAt" - ] - }, - { - "name": "IDX_execution_entity_deletedAt", - "def": "CREATE INDEX \"IDX_execution_entity_deletedAt\" ON \"execution_entity\" (\"deletedAt\") ", - "table": "execution_entity", - "columns": [ - "deletedAt" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "execution_entity", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "execution_entity", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"execution_entity\" (\"id\" integer PRIMARY KEY AUTOINCREMENT NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"finished\" boolean NOT NULL, \"mode\" varchar NOT NULL, \"retryOf\" varchar, \"retrySuccessId\" varchar, \"startedAt\" datetime, \"stoppedAt\" datetime, \"waitTill\" datetime, \"status\" varchar NOT NULL, \"deletedAt\" datetime(3), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"storedAt\" varchar(2) NOT NULL DEFAULT ('db'), \"tracingContext\" text, \"deduplicationKey\" varchar(255), \"jsonSizeBytes\" BIGINT NOT NULL DEFAULT 0, \"workflowVersionId\" VARCHAR(36) DEFAULT NULL, CONSTRAINT \"FK_c4d999a5e90784e8caccf5589de\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "evaluation_config", - "type": "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'" - }, - { - "name": "invalidReason", - "type": "varchar(64)", - "nullable": true - }, - { - "name": "datasetSource", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "datasetRef", - "type": "TEXT", - "nullable": false - }, - { - "name": "startNodeName", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "endNodeName", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "metrics", - "type": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_fd7542bb123074760285dc1bbf", - "def": "CREATE INDEX \"IDX_fd7542bb123074760285dc1bbf\" ON \"evaluation_config\" (\"workflowId\") ", - "table": "evaluation_config", - "columns": [ - "workflowId" - ] - }, - { - "name": "sqlite_autoindex_evaluation_config_2", - "def": "UNIQUE (workflowId, name)", - "table": "evaluation_config", - "columns": [ - "workflowId", - "name" - ] - }, - { - "name": "sqlite_autoindex_evaluation_config_1", - "def": "PRIMARY KEY (id)", - "table": "evaluation_config", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "evaluation_config", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "evaluation_config", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_evaluation_config_2", - "type": "UNIQUE", - "def": "UNIQUE (workflowId, name)", - "table": "evaluation_config", - "columns": [ - "workflowId", - "name" - ] - }, - { - "name": "sqlite_autoindex_evaluation_config_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "evaluation_config", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"evaluation_config\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"name\" varchar(128) NOT NULL, \"status\" varchar(16) NOT NULL DEFAULT ('valid'), \"invalidReason\" varchar(64), \"datasetSource\" varchar(32) NOT NULL, \"datasetRef\" text NOT NULL, \"startNodeName\" varchar(255) NOT NULL, \"endNodeName\" varchar(255) NOT NULL, \"metrics\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"UQ_3c3c99a712e971835c52292e44c\" UNIQUE (\"workflowId\", \"name\"), CONSTRAINT \"FK_fd7542bb123074760285dc1bbf3\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "evaluation_collection", - "type": "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": "varchar", - "nullable": true - }, - { - "name": "insightsCache", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_d634a0c93fd7de68a87eab951b", - "def": "CREATE INDEX \"IDX_d634a0c93fd7de68a87eab951b\" ON \"evaluation_collection\" (\"evaluationConfigId\") ", - "table": "evaluation_collection", - "columns": [ - "evaluationConfigId" - ] - }, - { - "name": "IDX_a48ce930c3bc7604894b8f0eaa", - "def": "CREATE INDEX \"IDX_a48ce930c3bc7604894b8f0eaa\" ON \"evaluation_collection\" (\"workflowId\") ", - "table": "evaluation_collection", - "columns": [ - "workflowId" - ] - }, - { - "name": "sqlite_autoindex_evaluation_collection_1", - "def": "PRIMARY KEY (id)", - "table": "evaluation_collection", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "evaluation_collection", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "evaluation_collection", - "referenced_table": "user", - "columns": [ - "createdById" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "evaluation_collection", - "referenced_table": "evaluation_config", - "columns": [ - "evaluationConfigId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "evaluation_collection", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_evaluation_collection_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "evaluation_collection", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"evaluation_collection\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"description\" text, \"workflowId\" varchar(36) NOT NULL, \"evaluationConfigId\" varchar(36) NOT NULL, \"createdById\" varchar, \"insightsCache\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_a48ce930c3bc7604894b8f0eaad\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_d634a0c93fd7de68a87eab951b2\" FOREIGN KEY (\"evaluationConfigId\") REFERENCES \"evaluation_config\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_f4561f38b5a22a4f090d5cd3eae\" FOREIGN KEY (\"createdById\") REFERENCES \"user\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "test_run", - "type": "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": "TEXT", - "nullable": true - }, - { - "name": "runAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "completedAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "metrics", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "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": "TEXT", - "nullable": true - }, - { - "name": "collectionId", - "type": "varchar(36)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_test_run_collectionId", - "def": "CREATE INDEX \"IDX_test_run_collectionId\" ON \"test_run\" (\"collectionId\") ", - "table": "test_run", - "columns": [ - "collectionId" - ] - }, - { - "name": "IDX_d6870d3b6e4c185d33926f423c", - "def": "CREATE INDEX \"IDX_d6870d3b6e4c185d33926f423c\" ON \"test_run\" (\"workflowId\") ", - "table": "test_run", - "columns": [ - "workflowId" - ] - }, - { - "name": "IDX_test_run_evaluationConfigId", - "def": "CREATE INDEX \"IDX_test_run_evaluationConfigId\" ON \"test_run\" (\"evaluationConfigId\") ", - "table": "test_run", - "columns": [ - "evaluationConfigId" - ] - }, - { - "name": "sqlite_autoindex_test_run_1", - "def": "PRIMARY KEY (id)", - "table": "test_run", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "test_run", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "test_run", - "referenced_table": "evaluation_collection", - "columns": [ - "collectionId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "test_run", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "test_run", - "referenced_table": "evaluation_config", - "columns": [ - "evaluationConfigId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_test_run_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "test_run", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"test_run\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"status\" varchar NOT NULL, \"errorCode\" varchar, \"errorDetails\" text, \"runAt\" datetime(3), \"completedAt\" datetime(3), \"metrics\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"runningInstanceId\" varchar(255), \"cancelRequested\" boolean NOT NULL DEFAULT (FALSE), \"workflowVersionId\" varchar(36), \"evaluationConfigId\" varchar(36), \"evaluationConfigSnapshot\" text, \"collectionId\" varchar(36), CONSTRAINT \"FK_test_run_evaluation_config_id\" FOREIGN KEY (\"evaluationConfigId\") REFERENCES \"evaluation_config\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT \"FK_d6870d3b6e4c185d33926f423c8\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_test_run_collection_id\" FOREIGN KEY (\"collectionId\") REFERENCES \"evaluation_collection\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "agent_checkpoints", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_5e31c210f896d539964bf99fe3", - "def": "CREATE INDEX \"IDX_5e31c210f896d539964bf99fe3\" ON \"agent_checkpoints\" (\"agentId\") ", - "table": "agent_checkpoints", - "columns": [ - "agentId" - ] - }, - { - "name": "sqlite_autoindex_agent_checkpoints_1", - "def": "PRIMARY KEY (runId)", - "table": "agent_checkpoints", - "columns": [ - "runId" - ] - } - ], - "constraints": [ - { - "name": "runId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (runId)", - "table": "agent_checkpoints", - "columns": [ - "runId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_checkpoints", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_checkpoints_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (runId)", - "table": "agent_checkpoints", - "columns": [ - "runId" - ] - } - ], - "def": "CREATE TABLE \"agent_checkpoints\" (\"runId\" varchar(255) PRIMARY KEY NOT NULL, \"agentId\" varchar(255), \"state\" text, \"expired\" boolean NOT NULL DEFAULT (false), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_5e31c210f896d539964bf99fe32\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "agents_resources", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "metadata", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_agents_resources_1", - "def": "PRIMARY KEY (id)", - "table": "agents_resources", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_resources", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_resources_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_resources", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agents_resources\" (\"id\" varchar(255) PRIMARY KEY NOT NULL, \"metadata\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "agents_threads", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_54fa1b94f34a409beafae567a4", - "def": "CREATE INDEX \"IDX_54fa1b94f34a409beafae567a4\" ON \"agents_threads\" (\"resourceId\") ", - "table": "agents_threads", - "columns": [ - "resourceId" - ] - }, - { - "name": "sqlite_autoindex_agents_threads_1", - "def": "PRIMARY KEY (id)", - "table": "agents_threads", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_threads", - "columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_threads_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_threads", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agents_threads\" (\"id\" varchar(128) PRIMARY KEY NOT NULL, \"resourceId\" varchar(255) NOT NULL, \"title\" varchar(255), \"metadata\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')))" - }, - { - "name": "agents_messages", - "type": "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": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_agents_messages_threadId_createdAt", - "def": "CREATE INDEX \"IDX_agents_messages_threadId_createdAt\" ON \"agents_messages\" (\"threadId\", \"createdAt\") ", - "table": "agents_messages", - "columns": [ - "threadId", - "createdAt" - ] - }, - { - "name": "IDX_fc7bf858660bfafd19181e8e35", - "def": "CREATE INDEX \"IDX_fc7bf858660bfafd19181e8e35\" ON \"agents_messages\" (\"threadId\", \"createdAt\") ", - "table": "agents_messages", - "columns": [ - "threadId", - "createdAt" - ] - }, - { - "name": "sqlite_autoindex_agents_messages_1", - "def": "PRIMARY KEY (id)", - "table": "agents_messages", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_messages", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_messages", - "referenced_table": "agents_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_messages_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_messages", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agents_messages\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"threadId\" varchar(255) NOT NULL, \"resourceId\" varchar(255) NOT NULL, \"role\" varchar(36) NOT NULL, \"type\" varchar(36), \"content\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_0a8057a61afabd2999608ffd0d9\" FOREIGN KEY (\"threadId\") REFERENCES \"agents_threads\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "agent_execution", - "type": "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": "datetime(3)", - "nullable": true - }, - { - "name": "stoppedAt", - "type": "datetime(3)", - "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": "REAL", - "nullable": true - }, - { - "name": "toolCalls", - "type": "TEXT", - "nullable": true - }, - { - "name": "timeline", - "type": "TEXT", - "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_63d3c3a68b9cebf05f967f0b1c", - "def": "CREATE INDEX \"IDX_63d3c3a68b9cebf05f967f0b1c\" ON \"agent_execution\" (\"threadId\", \"createdAt\") ", - "table": "agent_execution", - "columns": [ - "threadId", - "createdAt" - ] - }, - { - "name": "sqlite_autoindex_agent_execution_1", - "def": "PRIMARY KEY (id)", - "table": "agent_execution", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_execution", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_execution", - "referenced_table": "agent_execution_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_execution_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_execution", - "columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK ((\"status\" IN ('success', 'error')))", - "table": "agent_execution", - "columns": [ - "status", - "error" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK ((\"hitlStatus\" IN ('suspended', 'resumed')))", - "table": "agent_execution", - "columns": [ - "hitlStatus" - ] - } - ], - "def": "CREATE TABLE \"agent_execution\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"threadId\" varchar(128) NOT NULL, \"status\" varchar(16) NOT NULL, \"startedAt\" datetime(3), \"stoppedAt\" datetime(3), \"duration\" integer NOT NULL DEFAULT (0), \"userMessage\" text NOT NULL, \"assistantResponse\" text NOT NULL, \"model\" varchar(255), \"promptTokens\" integer, \"completionTokens\" integer, \"totalTokens\" integer, \"cost\" real, \"toolCalls\" text, \"timeline\" text, \"error\" text, \"hitlStatus\" varchar(16), \"source\" varchar(32), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_agent_execution_status\" CHECK ((\"status\" IN ('success', 'error'))), CONSTRAINT \"CHK_agent_execution_hitlStatus\" CHECK ((\"hitlStatus\" IN ('suspended', 'resumed'))), CONSTRAINT \"FK_add2432fb6034cc18b6af299dce\" FOREIGN KEY (\"threadId\") REFERENCES \"agent_execution_threads\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "workflow_history", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "nodes", - "type": "TEXT", - "nullable": false - }, - { - "name": "connections", - "type": "TEXT", - "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": "TEXT", - "nullable": false, - "default": "'[]'" - } - ], - "indexes": [ - { - "name": "IDX_1e31657f5fe46816c34be7c1b4", - "def": "CREATE INDEX \"IDX_1e31657f5fe46816c34be7c1b4\" ON \"workflow_history\" (\"workflowId\") ", - "table": "workflow_history", - "columns": [ - "workflowId" - ] - }, - { - "name": "sqlite_autoindex_workflow_history_1", - "def": "PRIMARY KEY (versionId)", - "table": "workflow_history", - "columns": [ - "versionId" - ] - } - ], - "constraints": [ - { - "name": "versionId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (versionId)", - "table": "workflow_history", - "columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_history", - "referenced_table": "workflow_entity", - "columns": [ - "workflowId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_workflow_history_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (versionId)", - "table": "workflow_history", - "columns": [ - "versionId" - ] - } - ], - "def": "CREATE TABLE \"workflow_history\" (\"versionId\" varchar(36) PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"authors\" varchar(255) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"nodes\" text NOT NULL, \"connections\" text NOT NULL, \"name\" varchar(128), \"autosaved\" boolean NOT NULL DEFAULT (false), \"description\" text, \"nodeGroups\" text NOT NULL DEFAULT ('[]'), CONSTRAINT \"FK_1e31657f5fe46816c34be7c1b4b\" FOREIGN KEY (\"workflowId\") REFERENCES \"workflow_entity\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "instance_ai_run_snapshots", - "type": "table", - "columns": [ - { - "name": "threadId", - "type": "varchar", - "nullable": false - }, - { - "name": "runId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "messageGroupId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "runIds", - "type": "TEXT", - "nullable": true - }, - { - "name": "tree", - "type": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "langsmithRunId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "langsmithTraceId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "traceId", - "type": "varchar(64)", - "nullable": true - }, - { - "name": "spanId", - "type": "varchar(64)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_d3a2bc880e7a8626802e5474ad", - "def": "CREATE INDEX \"IDX_d3a2bc880e7a8626802e5474ad\" ON \"instance_ai_run_snapshots\" (\"threadId\", \"createdAt\") ", - "table": "instance_ai_run_snapshots", - "columns": [ - "threadId", - "createdAt" - ] - }, - { - "name": "IDX_d926c16c2ad9728cb9a81790c0", - "def": "CREATE INDEX \"IDX_d926c16c2ad9728cb9a81790c0\" ON \"instance_ai_run_snapshots\" (\"threadId\", \"messageGroupId\") ", - "table": "instance_ai_run_snapshots", - "columns": [ - "threadId", - "messageGroupId" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_run_snapshots_1", - "def": "PRIMARY KEY (threadId, runId)", - "table": "instance_ai_run_snapshots", - "columns": [ - "threadId", - "runId" - ] - } - ], - "constraints": [ - { - "name": "threadId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (threadId)", - "table": "instance_ai_run_snapshots", - "columns": [ - "threadId" - ] - }, - { - "name": "runId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (runId)", - "table": "instance_ai_run_snapshots", - "columns": [ - "runId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_run_snapshots", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_run_snapshots_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (threadId, runId)", - "table": "instance_ai_run_snapshots", - "columns": [ - "threadId", - "runId" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_run_snapshots\" (\"threadId\" varchar NOT NULL, \"runId\" varchar(36) NOT NULL, \"messageGroupId\" varchar(36), \"runIds\" text, \"tree\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"langsmithRunId\" varchar(36), \"langsmithTraceId\" varchar(36), \"traceId\" varchar(64), \"spanId\" varchar(64), CONSTRAINT \"FK_2f63fa21d09d7918f347ddbdf70\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, PRIMARY KEY (\"threadId\", \"runId\"))" - }, - { - "name": "agents_observations", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "observationScopeId", - "type": "varchar(255)", - "nullable": false - }, - { - "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_127ee1078ffa952bb37b511efa", - "def": "CREATE INDEX \"IDX_127ee1078ffa952bb37b511efa\" ON \"agents_observations\" (\"supersededBy\") ", - "table": "agents_observations", - "columns": [ - "supersededBy" - ] - }, - { - "name": "IDX_501e2d1701a10e24fb69ab5fc5", - "def": "CREATE INDEX \"IDX_501e2d1701a10e24fb69ab5fc5\" ON \"agents_observations\" (\"parentId\") ", - "table": "agents_observations", - "columns": [ - "parentId" - ] - }, - { - "name": "IDX_4cfd8a70ebb0a5b0cf047dca3c", - "def": "CREATE INDEX \"IDX_4cfd8a70ebb0a5b0cf047dca3c\" ON \"agents_observations\" (\"observationScopeId\") ", - "table": "agents_observations", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "IDX_07cb1e4a302629c5fa5d74d2bb", - "def": "CREATE INDEX \"IDX_07cb1e4a302629c5fa5d74d2bb\" ON \"agents_observations\" (\"agentId\", \"observationScopeId\", \"status\") ", - "table": "agents_observations", - "columns": [ - "agentId", - "observationScopeId", - "status" - ] - }, - { - "name": "sqlite_autoindex_agents_observations_1", - "def": "PRIMARY KEY (id)", - "table": "agents_observations", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_observations", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (supersededBy) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "agents_observations", - "referenced_table": "agents_observations", - "columns": [ - "supersededBy" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (parentId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "agents_observations", - "referenced_table": "agents_observations", - "columns": [ - "parentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_observations", - "referenced_table": "agents_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_observations", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_observations_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_observations", - "columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"marker\" IN ('critical', 'important', 'info', 'completion'))", - "table": "agents_observations", - "columns": [ - "marker" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"status\" IN ('active', 'superseded', 'dropped'))", - "table": "agents_observations", - "columns": [ - "status" - ] - } - ], - "def": "CREATE TABLE \"agents_observations\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"observationScopeId\" varchar(255) NOT NULL, \"marker\" varchar(16) NOT NULL, \"text\" text NOT NULL, \"parentId\" varchar(36), \"tokenCount\" integer NOT NULL DEFAULT (0), \"status\" varchar(16) NOT NULL, \"supersededBy\" varchar(36), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_agents_observations_marker\" CHECK (\"marker\" IN ('critical', 'important', 'info', 'completion')), CONSTRAINT \"CHK_agents_observations_status\" CHECK (\"status\" IN ('active', 'superseded', 'dropped')), CONSTRAINT \"FK_d206432be97b7ed88d187479b1b\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_4cfd8a70ebb0a5b0cf047dca3cf\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"agents_threads\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_501e2d1701a10e24fb69ab5fc5f\" FOREIGN KEY (\"parentId\") REFERENCES \"agents_observations\" (\"id\"), CONSTRAINT \"FK_127ee1078ffa952bb37b511efad\" FOREIGN KEY (\"supersededBy\") REFERENCES \"agents_observations\" (\"id\"))" - }, - { - "name": "agents_observation_cursors", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "observationScopeId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "lastObservedMessageId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "lastObservedAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_87aa187d27ea67eafd16490515", - "def": "CREATE INDEX \"IDX_87aa187d27ea67eafd16490515\" ON \"agents_observation_cursors\" (\"observationScopeId\") ", - "table": "agents_observation_cursors", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "sqlite_autoindex_agents_observation_cursors_1", - "def": "PRIMARY KEY (agentId, observationScopeId)", - "table": "agents_observation_cursors", - "columns": [ - "agentId", - "observationScopeId" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "agents_observation_cursors", - "columns": [ - "agentId" - ] - }, - { - "name": "observationScopeId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId)", - "table": "agents_observation_cursors", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_observation_cursors", - "referenced_table": "agents_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_observation_cursors", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_observation_cursors_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, observationScopeId)", - "table": "agents_observation_cursors", - "columns": [ - "agentId", - "observationScopeId" - ] - } - ], - "def": "CREATE TABLE \"agents_observation_cursors\" (\"agentId\" varchar(36) NOT NULL, \"observationScopeId\" varchar(255) NOT NULL, \"lastObservedMessageId\" varchar(36) NOT NULL, \"lastObservedAt\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_64e92819f4b413661ed6e2c3c3d\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_87aa187d27ea67eafd164905154\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"agents_threads\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"observationScopeId\"))" - }, - { - "name": "agents_observation_locks", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "observationScopeId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "taskKind", - "type": "varchar(20)", - "nullable": false - }, - { - "name": "holderId", - "type": "varchar(64)", - "nullable": false - }, - { - "name": "heldUntil", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_6b55089892e447c2f82e5ec60e", - "def": "CREATE INDEX \"IDX_6b55089892e447c2f82e5ec60e\" ON \"agents_observation_locks\" (\"observationScopeId\") ", - "table": "agents_observation_locks", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "sqlite_autoindex_agents_observation_locks_1", - "def": "PRIMARY KEY (agentId, observationScopeId, taskKind)", - "table": "agents_observation_locks", - "columns": [ - "agentId", - "observationScopeId", - "taskKind" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "agents_observation_locks", - "columns": [ - "agentId" - ] - }, - { - "name": "observationScopeId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId)", - "table": "agents_observation_locks", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "taskKind", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (taskKind)", - "table": "agents_observation_locks", - "columns": [ - "taskKind" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_observation_locks", - "referenced_table": "agents_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_observation_locks", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_observation_locks_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, observationScopeId, taskKind)", - "table": "agents_observation_locks", - "columns": [ - "agentId", - "observationScopeId", - "taskKind" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"taskKind\" IN ('observer', 'reflector'))", - "table": "agents_observation_locks", - "columns": [ - "taskKind" - ] - } - ], - "def": "CREATE TABLE \"agents_observation_locks\" (\"agentId\" varchar(36) NOT NULL, \"observationScopeId\" varchar(255) NOT NULL, \"taskKind\" varchar(20) NOT NULL, \"holderId\" varchar(64) NOT NULL, \"heldUntil\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_agents_observation_locks_taskKind\" CHECK (\"taskKind\" IN ('observer', 'reflector')), CONSTRAINT \"FK_093e44ae20f2518e97d83a95433\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_6b55089892e447c2f82e5ec60ed\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"agents_threads\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"observationScopeId\", \"taskKind\"))" - }, - { - "name": "agents_memory_entries", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "resourceId", - "type": "varchar(255)", - "nullable": false - }, - { - "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 - }, - { - "name": "embeddingModel", - "type": "varchar(128)", - "nullable": true - }, - { - "name": "embedding", - "type": "TEXT", - "nullable": true - }, - { - "name": "metadata", - "type": "TEXT", - "nullable": true - }, - { - "name": "lastSeenAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_0edf1226b77ddc525eae493807", - "def": "CREATE INDEX \"IDX_0edf1226b77ddc525eae493807\" ON \"agents_memory_entries\" (\"supersededBy\") ", - "table": "agents_memory_entries", - "columns": [ - "supersededBy" - ] - }, - { - "name": "IDX_1443a75e59adbfb796071d6639", - "def": "CREATE INDEX \"IDX_1443a75e59adbfb796071d6639\" ON \"agents_memory_entries\" (\"resourceId\") ", - "table": "agents_memory_entries", - "columns": [ - "resourceId" - ] - }, - { - "name": "IDX_a03e04e94bea8439dd166d4b52", - "def": "CREATE UNIQUE INDEX \"IDX_a03e04e94bea8439dd166d4b52\" ON \"agents_memory_entries\" (\"agentId\", \"resourceId\", \"contentHash\") ", - "table": "agents_memory_entries", - "columns": [ - "agentId", - "resourceId", - "contentHash" - ] - }, - { - "name": "IDX_aff2807b31eccbafe59d0474f0", - "def": "CREATE INDEX \"IDX_aff2807b31eccbafe59d0474f0\" ON \"agents_memory_entries\" (\"agentId\", \"resourceId\", \"status\", \"createdAt\", \"id\") ", - "table": "agents_memory_entries", - "columns": [ - "agentId", - "resourceId", - "status", - "createdAt", - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entries_1", - "def": "PRIMARY KEY (id)", - "table": "agents_memory_entries", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_memory_entries", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "agents_memory_entries", - "referenced_table": "agents_memory_entries", - "columns": [ - "supersededBy" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entries", - "referenced_table": "agents_resources", - "columns": [ - "resourceId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entries", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entries_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_memory_entries", - "columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"status\" IN ('active', 'superseded', 'dropped'))", - "table": "agents_memory_entries", - "columns": [ - "status" - ] - } - ], - "def": "CREATE TABLE \"agents_memory_entries\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"resourceId\" varchar(255) NOT NULL, \"content\" text NOT NULL, \"contentHash\" varchar(64) NOT NULL, \"status\" varchar(16) NOT NULL, \"supersededBy\" varchar(36), \"embeddingModel\" varchar(128), \"embedding\" text, \"metadata\" text, \"lastSeenAt\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_agents_memory_entries_status\" CHECK (\"status\" IN ('active', 'superseded', 'dropped')), CONSTRAINT \"FK_28e981fb675e9b44ce02f0ec1dd\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_1443a75e59adbfb796071d66393\" FOREIGN KEY (\"resourceId\") REFERENCES \"agents_resources\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_0edf1226b77ddc525eae4938079\" FOREIGN KEY (\"supersededBy\") REFERENCES \"agents_memory_entries\" (\"id\"))" - }, - { - "name": "agents_memory_entry_locks", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "resourceId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "holderId", - "type": "varchar(64)", - "nullable": false - }, - { - "name": "heldUntil", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_9594c0983cfee1c8ff49b05848", - "def": "CREATE INDEX \"IDX_9594c0983cfee1c8ff49b05848\" ON \"agents_memory_entry_locks\" (\"resourceId\") ", - "table": "agents_memory_entry_locks", - "columns": [ - "resourceId" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entry_locks_1", - "def": "PRIMARY KEY (agentId, resourceId)", - "table": "agents_memory_entry_locks", - "columns": [ - "agentId", - "resourceId" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "agents_memory_entry_locks", - "columns": [ - "agentId" - ] - }, - { - "name": "resourceId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (resourceId)", - "table": "agents_memory_entry_locks", - "columns": [ - "resourceId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_locks", - "referenced_table": "agents_resources", - "columns": [ - "resourceId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_locks", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entry_locks_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, resourceId)", - "table": "agents_memory_entry_locks", - "columns": [ - "agentId", - "resourceId" - ] - } - ], - "def": "CREATE TABLE \"agents_memory_entry_locks\" (\"agentId\" varchar(36) NOT NULL, \"resourceId\" varchar(255) NOT NULL, \"holderId\" varchar(64) NOT NULL, \"heldUntil\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_0ccf6d9ea6f44fa1c264fc2f795\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_9594c0983cfee1c8ff49b05848b\" FOREIGN KEY (\"resourceId\") REFERENCES \"agents_resources\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"resourceId\"))" - }, - { - "name": "agents_memory_entry_sources", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "memoryEntryId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "observationId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "threadId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "evidenceHash", - "type": "varchar(64)", - "nullable": false - }, - { - "name": "evidenceText", - "type": "TEXT", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_451d387a182fa8dd8002dfc3a7", - "def": "CREATE INDEX \"IDX_451d387a182fa8dd8002dfc3a7\" ON \"agents_memory_entry_sources\" (\"threadId\") ", - "table": "agents_memory_entry_sources", - "columns": [ - "threadId" - ] - }, - { - "name": "IDX_f9573af4ed653f13b0ba1f7b12", - "def": "CREATE INDEX \"IDX_f9573af4ed653f13b0ba1f7b12\" ON \"agents_memory_entry_sources\" (\"agentId\", \"threadId\") ", - "table": "agents_memory_entry_sources", - "columns": [ - "agentId", - "threadId" - ] - }, - { - "name": "IDX_cb7c15d22fd068a0806aa57fc0", - "def": "CREATE INDEX \"IDX_cb7c15d22fd068a0806aa57fc0\" ON \"agents_memory_entry_sources\" (\"observationId\") ", - "table": "agents_memory_entry_sources", - "columns": [ - "observationId" - ] - }, - { - "name": "IDX_a353ac251315ef0af6ad3c9f0a", - "def": "CREATE UNIQUE INDEX \"IDX_a353ac251315ef0af6ad3c9f0a\" ON \"agents_memory_entry_sources\" (\"memoryEntryId\", \"observationId\", \"evidenceHash\") ", - "table": "agents_memory_entry_sources", - "columns": [ - "memoryEntryId", - "observationId", - "evidenceHash" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entry_sources_1", - "def": "PRIMARY KEY (id)", - "table": "agents_memory_entry_sources", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_memory_entry_sources", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_sources", - "referenced_table": "agents_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_sources", - "referenced_table": "agents_observations", - "columns": [ - "observationId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (memoryEntryId) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_sources", - "referenced_table": "agents_memory_entries", - "columns": [ - "memoryEntryId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 3)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_sources", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entry_sources_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents_memory_entry_sources", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agents_memory_entry_sources\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"memoryEntryId\" varchar(36) NOT NULL, \"observationId\" varchar(36) NOT NULL, \"threadId\" varchar(255) NOT NULL, \"evidenceHash\" varchar(64) NOT NULL, \"evidenceText\" text NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_c38e8a57a36b880e39a52ada2e8\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_4706f6223313959b7437a2b48df\" FOREIGN KEY (\"memoryEntryId\") REFERENCES \"agents_memory_entries\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_cb7c15d22fd068a0806aa57fc03\" FOREIGN KEY (\"observationId\") REFERENCES \"agents_observations\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_451d387a182fa8dd8002dfc3a77\" FOREIGN KEY (\"threadId\") REFERENCES \"agents_threads\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "agents_memory_entry_cursors", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "observationScopeId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "lastIndexedObservationId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "lastIndexedObservationCreatedAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_069e791e428391a5569e7a96b2", - "def": "CREATE INDEX \"IDX_069e791e428391a5569e7a96b2\" ON \"agents_memory_entry_cursors\" (\"observationScopeId\") ", - "table": "agents_memory_entry_cursors", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entry_cursors_1", - "def": "PRIMARY KEY (agentId, observationScopeId)", - "table": "agents_memory_entry_cursors", - "columns": [ - "agentId", - "observationScopeId" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "agents_memory_entry_cursors", - "columns": [ - "agentId" - ] - }, - { - "name": "observationScopeId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId)", - "table": "agents_memory_entry_cursors", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_cursors", - "referenced_table": "agents_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents_memory_entry_cursors", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_memory_entry_cursors_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, observationScopeId)", - "table": "agents_memory_entry_cursors", - "columns": [ - "agentId", - "observationScopeId" - ] - } - ], - "def": "CREATE TABLE \"agents_memory_entry_cursors\" (\"agentId\" varchar(36) NOT NULL, \"observationScopeId\" varchar(255) NOT NULL, \"lastIndexedObservationId\" varchar(36) NOT NULL, \"lastIndexedObservationCreatedAt\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_746780fd115e5e4352457a3c617\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_069e791e428391a5569e7a96b20\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"agents_threads\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"observationScopeId\"))" - }, - { - "name": "agent_history", - "type": "table", - "columns": [ - { - "name": "versionId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "schema", - "type": "TEXT", - "nullable": true - }, - { - "name": "tools", - "type": "TEXT", - "nullable": true - }, - { - "name": "skills", - "type": "TEXT", - "nullable": true - }, - { - "name": "publishedById", - "type": "varchar", - "nullable": true - }, - { - "name": "author", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_87cd5a8da20304b089ea2f83fe", - "def": "CREATE INDEX \"IDX_87cd5a8da20304b089ea2f83fe\" ON \"agent_history\" (\"agentId\") ", - "table": "agent_history", - "columns": [ - "agentId" - ] - }, - { - "name": "sqlite_autoindex_agent_history_1", - "def": "PRIMARY KEY (versionId)", - "table": "agent_history", - "columns": [ - "versionId" - ] - } - ], - "constraints": [ - { - "name": "versionId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (versionId)", - "table": "agent_history", - "columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "agent_history", - "referenced_table": "user", - "columns": [ - "publishedById" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_history", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_history_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (versionId)", - "table": "agent_history", - "columns": [ - "versionId" - ] - } - ], - "def": "CREATE TABLE \"agent_history\" (\"versionId\" varchar(36) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"schema\" text, \"tools\" text, \"skills\" text, \"publishedById\" varchar, \"author\" varchar(255) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_87cd5a8da20304b089ea2f83fec\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_8771675f44c58fb40e0feb9ee35\" FOREIGN KEY (\"publishedById\") REFERENCES \"user\" (\"id\") ON DELETE SET NULL)" - }, - { - "name": "agents", - "type": "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": "TEXT", - "nullable": false, - "default": "'[]'" - }, - { - "name": "schema", - "type": "TEXT", - "nullable": true - }, - { - "name": "tools", - "type": "TEXT", - "nullable": false, - "default": "'{}'" - }, - { - "name": "skills", - "type": "TEXT", - "nullable": false, - "default": "'{}'" - }, - { - "name": "versionId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "activeVersionId", - "type": "varchar(36)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_agents_projectId", - "def": "CREATE INDEX \"IDX_agents_projectId\" ON \"agents\" (\"projectId\") ", - "table": "agents", - "columns": [ - "projectId" - ] - }, - { - "name": "IDX_a30d560207c4071d98aa03c179", - "def": "CREATE INDEX \"IDX_a30d560207c4071d98aa03c179\" ON \"agents\" (\"projectId\") ", - "table": "agents", - "columns": [ - "projectId" - ] - }, - { - "name": "sqlite_autoindex_agents_1", - "def": "PRIMARY KEY (id)", - "table": "agents", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "agents", - "referenced_table": "agent_history", - "columns": [ - "activeVersionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agents", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agents_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agents", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agents\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"description\" varchar(512), \"projectId\" varchar(255) NOT NULL, \"integrations\" text NOT NULL DEFAULT ('[]'), \"schema\" text, \"tools\" text NOT NULL DEFAULT ('{}'), \"skills\" text NOT NULL DEFAULT ('{}'), \"versionId\" varchar(36), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"activeVersionId\" varchar(36), CONSTRAINT \"FK_a30d560207c4071d98aa03c179c\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_940597dfe9753375309ce6aeea0\" FOREIGN KEY (\"activeVersionId\") REFERENCES \"agent_history\" (\"versionId\") ON DELETE SET NULL)" - }, - { - "name": "instance_ai_observations", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "observationScopeId", - "type": "varchar", - "nullable": false - }, - { - "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_a80e0ee839a2f10ba4b86e1999", - "def": "CREATE INDEX \"IDX_a80e0ee839a2f10ba4b86e1999\" ON \"instance_ai_observations\" (\"supersededBy\") ", - "table": "instance_ai_observations", - "columns": [ - "supersededBy" - ] - }, - { - "name": "IDX_daef2195a4a846eb70eed15e03", - "def": "CREATE INDEX \"IDX_daef2195a4a846eb70eed15e03\" ON \"instance_ai_observations\" (\"parentId\") ", - "table": "instance_ai_observations", - "columns": [ - "parentId" - ] - }, - { - "name": "IDX_0d5db648188d338df7fb2a8064", - "def": "CREATE INDEX \"IDX_0d5db648188d338df7fb2a8064\" ON \"instance_ai_observations\" (\"observationScopeId\", \"status\", \"createdAt\", \"id\") ", - "table": "instance_ai_observations", - "columns": [ - "observationScopeId", - "status", - "createdAt", - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_observations_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_observations", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_observations", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (supersededBy) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "instance_ai_observations", - "referenced_table": "instance_ai_observations", - "columns": [ - "supersededBy" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (parentId) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE", - "table": "instance_ai_observations", - "referenced_table": "instance_ai_observations", - "columns": [ - "parentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_observations", - "referenced_table": "instance_ai_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_observations_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_observations", - "columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"marker\" IN ('critical', 'important', 'info', 'completion'))", - "table": "instance_ai_observations", - "columns": [ - "marker" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"status\" IN ('active', 'superseded', 'dropped'))", - "table": "instance_ai_observations", - "columns": [ - "status" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_observations\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"observationScopeId\" varchar NOT NULL, \"marker\" varchar(16) NOT NULL, \"text\" text NOT NULL, \"parentId\" varchar(36), \"tokenCount\" integer NOT NULL DEFAULT (0), \"status\" varchar(16) NOT NULL, \"supersededBy\" varchar(36), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_instance_ai_observations_marker\" CHECK (\"marker\" IN ('critical', 'important', 'info', 'completion')), CONSTRAINT \"CHK_instance_ai_observations_status\" CHECK (\"status\" IN ('active', 'superseded', 'dropped')), CONSTRAINT \"FK_d54fc84a6c8ac91b5e0db0378a4\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_daef2195a4a846eb70eed15e039\" FOREIGN KEY (\"parentId\") REFERENCES \"instance_ai_observations\" (\"id\"), CONSTRAINT \"FK_a80e0ee839a2f10ba4b86e19998\" FOREIGN KEY (\"supersededBy\") REFERENCES \"instance_ai_observations\" (\"id\"))" - }, - { - "name": "instance_ai_observation_cursors", - "type": "table", - "columns": [ - { - "name": "observationScopeId", - "type": "varchar", - "nullable": false - }, - { - "name": "lastObservedMessageId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "lastObservedAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_instance_ai_observation_cursors_1", - "def": "PRIMARY KEY (observationScopeId)", - "table": "instance_ai_observation_cursors", - "columns": [ - "observationScopeId" - ] - } - ], - "constraints": [ - { - "name": "observationScopeId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId)", - "table": "instance_ai_observation_cursors", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_observation_cursors", - "referenced_table": "instance_ai_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_observation_cursors_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId)", - "table": "instance_ai_observation_cursors", - "columns": [ - "observationScopeId" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_observation_cursors\" (\"observationScopeId\" varchar PRIMARY KEY NOT NULL, \"lastObservedMessageId\" varchar(36) NOT NULL, \"lastObservedAt\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_5b6319b2e9a37c1064a72428f9a\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "instance_ai_observation_locks", - "type": "table", - "columns": [ - { - "name": "observationScopeId", - "type": "varchar", - "nullable": false - }, - { - "name": "taskKind", - "type": "varchar(20)", - "nullable": false - }, - { - "name": "holderId", - "type": "varchar(64)", - "nullable": false - }, - { - "name": "heldUntil", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_instance_ai_observation_locks_1", - "def": "PRIMARY KEY (observationScopeId, taskKind)", - "table": "instance_ai_observation_locks", - "columns": [ - "observationScopeId", - "taskKind" - ] - } - ], - "constraints": [ - { - "name": "observationScopeId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId)", - "table": "instance_ai_observation_locks", - "columns": [ - "observationScopeId" - ] - }, - { - "name": "taskKind", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (taskKind)", - "table": "instance_ai_observation_locks", - "columns": [ - "taskKind" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_observation_locks", - "referenced_table": "instance_ai_threads", - "columns": [ - "observationScopeId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_observation_locks_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (observationScopeId, taskKind)", - "table": "instance_ai_observation_locks", - "columns": [ - "observationScopeId", - "taskKind" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"taskKind\" IN ('observer', 'reflector'))", - "table": "instance_ai_observation_locks", - "columns": [ - "taskKind" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_observation_locks\" (\"observationScopeId\" varchar NOT NULL, \"taskKind\" varchar(20) NOT NULL, \"holderId\" varchar(64) NOT NULL, \"heldUntil\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_instance_ai_observation_locks_taskKind\" CHECK (\"taskKind\" IN ('observer', 'reflector')), CONSTRAINT \"FK_103e2e5f454860b28ea05a82c74\" FOREIGN KEY (\"observationScopeId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"observationScopeId\", \"taskKind\"))" - }, - { - "name": "instance_ai_checkpoints", - "type": "table", - "columns": [ - { - "name": "key", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "runId", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "threadId", - "type": "varchar", - "nullable": false - }, - { - "name": "resourceId", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "state", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "expiredAt", - "type": "datetime(3)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_be9d0eca0b19fb93d4eb74b327", - "def": "CREATE INDEX \"IDX_be9d0eca0b19fb93d4eb74b327\" ON \"instance_ai_checkpoints\" (\"resourceId\") ", - "table": "instance_ai_checkpoints", - "columns": [ - "resourceId" - ] - }, - { - "name": "IDX_2b23f3f24a70bebb990203b011", - "def": "CREATE INDEX \"IDX_2b23f3f24a70bebb990203b011\" ON \"instance_ai_checkpoints\" (\"threadId\") ", - "table": "instance_ai_checkpoints", - "columns": [ - "threadId" - ] - }, - { - "name": "IDX_768189b506cc26c4fe878b87cb", - "def": "CREATE INDEX \"IDX_768189b506cc26c4fe878b87cb\" ON \"instance_ai_checkpoints\" (\"runId\") ", - "table": "instance_ai_checkpoints", - "columns": [ - "runId" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_checkpoints_1", - "def": "PRIMARY KEY (key)", - "table": "instance_ai_checkpoints", - "columns": [ - "key" - ] - } - ], - "constraints": [ - { - "name": "key", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (key)", - "table": "instance_ai_checkpoints", - "columns": [ - "key" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_checkpoints", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_checkpoints_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (key)", - "table": "instance_ai_checkpoints", - "columns": [ - "key" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK ((\"expiredAt\" IS NOT NULL AND \"state\" IS NULL) OR \"expiredAt\" IS NULL)", - "table": "instance_ai_checkpoints", - "columns": [ - "state", - "expiredAt" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_checkpoints\" (\"key\" varchar(255) PRIMARY KEY NOT NULL, \"runId\" varchar(255), \"threadId\" varchar NOT NULL, \"resourceId\" varchar(255), \"state\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"expiredAt\" datetime(3), CONSTRAINT \"instance_ai_checkpoints_state_tombstone_check\" CHECK ((\"expiredAt\" IS NOT NULL AND \"state\" IS NULL) OR \"expiredAt\" IS NULL), CONSTRAINT \"FK_2b23f3f24a70bebb990203b011e\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "instance_ai_pending_confirmations", - "type": "table", - "columns": [ - { - "name": "requestId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "threadId", - "type": "varchar", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "kind", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "runId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "toolCallId", - "type": "varchar(64)", - "nullable": true - }, - { - "name": "messageGroupId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "checkpointKey", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "checkpointTaskId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "expiresAt", - "type": "datetime(3)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_d7a4aba7440449865e2b924377", - "def": "CREATE INDEX \"IDX_d7a4aba7440449865e2b924377\" ON \"instance_ai_pending_confirmations\" (\"expiresAt\") ", - "table": "instance_ai_pending_confirmations", - "columns": [ - "expiresAt" - ] - }, - { - "name": "IDX_0babdf6e3b897a86fe4678355e", - "def": "CREATE INDEX \"IDX_0babdf6e3b897a86fe4678355e\" ON \"instance_ai_pending_confirmations\" (\"checkpointKey\") ", - "table": "instance_ai_pending_confirmations", - "columns": [ - "checkpointKey" - ] - }, - { - "name": "IDX_df5fd25c8bbfd2b042602600d8", - "def": "CREATE INDEX \"IDX_df5fd25c8bbfd2b042602600d8\" ON \"instance_ai_pending_confirmations\" (\"userId\") ", - "table": "instance_ai_pending_confirmations", - "columns": [ - "userId" - ] - }, - { - "name": "IDX_ba67ee8dc311830a2eea89b6e9", - "def": "CREATE INDEX \"IDX_ba67ee8dc311830a2eea89b6e9\" ON \"instance_ai_pending_confirmations\" (\"threadId\") ", - "table": "instance_ai_pending_confirmations", - "columns": [ - "threadId" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_pending_confirmations_1", - "def": "PRIMARY KEY (requestId)", - "table": "instance_ai_pending_confirmations", - "columns": [ - "requestId" - ] - } - ], - "constraints": [ - { - "name": "requestId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (requestId)", - "table": "instance_ai_pending_confirmations", - "columns": [ - "requestId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_pending_confirmations", - "referenced_table": "instance_ai_checkpoints", - "columns": [ - "checkpointKey" - ], - "referenced_columns": [ - "key" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_pending_confirmations", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_pending_confirmations", - "referenced_table": "instance_ai_threads", - "columns": [ - "threadId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_pending_confirmations_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (requestId)", - "table": "instance_ai_pending_confirmations", - "columns": [ - "requestId" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"kind\" IN ('suspended', 'inline'))", - "table": "instance_ai_pending_confirmations", - "columns": [ - "kind" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_pending_confirmations\" (\"requestId\" varchar(36) PRIMARY KEY NOT NULL, \"threadId\" varchar NOT NULL, \"userId\" varchar NOT NULL, \"kind\" varchar(16) NOT NULL, \"runId\" varchar(36) NOT NULL, \"toolCallId\" varchar(64), \"messageGroupId\" varchar(36), \"checkpointKey\" varchar(255), \"checkpointTaskId\" varchar(36), \"expiresAt\" datetime(3), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_instance_ai_pending_confirmations_kind\" CHECK (\"kind\" IN ('suspended', 'inline')), CONSTRAINT \"FK_ba67ee8dc311830a2eea89b6e96\" FOREIGN KEY (\"threadId\") REFERENCES \"instance_ai_threads\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_df5fd25c8bbfd2b042602600d8e\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_0babdf6e3b897a86fe4678355eb\" FOREIGN KEY (\"checkpointKey\") REFERENCES \"instance_ai_checkpoints\" (\"key\") ON DELETE CASCADE)" - }, - { - "name": "workflow_entity", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "active", - "type": "boolean", - "nullable": false - }, - { - "name": "nodes", - "type": "TEXT", - "nullable": true - }, - { - "name": "connections", - "type": "TEXT", - "nullable": true - }, - { - "name": "settings", - "type": "TEXT", - "nullable": true - }, - { - "name": "staticData", - "type": "TEXT", - "nullable": true - }, - { - "name": "pinData", - "type": "TEXT", - "nullable": true - }, - { - "name": "versionId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "triggerCount", - "type": "INTEGER", - "nullable": true, - "default": "0" - }, - { - "name": "meta", - "type": "TEXT", - "nullable": true - }, - { - "name": "parentFolderId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "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": "TEXT", - "nullable": false, - "default": "'[]'" - }, - { - "name": "sourceWorkflowId", - "type": "varchar", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_workflow_entity_sourceWorkflowId", - "def": "CREATE INDEX \"IDX_workflow_entity_sourceWorkflowId\" ON \"workflow_entity\" (\"sourceWorkflowId\") WHERE \"sourceWorkflowId\" IS NOT NULL", - "table": "workflow_entity", - "columns": [ - "sourceWorkflowId" - ] - }, - { - "name": "IDX_e10425f6ab9964c4c1623a4a03", - "def": "CREATE INDEX \"IDX_e10425f6ab9964c4c1623a4a03\" ON \"workflow_entity\" (\"name\") ", - "table": "workflow_entity", - "columns": [ - "name" - ] - }, - { - "name": "sqlite_autoindex_workflow_entity_1", - "def": "PRIMARY KEY (id)", - "table": "workflow_entity", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_entity", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE", - "table": "workflow_entity", - "referenced_table": "workflow_history", - "columns": [ - "activeVersionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "workflow_entity", - "referenced_table": "folder", - "columns": [ - "parentFolderId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_workflow_entity_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_entity", - "columns": [ - "id" - ] - } - ], - "triggers": [ - { - "name": "workflow_version_increment", - "def": "CREATE TRIGGER \"workflow_version_increment\"\n\t\t\tAFTER UPDATE ON \"workflow_entity\"\n\t\t\tFOR EACH ROW\n\t\t\tWHEN OLD.\"versionCounter\" = NEW.\"versionCounter\"\n\t\t\t\tAND (OLD.\"nodes\" IS NOT NEW.\"nodes\" OR OLD.\"settings\" IS NOT NEW.\"settings\")\n\t\t\tBEGIN\n\t\t\t\tUPDATE \"workflow_entity\"\n\t\t\t\tSET \"versionCounter\" = \"versionCounter\" + 1\n\t\t\t\tWHERE \"id\" = NEW.\"id\";\n\t\t\tEND" - } - ], - "def": "CREATE TABLE \"workflow_entity\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(128) NOT NULL, \"active\" boolean NOT NULL, \"nodes\" text, \"connections\" text, \"settings\" text, \"staticData\" text, \"pinData\" text, \"versionId\" varchar(36) NOT NULL, \"triggerCount\" integer DEFAULT (0), \"meta\" text, \"parentFolderId\" varchar(36), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"isArchived\" boolean NOT NULL DEFAULT (FALSE), \"versionCounter\" integer NOT NULL DEFAULT (1), \"description\" text, \"activeVersionId\" varchar(36), \"nodeGroups\" text NOT NULL DEFAULT ('[]'), \"sourceWorkflowId\" varchar, CONSTRAINT \"FK_04a4db5906fbc5606c71448d912\" FOREIGN KEY (\"parentFolderId\") REFERENCES \"folder\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_08d6c67b7f722b0039d9d5ed620\" FOREIGN KEY (\"activeVersionId\") REFERENCES \"workflow_history\" (\"versionId\") ON DELETE RESTRICT ON UPDATE NO ACTION)" - }, - { - "name": "mcp_registry_server", - "type": "table", - "columns": [ - { - "name": "slug", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "status", - "type": "varchar(50)", - "nullable": false - }, - { - "name": "version", - "type": "varchar(50)", - "nullable": false - }, - { - "name": "registryUpdatedAt", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "data", - "type": "TEXT", - "nullable": false, - "default": "'{}'" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_mcp_registry_server_1", - "def": "PRIMARY KEY (slug)", - "table": "mcp_registry_server", - "columns": [ - "slug" - ] - } - ], - "constraints": [ - { - "name": "slug", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (slug)", - "table": "mcp_registry_server", - "columns": [ - "slug" - ] - }, - { - "name": "sqlite_autoindex_mcp_registry_server_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (slug)", - "table": "mcp_registry_server", - "columns": [ - "slug" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"status\" IN ('active', 'deprecated'))", - "table": "mcp_registry_server", - "columns": [ - "status" - ] - } - ], - "def": "CREATE TABLE \"mcp_registry_server\" (\"slug\" varchar(255) PRIMARY KEY NOT NULL, \"status\" varchar(50) NOT NULL, \"version\" varchar(50) NOT NULL, \"registryUpdatedAt\" datetime(3) NOT NULL, \"data\" text NOT NULL DEFAULT ('{}'), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_tmp_mcp_registry_server_status\" CHECK (\"status\" IN ('active', 'deprecated')))" - }, - { - "name": "user_api_keys", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "label", - "type": "varchar(100)", - "nullable": false - }, - { - "name": "apiKey", - "type": "varchar", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "scopes", - "type": "TEXT", - "nullable": true - }, - { - "name": "audience", - "type": "varchar", - "nullable": false, - "default": "'public-api'" - }, - { - "name": "lastUsedAt", - "type": "datetime(3)", - "nullable": true - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_user_api_keys_3", - "def": "UNIQUE (userId, label)", - "table": "user_api_keys", - "columns": [ - "userId", - "label" - ] - }, - { - "name": "sqlite_autoindex_user_api_keys_2", - "def": "UNIQUE (apiKey)", - "table": "user_api_keys", - "columns": [ - "apiKey" - ] - }, - { - "name": "sqlite_autoindex_user_api_keys_1", - "def": "PRIMARY KEY (id)", - "table": "user_api_keys", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "user_api_keys", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "user_api_keys", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_user_api_keys_3", - "type": "UNIQUE", - "def": "UNIQUE (userId, label)", - "table": "user_api_keys", - "columns": [ - "userId", - "label" - ] - }, - { - "name": "sqlite_autoindex_user_api_keys_2", - "type": "UNIQUE", - "def": "UNIQUE (apiKey)", - "table": "user_api_keys", - "columns": [ - "apiKey" - ] - }, - { - "name": "sqlite_autoindex_user_api_keys_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "user_api_keys", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"user_api_keys\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"userId\" varchar NOT NULL, \"label\" varchar(100) NOT NULL, \"apiKey\" varchar NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"scopes\" text, \"audience\" varchar NOT NULL DEFAULT ('public-api'), \"lastUsedAt\" datetime(3), CONSTRAINT \"UQ_1ef35bac35d20bdae979d917a36\" UNIQUE (\"apiKey\"), CONSTRAINT \"UQ_63d7bbae72c767cf162d459fccd\" UNIQUE (\"userId\", \"label\"), CONSTRAINT \"FK_e131705cbbc8fb589889b02d457\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "agent_files", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(16)", - "nullable": false - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "binaryDataId", - "type": "TEXT", - "nullable": false - }, - { - "name": "fileName", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "mimeType", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "fileSizeBytes", - "type": "INTEGER", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_45dafc48fe2ce95eac30fc8ffd", - "def": "CREATE INDEX \"IDX_45dafc48fe2ce95eac30fc8ffd\" ON \"agent_files\" (\"agentId\", \"createdAt\") ", - "table": "agent_files", - "columns": [ - "agentId", - "createdAt" - ] - }, - { - "name": "sqlite_autoindex_agent_files_1", - "def": "PRIMARY KEY (id)", - "table": "agent_files", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_files", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_files", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_files_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_files", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agent_files\" (\"id\" varchar(16) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"binaryDataId\" text NOT NULL, \"fileName\" varchar(255) NOT NULL, \"mimeType\" varchar(255) NOT NULL, \"fileSizeBytes\" integer NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_aca4514cb500494b64356c2e164\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "binary_data", - "type": "table", - "columns": [ - { - "name": "fileId", - "type": "varchar", - "nullable": false - }, - { - "name": "sourceType", - "type": "varchar(50)", - "nullable": false - }, - { - "name": "sourceId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "data", - "type": "BLOB", - "nullable": false - }, - { - "name": "mimeType", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "fileName", - "type": "varchar(255)", - "nullable": true - }, - { - "name": "fileSize", - "type": "INTEGER", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_56900edc3cfd16612e2ef2c6a8", - "def": "CREATE INDEX \"IDX_56900edc3cfd16612e2ef2c6a8\" ON \"binary_data\" (\"sourceType\", \"sourceId\") ", - "table": "binary_data", - "columns": [ - "sourceType", - "sourceId" - ] - }, - { - "name": "sqlite_autoindex_binary_data_1", - "def": "PRIMARY KEY (fileId)", - "table": "binary_data", - "columns": [ - "fileId" - ] - } - ], - "constraints": [ - { - "name": "fileId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (fileId)", - "table": "binary_data", - "columns": [ - "fileId" - ] - }, - { - "name": "sqlite_autoindex_binary_data_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (fileId)", - "table": "binary_data", - "columns": [ - "fileId" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"sourceType\" IN ('execution', 'chat_message_attachment', 'agent_file'))", - "table": "binary_data", - "columns": [ - "sourceType" - ] - } - ], - "def": "CREATE TABLE \"binary_data\" (\"fileId\" varchar PRIMARY KEY NOT NULL, \"sourceType\" varchar(50) NOT NULL, \"sourceId\" varchar(255) NOT NULL, \"data\" blob NOT NULL, \"mimeType\" varchar(255), \"fileName\" varchar(255), \"fileSize\" integer NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_binary_data_sourceType\" CHECK (\"sourceType\" IN ('execution', 'chat_message_attachment', 'agent_file')))" - }, - { - "name": "project", - "type": "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "icon", - "type": "TEXT", - "nullable": true - }, - { - "name": "description", - "type": "varchar(512)", - "nullable": true - }, - { - "name": "creatorId", - "type": "varchar", - "nullable": true - }, - { - "name": "customTelemetryTags", - "type": "TEXT", - "nullable": false, - "default": "'[]'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_project_1", - "def": "PRIMARY KEY (id)", - "table": "project", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "project", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "project", - "referenced_table": "user", - "columns": [ - "creatorId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_project_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "project", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"project\" (\"id\" varchar(36) PRIMARY KEY NOT NULL, \"name\" varchar(255) NOT NULL, \"type\" varchar(36) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"icon\" text, \"description\" varchar(512), \"creatorId\" varchar, \"customTelemetryTags\" text NOT NULL DEFAULT ('[]'), CONSTRAINT \"projects_creatorId_foreign\" FOREIGN KEY (\"creatorId\") REFERENCES \"user\" (\"id\") ON DELETE SET NULL ON UPDATE NO ACTION)" - }, - { - "name": "agent_task_definition", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "name", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "objective", - "type": "TEXT", - "nullable": false - }, - { - "name": "cronExpression", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_f45d0535a2ed59b6c2dd6da98a", - "def": "CREATE INDEX \"IDX_f45d0535a2ed59b6c2dd6da98a\" ON \"agent_task_definition\" (\"agentId\") ", - "table": "agent_task_definition", - "columns": [ - "agentId" - ] - }, - { - "name": "sqlite_autoindex_agent_task_definition_1", - "def": "PRIMARY KEY (id)", - "table": "agent_task_definition", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_task_definition", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_task_definition", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_task_definition_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_task_definition", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agent_task_definition\" (\"id\" varchar(32) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"name\" varchar(128) NOT NULL, \"objective\" text NOT NULL, \"cronExpression\" varchar(128) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_f45d0535a2ed59b6c2dd6da98a0\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "agent_task_snapshot", - "type": "table", - "columns": [ - { - "name": "versionId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "taskId", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "enabled", - "type": "boolean", - "nullable": false - }, - { - "name": "name", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "objective", - "type": "TEXT", - "nullable": false - }, - { - "name": "cronExpression", - "type": "varchar(128)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_agent_task_snapshot_1", - "def": "PRIMARY KEY (versionId, taskId)", - "table": "agent_task_snapshot", - "columns": [ - "versionId", - "taskId" - ] - } - ], - "constraints": [ - { - "name": "versionId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (versionId)", - "table": "agent_task_snapshot", - "columns": [ - "versionId" - ] - }, - { - "name": "taskId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (taskId)", - "table": "agent_task_snapshot", - "columns": [ - "taskId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_task_snapshot", - "referenced_table": "agent_history", - "columns": [ - "versionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "sqlite_autoindex_agent_task_snapshot_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (versionId, taskId)", - "table": "agent_task_snapshot", - "columns": [ - "versionId", - "taskId" - ] - } - ], - "def": "CREATE TABLE \"agent_task_snapshot\" (\"versionId\" varchar(36) NOT NULL, \"taskId\" varchar(32) NOT NULL, \"enabled\" boolean NOT NULL, \"name\" varchar(128) NOT NULL, \"objective\" text NOT NULL, \"cronExpression\" varchar(128) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_1acedce6690392ef1611cca8b88\" FOREIGN KEY (\"versionId\") REFERENCES \"agent_history\" (\"versionId\") ON DELETE CASCADE, PRIMARY KEY (\"versionId\", \"taskId\"))" - }, - { - "name": "agent_task_run_lock", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "taskId", - "type": "varchar(32)", - "nullable": false - }, - { - "name": "holderId", - "type": "varchar", - "nullable": false - }, - { - "name": "heldUntil", - "type": "datetime(3)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_agent_task_run_lock_1", - "def": "PRIMARY KEY (agentId, taskId)", - "table": "agent_task_run_lock", - "columns": [ - "agentId", - "taskId" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "agent_task_run_lock", - "columns": [ - "agentId" - ] - }, - { - "name": "taskId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (taskId)", - "table": "agent_task_run_lock", - "columns": [ - "taskId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_task_run_lock", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_task_run_lock_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, taskId)", - "table": "agent_task_run_lock", - "columns": [ - "agentId", - "taskId" - ] - } - ], - "def": "CREATE TABLE \"agent_task_run_lock\" (\"agentId\" varchar(36) NOT NULL, \"taskId\" varchar(32) NOT NULL, \"holderId\" varchar NOT NULL, \"heldUntil\" datetime(3) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_b57a2862ae869aab24e54cefd48\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"taskId\"))" - }, - { - "name": "agent_execution_threads", - "type": "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": "REAL", - "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": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "taskId", - "type": "varchar(32)", - "nullable": true - }, - { - "name": "taskVersionId", - "type": "varchar(36)", - "nullable": true - }, - { - "name": "parentThreadId", - "type": "varchar(128)", - "nullable": true - }, - { - "name": "parentAgentId", - "type": "varchar(36)", - "nullable": true - } - ], - "indexes": [ - { - "name": "IDX_agent_execution_threads_taskVersionId", - "def": "CREATE INDEX \"IDX_agent_execution_threads_taskVersionId\" ON \"agent_execution_threads\" (\"taskVersionId\") ", - "table": "agent_execution_threads", - "columns": [ - "taskVersionId" - ] - }, - { - "name": "IDX_0468a9dc35597314e641d4722a", - "def": "CREATE INDEX \"IDX_0468a9dc35597314e641d4722a\" ON \"agent_execution_threads\" (\"agentId\") ", - "table": "agent_execution_threads", - "columns": [ - "agentId" - ] - }, - { - "name": "IDX_0e2f8bf92a7a9c88b89670f701", - "def": "CREATE INDEX \"IDX_0e2f8bf92a7a9c88b89670f701\" ON \"agent_execution_threads\" (\"projectId\") ", - "table": "agent_execution_threads", - "columns": [ - "projectId" - ] - }, - { - "name": "sqlite_autoindex_agent_execution_threads_1", - "def": "PRIMARY KEY (id)", - "table": "agent_execution_threads", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_execution_threads", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE", - "table": "agent_execution_threads", - "referenced_table": "agent_history", - "columns": [ - "taskVersionId" - ], - "referenced_columns": [ - "versionId" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_execution_threads", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_execution_threads", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_execution_threads_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "agent_execution_threads", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"agent_execution_threads\" (\"id\" varchar(128) PRIMARY KEY NOT NULL, \"agentId\" varchar(36) NOT NULL, \"agentName\" varchar(255) NOT NULL, \"projectId\" varchar(255) NOT NULL, \"sessionNumber\" integer NOT NULL DEFAULT (0), \"totalPromptTokens\" integer NOT NULL DEFAULT (0), \"totalCompletionTokens\" integer NOT NULL DEFAULT (0), \"totalCost\" real NOT NULL DEFAULT (0), \"totalDuration\" integer NOT NULL DEFAULT (0), \"title\" varchar(255), \"emoji\" varchar(8), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"taskId\" varchar(32), \"taskVersionId\" varchar(36), \"parentThreadId\" varchar(128), \"parentAgentId\" varchar(36), CONSTRAINT \"FK_0e2f8bf92a7a9c88b89670f701c\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_0468a9dc35597314e641d4722aa\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_f00b52d74fe11838e1fe086deea\" FOREIGN KEY (\"taskVersionId\") REFERENCES \"agent_history\" (\"versionId\") ON DELETE SET NULL)" - }, - { - "name": "instance_ai_mcp_registry_connections", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "credentialId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "serverSlug", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "toolFilter", - "type": "TEXT", - "nullable": true - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_16db3adb7b19df1ee55ff06b27", - "def": "CREATE UNIQUE INDEX \"IDX_16db3adb7b19df1ee55ff06b27\" ON \"instance_ai_mcp_registry_connections\" (\"userId\", \"serverSlug\", \"credentialId\") ", - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "userId", - "serverSlug", - "credentialId" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_mcp_registry_connections_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_mcp_registry_connections", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (serverSlug) REFERENCES mcp_registry_server (slug) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_mcp_registry_connections", - "referenced_table": "mcp_registry_server", - "columns": [ - "serverSlug" - ], - "referenced_columns": [ - "slug" - ] - }, - { - "name": "- (Foreign key ID: 2)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_mcp_registry_connections", - "referenced_table": "credentials_entity", - "columns": [ - "credentialId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_mcp_registry_connections_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_mcp_registry_connections\" (\"id\" varchar PRIMARY KEY NOT NULL, \"credentialId\" varchar(36) NOT NULL, \"serverSlug\" varchar(255) NOT NULL, \"toolFilter\" text, \"userId\" varchar NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_1e826120e7e53ebc4681f026de8\" FOREIGN KEY (\"credentialId\") REFERENCES \"credentials_entity\" (\"id\") ON DELETE CASCADE, CONSTRAINT \"FK_1d25707354d2012da256eb2ec0a\" FOREIGN KEY (\"serverSlug\") REFERENCES \"mcp_registry_server\" (\"slug\") ON DELETE CASCADE, CONSTRAINT \"FK_8b42c08a531d76410980c639a5b\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "oauth_authorization_codes", - "type": "table", - "columns": [ - { - "name": "code", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "clientId", - "type": "varchar", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "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 - }, - { - "name": "state", - "type": "varchar", - "nullable": true - }, - { - "name": "used", - "type": "boolean", - "nullable": false, - "default": "false" - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "resource", - "type": "varchar", - "nullable": true - }, - { - "name": "scope", - "type": "TEXT", - "nullable": false, - "default": "'[\"tool:listWorkflows\",\"tool:getWorkflowDetails\"]'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_oauth_authorization_codes_1", - "def": "PRIMARY KEY (code)", - "table": "oauth_authorization_codes", - "columns": [ - "code" - ] - } - ], - "constraints": [ - { - "name": "code", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (code)", - "table": "oauth_authorization_codes", - "columns": [ - "code" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_authorization_codes", - "referenced_table": "oauth_clients", - "columns": [ - "clientId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_authorization_codes", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_oauth_authorization_codes_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (code)", - "table": "oauth_authorization_codes", - "columns": [ - "code" - ] - } - ], - "def": "CREATE TABLE \"oauth_authorization_codes\" (\"code\" varchar(255) PRIMARY KEY NOT NULL, \"clientId\" varchar NOT NULL, \"userId\" varchar NOT NULL, \"redirectUri\" varchar NOT NULL, \"codeChallenge\" varchar NOT NULL, \"codeChallengeMethod\" varchar(255) NOT NULL, \"expiresAt\" bigint NOT NULL, \"state\" varchar, \"used\" boolean NOT NULL DEFAULT (false), \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"resource\" varchar, \"scope\" text NOT NULL DEFAULT ('[\"tool:listWorkflows\",\"tool:getWorkflowDetails\"]'), CONSTRAINT \"FK_e829ca1240b877f73fd5fab14a2\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_81de58036895ccabf2214c6d99e\" FOREIGN KEY (\"clientId\") REFERENCES \"oauth_clients\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "oauth_refresh_tokens", - "type": "table", - "columns": [ - { - "name": "token", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "clientId", - "type": "varchar", - "nullable": false - }, - { - "name": "userId", - "type": "varchar", - "nullable": false - }, - { - "name": "expiresAt", - "type": "bigint", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "scope", - "type": "TEXT", - "nullable": false, - "default": "'[\"tool:listWorkflows\",\"tool:getWorkflowDetails\"]'" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_oauth_refresh_tokens_1", - "def": "PRIMARY KEY (token)", - "table": "oauth_refresh_tokens", - "columns": [ - "token" - ] - } - ], - "constraints": [ - { - "name": "token", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (token)", - "table": "oauth_refresh_tokens", - "columns": [ - "token" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_refresh_tokens", - "referenced_table": "oauth_clients", - "columns": [ - "clientId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 1)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "oauth_refresh_tokens", - "referenced_table": "user", - "columns": [ - "userId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_oauth_refresh_tokens_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (token)", - "table": "oauth_refresh_tokens", - "columns": [ - "token" - ] - } - ], - "def": "CREATE TABLE \"oauth_refresh_tokens\" (\"token\" varchar(255) PRIMARY KEY NOT NULL, \"clientId\" varchar NOT NULL, \"userId\" varchar NOT NULL, \"expiresAt\" bigint NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"scope\" text NOT NULL DEFAULT ('[\"tool:listWorkflows\",\"tool:getWorkflowDetails\"]'), CONSTRAINT \"FK_a699f3ed9fd0c1b19bc2608ac53\" FOREIGN KEY (\"userId\") REFERENCES \"user\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT \"FK_b388696ce4d8be7ffbe8d3e4b69\" FOREIGN KEY (\"clientId\") REFERENCES \"oauth_clients\" (\"id\") ON DELETE CASCADE ON UPDATE NO ACTION)" - }, - { - "name": "workflow_publication_outbox", - "type": "table", - "columns": [ - { - "name": "id", - "type": "INTEGER", - "nullable": false - }, - { - "name": "workflowId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "publishedVersionId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "status", - "type": "varchar(20)", - "nullable": false - }, - { - "name": "errorMessage", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_workflow_publication_outbox_active_workflow_status", - "def": "CREATE UNIQUE INDEX \"IDX_workflow_publication_outbox_active_workflow_status\" ON \"workflow_publication_outbox\" (\"workflowId\", \"status\") WHERE status IN ('pending', 'in_progress')", - "table": "workflow_publication_outbox", - "columns": [ - "workflowId", - "status" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "workflow_publication_outbox", - "columns": [ - "id" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"status\" IN ('pending', 'in_progress', 'completed', 'partial_success', 'failed'))", - "table": "workflow_publication_outbox", - "columns": [ - "status" - ] - } - ], - "def": "CREATE TABLE \"workflow_publication_outbox\" (\"id\" integer PRIMARY KEY NOT NULL, \"workflowId\" varchar(36) NOT NULL, \"publishedVersionId\" varchar(36) NOT NULL, \"status\" varchar(20) NOT NULL, \"errorMessage\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_workflow_publication_outbox_status\" CHECK (\"status\" IN ('pending', 'in_progress', 'completed', 'partial_success', 'failed')))" - }, - { - "name": "instance_ai_threads", - "type": "table", - "columns": [ - { - "name": "id", - "type": "varchar", - "nullable": false - }, - { - "name": "resourceId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "projectId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "title", - "type": "TEXT", - "nullable": false, - "default": "''" - }, - { - "name": "metadata", - "type": "TEXT", - "nullable": true - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "IDX_instance_ai_threads_projectId", - "def": "CREATE INDEX \"IDX_instance_ai_threads_projectId\" ON \"instance_ai_threads\" (\"projectId\") ", - "table": "instance_ai_threads", - "columns": [ - "projectId" - ] - }, - { - "name": "IDX_instance_ai_threads_resourceId", - "def": "CREATE INDEX \"IDX_instance_ai_threads_resourceId\" ON \"instance_ai_threads\" (\"resourceId\") ", - "table": "instance_ai_threads", - "columns": [ - "resourceId" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_threads_1", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_threads", - "columns": [ - "id" - ] - } - ], - "constraints": [ - { - "name": "id", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_threads", - "columns": [ - "id" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "instance_ai_threads", - "referenced_table": "project", - "columns": [ - "projectId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_instance_ai_threads_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (id)", - "table": "instance_ai_threads", - "columns": [ - "id" - ] - } - ], - "def": "CREATE TABLE \"instance_ai_threads\" (\"id\" varchar PRIMARY KEY NOT NULL, \"resourceId\" varchar(255) NOT NULL, \"projectId\" varchar(36) NOT NULL, \"title\" text NOT NULL DEFAULT (''), \"metadata\" text, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"FK_instance_ai_threads_projectId\" FOREIGN KEY (\"projectId\") REFERENCES \"project\" (\"id\") ON DELETE CASCADE)" - }, - { - "name": "agent_chat_subscriptions", - "type": "table", - "columns": [ - { - "name": "agentId", - "type": "varchar(36)", - "nullable": false - }, - { - "name": "integrationType", - "type": "varchar(64)", - "nullable": false - }, - { - "name": "credentialId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "threadId", - "type": "varchar(255)", - "nullable": false - }, - { - "name": "createdAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - }, - { - "name": "updatedAt", - "type": "datetime(3)", - "nullable": false, - "default": "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')" - } - ], - "indexes": [ - { - "name": "sqlite_autoindex_agent_chat_subscriptions_1", - "def": "PRIMARY KEY (agentId, integrationType, credentialId, threadId)", - "table": "agent_chat_subscriptions", - "columns": [ - "agentId", - "integrationType", - "credentialId", - "threadId" - ] - } - ], - "constraints": [ - { - "name": "agentId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId)", - "table": "agent_chat_subscriptions", - "columns": [ - "agentId" - ] - }, - { - "name": "integrationType", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (integrationType)", - "table": "agent_chat_subscriptions", - "columns": [ - "integrationType" - ] - }, - { - "name": "credentialId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (credentialId)", - "table": "agent_chat_subscriptions", - "columns": [ - "credentialId" - ] - }, - { - "name": "threadId", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (threadId)", - "table": "agent_chat_subscriptions", - "columns": [ - "threadId" - ] - }, - { - "name": "- (Foreign key ID: 0)", - "type": "FOREIGN KEY", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE", - "table": "agent_chat_subscriptions", - "referenced_table": "agents", - "columns": [ - "agentId" - ], - "referenced_columns": [ - "id" - ] - }, - { - "name": "sqlite_autoindex_agent_chat_subscriptions_1", - "type": "PRIMARY KEY", - "def": "PRIMARY KEY (agentId, integrationType, credentialId, threadId)", - "table": "agent_chat_subscriptions", - "columns": [ - "agentId", - "integrationType", - "credentialId", - "threadId" - ] - }, - { - "name": "-", - "type": "CHECK", - "def": "CHECK (\"integrationType\" IN ('telegram', 'slack', 'linear'))", - "table": "agent_chat_subscriptions", - "columns": [ - "integrationType" - ] - } - ], - "def": "CREATE TABLE \"agent_chat_subscriptions\" (\"agentId\" varchar(36) NOT NULL, \"integrationType\" varchar(64) NOT NULL, \"credentialId\" varchar(255) NOT NULL, \"threadId\" varchar(255) NOT NULL, \"createdAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), \"updatedAt\" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT \"CHK_agent_chat_subscriptions_integrationType\" CHECK (\"integrationType\" IN ('telegram', 'slack', 'linear')), CONSTRAINT \"FK_e79153bd179c011e779d5016796\" FOREIGN KEY (\"agentId\") REFERENCES \"agents\" (\"id\") ON DELETE CASCADE, PRIMARY KEY (\"agentId\", \"integrationType\", \"credentialId\", \"threadId\"))" - } - ], - "relations": [ - { - "table": "installed_nodes", - "columns": [ - "package" - ], - "cardinality": "zero_or_more", - "parent_table": "installed_packages", - "parent_columns": [ - "packageName" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (package) REFERENCES installed_packages (packageName) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" - }, - { - "table": "auth_identity", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "workflows_tags", - "columns": [ - "tagId" - ], - "cardinality": "zero_or_one", - "parent_table": "tag_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflows_tags", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_one", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "execution_data", - "columns": [ - "executionId" - ], - "cardinality": "zero_or_one", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "shared_credentials", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_one", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "shared_credentials", - "columns": [ - "credentialsId" - ], - "cardinality": "zero_or_one", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "shared_workflow", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_one", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "shared_workflow", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_one", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "execution_metadata", - "columns": [ - "executionId" - ], - "cardinality": "zero_or_more", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "execution_annotations", - "columns": [ - "executionId" - ], - "cardinality": "zero_or_more", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "execution_annotation_tags", - "columns": [ - "tagId" - ], - "cardinality": "zero_or_one", - "parent_table": "annotation_tag_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (tagId) REFERENCES annotation_tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "execution_annotation_tags", - "columns": [ - "annotationId" - ], - "cardinality": "zero_or_one", - "parent_table": "execution_annotations", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (annotationId) REFERENCES execution_annotations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "processed_data", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_one", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "folder", - "columns": [ - "parentFolderId" - ], - "cardinality": "zero_or_more", - "parent_table": "folder", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "folder", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "folder_tag", - "columns": [ - "tagId" - ], - "cardinality": "zero_or_one", - "parent_table": "tag_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "folder_tag", - "columns": [ - "folderId" - ], - "cardinality": "zero_or_one", - "parent_table": "folder", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (folderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "insights_metadata", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "insights_metadata", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "role_scope", - "columns": [ - "scopeSlug" - ], - "cardinality": "zero_or_one", - "parent_table": "scope", - "parent_columns": [ - "slug" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (scopeSlug) REFERENCES scope (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" - }, - { - "table": "role_scope", - "columns": [ - "roleSlug" - ], - "cardinality": "zero_or_one", - "parent_table": "role", - "parent_columns": [ - "slug" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" - }, - { - "table": "user", - "columns": [ - "roleSlug" - ], - "cardinality": "zero_or_more", - "parent_table": "role", - "parent_columns": [ - "slug" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "test_case_execution", - "columns": [ - "testRunId" - ], - "cardinality": "zero_or_more", - "parent_table": "test_run", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "test_case_execution", - "columns": [ - "pastExecutionId" - ], - "cardinality": "zero_or_more", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "test_case_execution", - "columns": [ - "executionId" - ], - "cardinality": "zero_or_more", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "test_case_execution", - "columns": [ - "evaluationExecutionId" - ], - "cardinality": "zero_or_more", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "project_relation", - "columns": [ - "role" - ], - "cardinality": "zero_or_more", - "parent_table": "role", - "parent_columns": [ - "slug" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "project_relation", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_one", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "project_relation", - "columns": [ - "userId" - ], - "cardinality": "zero_or_one", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "data_table", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "data_table_column", - "columns": [ - "dataTableId" - ], - "cardinality": "zero_or_more", - "parent_table": "data_table", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (dataTableId) REFERENCES data_table (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "variables", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "insights_raw", - "columns": [ - "metaId" - ], - "cardinality": "zero_or_more", - "parent_table": "insights_metadata", - "parent_columns": [ - "metaId" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "insights_by_period", - "columns": [ - "metaId" - ], - "cardinality": "zero_or_more", - "parent_table": "insights_metadata", - "parent_columns": [ - "metaId" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (metaId) REFERENCES insights_metadata (metaId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_access_tokens", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_access_tokens", - "columns": [ - "clientId" - ], - "cardinality": "zero_or_more", - "parent_table": "oauth_clients", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_user_consents", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_user_consents", - "columns": [ - "clientId" - ], - "cardinality": "zero_or_more", - "parent_table": "oauth_clients", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "credentials_entity", - "columns": [ - "resolverId" - ], - "cardinality": "zero_or_more", - "parent_table": "dynamic_credential_resolver", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "chat_hub_agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "executionId" - ], - "cardinality": "zero_or_more", - "parent_table": "execution_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "revisionOfMessageId" - ], - "cardinality": "zero_or_more", - "parent_table": "chat_hub_messages", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (revisionOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "retryOfMessageId" - ], - "cardinality": "zero_or_more", - "parent_table": "chat_hub_messages", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (retryOfMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "previousMessageId" - ], - "cardinality": "zero_or_more", - "parent_table": "chat_hub_messages", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (previousMessageId) REFERENCES chat_hub_messages (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_messages", - "columns": [ - "sessionId" - ], - "cardinality": "zero_or_more", - "parent_table": "chat_hub_sessions", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "dynamic_credential_user_entry", - "columns": [ - "userId" - ], - "cardinality": "zero_or_one", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "dynamic_credential_user_entry", - "columns": [ - "resolverId" - ], - "cardinality": "zero_or_one", - "parent_table": "dynamic_credential_resolver", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (resolverId) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "dynamic_credential_user_entry", - "columns": [ - "credentialId" - ], - "cardinality": "zero_or_one", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_dependency", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "dynamic_credential_entry", - "columns": [ - "resolver_id" - ], - "cardinality": "zero_or_one", - "parent_table": "dynamic_credential_resolver", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "dynamic_credential_entry", - "columns": [ - "credential_id" - ], - "cardinality": "zero_or_one", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (credential_id) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_tools", - "columns": [ - "ownerId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_session_tools", - "columns": [ - "toolId" - ], - "cardinality": "zero_or_one", - "parent_table": "chat_hub_tools", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_session_tools", - "columns": [ - "sessionId" - ], - "cardinality": "zero_or_one", - "parent_table": "chat_hub_sessions", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (sessionId) REFERENCES chat_hub_sessions (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_agent_tools", - "columns": [ - "toolId" - ], - "cardinality": "zero_or_one", - "parent_table": "chat_hub_tools", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (toolId) REFERENCES chat_hub_tools (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_agent_tools", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "chat_hub_agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_agents", - "columns": [ - "ownerId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_agents", - "columns": [ - "credentialId" - ], - "cardinality": "zero_or_more", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "project_secrets_provider_access", - "columns": [ - "secretsProviderConnectionId" - ], - "cardinality": "zero_or_one", - "parent_table": "secrets_provider_connection", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "project_secrets_provider_access", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_one", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_published_version", - "columns": [ - "publishedVersionId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" - }, - { - "table": "workflow_published_version", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_one", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" - }, - { - "table": "workflow_published_version", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_one", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_published_version", - "columns": [ - "publishedVersionId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_sessions", - "columns": [ - "ownerId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "chat_hub_sessions", - "columns": [ - "credentialId" - ], - "cardinality": "zero_or_more", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "chat_hub_sessions", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "chat_hub_sessions", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "chat_hub_agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (agentId) REFERENCES chat_hub_agents (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "role_mapping_rule", - "columns": [ - "role" - ], - "cardinality": "zero_or_more", - "parent_table": "role", - "parent_columns": [ - "slug" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (role) REFERENCES role (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" - }, - { - "table": "role_mapping_rule_project", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_one", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "role_mapping_rule_project", - "columns": [ - "roleMappingRuleId" - ], - "cardinality": "zero_or_one", - "parent_table": "role_mapping_rule", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "credential_dependency", - "columns": [ - "credentialId" - ], - "cardinality": "zero_or_more", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_builder_session", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_builder_session", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_messages", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_observational_memory", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "instance_ai_iteration_logs", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_publish_history", - "columns": [ - "versionId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "workflow_publish_history", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "workflow_publish_history", - "columns": [ - "versionId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_publish_history", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "trusted_key", - "columns": [ - "sourceId" - ], - "cardinality": "zero_or_one", - "parent_table": "trusted_key_source", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "user_favorites", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "ai_builder_temporary_workflow", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "ai_builder_temporary_workflow", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_one", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "execution_entity", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "evaluation_config", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "evaluation_collection", - "columns": [ - "createdById" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "evaluation_collection", - "columns": [ - "evaluationConfigId" - ], - "cardinality": "zero_or_more", - "parent_table": "evaluation_config", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "evaluation_collection", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "test_run", - "columns": [ - "collectionId" - ], - "cardinality": "zero_or_more", - "parent_table": "evaluation_collection", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "test_run", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "test_run", - "columns": [ - "evaluationConfigId" - ], - "cardinality": "zero_or_more", - "parent_table": "evaluation_config", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "agent_checkpoints", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_messages", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_execution", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "agent_execution_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_history", - "columns": [ - "workflowId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_run_snapshots", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_one", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_observations", - "columns": [ - "supersededBy" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_observations", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (supersededBy) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "agents_observations", - "columns": [ - "parentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_observations", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (parentId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "agents_observations", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_observations", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_observation_cursors", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_observation_cursors", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_observation_locks", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_observation_locks", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entries", - "columns": [ - "supersededBy" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_memory_entries", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (supersededBy) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "agents_memory_entries", - "columns": [ - "resourceId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_resources", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entries", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_locks", - "columns": [ - "resourceId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents_resources", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (resourceId) REFERENCES agents_resources (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_locks", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_sources", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_sources", - "columns": [ - "observationId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_observations", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationId) REFERENCES agents_observations (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_sources", - "columns": [ - "memoryEntryId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents_memory_entries", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (memoryEntryId) REFERENCES agents_memory_entries (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_sources", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_cursors", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES agents_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents_memory_entry_cursors", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_history", - "columns": [ - "publishedById" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "agent_history", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agents", - "columns": [ - "activeVersionId" - ], - "cardinality": "zero_or_more", - "parent_table": "agent_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (activeVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "agents", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_observations", - "columns": [ - "supersededBy" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_observations", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (supersededBy) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "instance_ai_observations", - "columns": [ - "parentId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_observations", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (parentId) REFERENCES instance_ai_observations (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" - }, - { - "table": "instance_ai_observations", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_observation_cursors", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_one", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_observation_locks", - "columns": [ - "observationScopeId" - ], - "cardinality": "zero_or_one", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (observationScopeId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_checkpoints", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_pending_confirmations", - "columns": [ - "checkpointKey" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_checkpoints", - "parent_columns": [ - "key" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (checkpointKey) REFERENCES instance_ai_checkpoints (key) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_pending_confirmations", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_pending_confirmations", - "columns": [ - "threadId" - ], - "cardinality": "zero_or_more", - "parent_table": "instance_ai_threads", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (threadId) REFERENCES instance_ai_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "workflow_entity", - "columns": [ - "activeVersionId" - ], - "cardinality": "zero_or_more", - "parent_table": "workflow_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" - }, - { - "table": "workflow_entity", - "columns": [ - "parentFolderId" - ], - "cardinality": "zero_or_more", - "parent_table": "folder", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "user_api_keys", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_files", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "project", - "columns": [ - "creatorId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "agent_task_definition", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_task_snapshot", - "columns": [ - "versionId" - ], - "cardinality": "zero_or_one", - "parent_table": "agent_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (versionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_task_run_lock", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_execution_threads", - "columns": [ - "taskVersionId" - ], - "cardinality": "zero_or_more", - "parent_table": "agent_history", - "parent_columns": [ - "versionId" - ], - "parent_cardinality": "zero_or_one", - "def": "FOREIGN KEY (taskVersionId) REFERENCES agent_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" - }, - { - "table": "agent_execution_threads", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_more", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_execution_threads", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "serverSlug" - ], - "cardinality": "zero_or_more", - "parent_table": "mcp_registry_server", - "parent_columns": [ - "slug" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (serverSlug) REFERENCES mcp_registry_server (slug) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_mcp_registry_connections", - "columns": [ - "credentialId" - ], - "cardinality": "zero_or_more", - "parent_table": "credentials_entity", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_authorization_codes", - "columns": [ - "clientId" - ], - "cardinality": "zero_or_more", - "parent_table": "oauth_clients", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_authorization_codes", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_refresh_tokens", - "columns": [ - "clientId" - ], - "cardinality": "zero_or_more", - "parent_table": "oauth_clients", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "oauth_refresh_tokens", - "columns": [ - "userId" - ], - "cardinality": "zero_or_more", - "parent_table": "user", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "instance_ai_threads", - "columns": [ - "projectId" - ], - "cardinality": "zero_or_more", - "parent_table": "project", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - }, - { - "table": "agent_chat_subscriptions", - "columns": [ - "agentId" - ], - "cardinality": "zero_or_one", - "parent_table": "agents", - "parent_columns": [ - "id" - ], - "parent_cardinality": "exactly_one", - "def": "FOREIGN KEY (agentId) REFERENCES agents (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" - } - ], - "driver": { - "name": "sqlite", - "database_version": "3.51.3" - } -} diff --git a/docs/generated/sqlite-schema/scope.md b/docs/generated/sqlite-schema/scope.md index 9030bd1f6f2..f1ef3cb4893 100644 --- a/docs/generated/sqlite-schema/scope.md +++ b/docs/generated/sqlite-schema/scope.md @@ -15,9 +15,9 @@ CREATE TABLE "scope" ("slug" varchar(128) PRIMARY KEY NOT NULL, "displayName" te | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| slug | varchar(128) | | false | [role_scope](role_scope.md) | | | -| displayName | TEXT | | true | | | | | description | TEXT | | true | | | | +| displayName | TEXT | | true | | | | +| slug | varchar(128) | | false | [role_scope](role_scope.md) | | | ## Constraints @@ -40,9 +40,9 @@ erDiagram "role_scope" |o--|| "scope" : "FOREIGN KEY (scopeSlug) REFERENCES scope (slug) ON UPDATE CASCADE ON DELETE CASCADE MATCH NONE" "scope" { - varchar_128_ slug PK - TEXT displayName TEXT description + TEXT displayName + varchar_128_ slug PK } "role_scope" { VARCHAR_128_ roleSlug PK diff --git a/docs/generated/sqlite-schema/secrets_provider_connection.md b/docs/generated/sqlite-schema/secrets_provider_connection.md index cdb569b9d2f..11b21b7e753 100644 --- a/docs/generated/sqlite-schema/secrets_provider_connection.md +++ b/docs/generated/sqlite-schema/secrets_provider_connection.md @@ -15,12 +15,12 @@ CREATE TABLE "secrets_provider_connection" ("id" integer PRIMARY KEY NOT NULL, " | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| encryptedSettings | TEXT | | false | | | | | id | INTEGER | | false | [project_secrets_provider_access](project_secrets_provider_access.md) | | | +| isEnabled | boolean | false | false | | | | | providerKey | varchar(128) | | false | | | | | type | varchar(36) | | false | | | | -| encryptedSettings | TEXT | | false | | | | -| isEnabled | boolean | false | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -43,20 +43,20 @@ erDiagram "project_secrets_provider_access" |o--|| "secrets_provider_connection" : "FOREIGN KEY (secretsProviderConnectionId) REFERENCES secrets_provider_connection (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "secrets_provider_connection" { + datetime_3_ createdAt + TEXT encryptedSettings INTEGER id + boolean isEnabled varchar_128_ providerKey varchar_36_ type - TEXT encryptedSettings - boolean isEnabled - datetime_3_ createdAt datetime_3_ updatedAt } "project_secrets_provider_access" { - INTEGER secretsProviderConnectionId PK - varchar_36_ projectId PK datetime_3_ createdAt - datetime_3_ updatedAt + varchar_36_ projectId PK varchar_128_ role + INTEGER secretsProviderConnectionId PK + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/settings.md b/docs/generated/sqlite-schema/settings.md index b2110d4689e..8817d556b6f 100644 --- a/docs/generated/sqlite-schema/settings.md +++ b/docs/generated/sqlite-schema/settings.md @@ -16,8 +16,8 @@ CREATE TABLE "settings" ("key" TEXT NOT NULL,"value" TEXT NOT NULL DEFAULT '',"l | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | key | TEXT | | false | | | | -| value | TEXT | '' | false | | | | | loadOnStartup | boolean | false | false | | | | +| value | TEXT | '' | false | | | | ## Constraints @@ -40,8 +40,8 @@ erDiagram "settings" { TEXT key PK - TEXT value boolean loadOnStartup + TEXT value } ``` diff --git a/docs/generated/sqlite-schema/shared_credentials.md b/docs/generated/sqlite-schema/shared_credentials.md index 554a4b6ba06..cfe788dd8f4 100644 --- a/docs/generated/sqlite-schema/shared_credentials.md +++ b/docs/generated/sqlite-schema/shared_credentials.md @@ -15,20 +15,20 @@ CREATE TABLE "shared_credentials" ("credentialsId" varchar(36) NOT NULL, "projec | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | credentialsId | varchar(36) | | false | | [credentials_entity](credentials_entity.md) | | | projectId | varchar(36) | | false | | [project](project.md) | | | role | TEXT | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| credentialsId | PRIMARY KEY | PRIMARY KEY (credentialsId) | -| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (credentialsId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| credentialsId | PRIMARY KEY | PRIMARY KEY (credentialsId) | +| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | | sqlite_autoindex_shared_credentials_1 | PRIMARY KEY | PRIMARY KEY (credentialsId, projectId) | ## Indexes @@ -46,35 +46,35 @@ erDiagram "shared_credentials" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "shared_credentials" { + datetime_3_ createdAt varchar_36_ credentialsId PK varchar_36_ projectId PK TEXT role - datetime_3_ createdAt datetime_3_ updatedAt } "credentials_entity" { - varchar_36_ id PK - varchar_128_ name - TEXT data - varchar_32_ type datetime_3_ createdAt - datetime_3_ updatedAt - boolean isManaged + TEXT data + varchar_36_ id PK boolean isGlobal + boolean isManaged boolean isResolvable + varchar_128_ name boolean resolvableAllowFallback varchar_16_ resolverId FK + varchar_32_ type + datetime_3_ updatedAt } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } ``` diff --git a/docs/generated/sqlite-schema/shared_workflow.md b/docs/generated/sqlite-schema/shared_workflow.md index d9d2e52c671..4ac894abccd 100644 --- a/docs/generated/sqlite-schema/shared_workflow.md +++ b/docs/generated/sqlite-schema/shared_workflow.md @@ -15,21 +15,21 @@ CREATE TABLE "shared_workflow" ("workflowId" varchar(36) NOT NULL, "projectId" v | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | projectId | varchar(36) | | false | | [project](project.md) | | | role | TEXT | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | -| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| projectId | PRIMARY KEY | PRIMARY KEY (projectId) | | sqlite_autoindex_shared_workflow_1 | PRIMARY KEY | PRIMARY KEY (workflowId, projectId) | +| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | ## Indexes @@ -43,48 +43,48 @@ CREATE TABLE "shared_workflow" ("workflowId" varchar(36) NOT NULL, "projectId" v ```mermaid erDiagram -"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "shared_workflow" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "shared_workflow" { - varchar_36_ workflowId PK + datetime_3_ createdAt varchar_36_ projectId PK TEXT role - datetime_3_ createdAt datetime_3_ updatedAt -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId + varchar_36_ workflowId PK } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/tag_entity.md b/docs/generated/sqlite-schema/tag_entity.md index f9332156c88..442aefb8110 100644 --- a/docs/generated/sqlite-schema/tag_entity.md +++ b/docs/generated/sqlite-schema/tag_entity.md @@ -15,9 +15,9 @@ CREATE TABLE "tag_entity" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [workflows_tags](workflows_tags.md) [folder_tag](folder_tag.md) | | | -| name | varchar(24) | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | [folder_tag](folder_tag.md) [workflows_tags](workflows_tags.md) | | | +| name | varchar(24) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -39,23 +39,23 @@ CREATE TABLE "tag_entity" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" varchar ```mermaid erDiagram -"workflows_tags" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "folder_tag" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflows_tags" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "tag_entity" { + datetime_3_ createdAt varchar_36_ id PK varchar_24_ name - datetime_3_ createdAt datetime_3_ updatedAt } -"workflows_tags" { - varchar_36_ workflowId PK - INTEGER tagId PK -} "folder_tag" { varchar_36_ folderId PK varchar_36_ tagId PK } +"workflows_tags" { + INTEGER tagId PK + varchar_36_ workflowId PK +} ``` --- diff --git a/docs/generated/sqlite-schema/test_case_execution.md b/docs/generated/sqlite-schema/test_case_execution.md index b703e46af8a..45e3d8d7c22 100644 --- a/docs/generated/sqlite-schema/test_case_execution.md +++ b/docs/generated/sqlite-schema/test_case_execution.md @@ -15,32 +15,32 @@ CREATE TABLE "test_case_execution" ("id" varchar(36) PRIMARY KEY NOT NULL, "test | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| testRunId | varchar(36) | | false | | [test_run](test_run.md) | | -| pastExecutionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | -| executionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | -| evaluationExecutionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | -| status | varchar | | false | | | | -| runAt | datetime(3) | | true | | | | | completedAt | datetime(3) | | true | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | errorCode | varchar | | true | | | | | errorDetails | TEXT | | true | | | | -| metrics | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| evaluationExecutionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | +| executionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | +| id | varchar(36) | | false | | | | | inputs | TEXT | | true | | | | +| metrics | TEXT | | true | | | | | outputs | TEXT | | true | | | | +| pastExecutionId | INTEGER | | true | | [execution_entity](execution_entity.md) | | +| runAt | datetime(3) | | true | | | | | runIndex | INTEGER | NULL | true | | | | +| status | varchar | | false | | | | +| testRunId | varchar(36) | | false | | [test_run](test_run.md) | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 3) | FOREIGN KEY | FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_test_case_execution_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -55,66 +55,66 @@ CREATE TABLE "test_case_execution" ("id" varchar(36) PRIMARY KEY NOT NULL, "test ```mermaid erDiagram -"test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (evaluationExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (executionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_case_execution" }o--o| "execution_entity" : "FOREIGN KEY (pastExecutionId) REFERENCES execution_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "test_case_execution" { - varchar_36_ id PK - varchar_36_ testRunId FK - INTEGER pastExecutionId FK - INTEGER executionId FK + datetime_3_ completedAt + datetime_3_ createdAt + varchar errorCode + TEXT errorDetails INTEGER evaluationExecutionId FK - varchar status - datetime_3_ runAt - datetime_3_ completedAt - varchar errorCode - TEXT errorDetails - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT inputs - TEXT outputs - INTEGER runIndex -} -"test_run" { + INTEGER executionId FK varchar_36_ id PK - varchar_36_ workflowId FK - varchar status - varchar errorCode - TEXT errorDetails - datetime_3_ runAt - datetime_3_ completedAt + TEXT inputs TEXT metrics - datetime_3_ createdAt + TEXT outputs + INTEGER pastExecutionId FK + datetime_3_ runAt + INTEGER runIndex + varchar status + varchar_36_ testRunId FK datetime_3_ updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId - varchar_36_ evaluationConfigId FK - TEXT evaluationConfigSnapshot - varchar_36_ collectionId FK } "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } +"test_run" { + boolean cancelRequested + varchar_36_ collectionId FK + datetime_3_ completedAt + datetime_3_ createdAt + varchar errorCode + TEXT errorDetails + varchar_36_ evaluationConfigId FK + TEXT evaluationConfigSnapshot + varchar_36_ id PK + TEXT metrics + datetime_3_ runAt + varchar_255_ runningInstanceId + varchar status + datetime_3_ updatedAt + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} ``` --- diff --git a/docs/generated/sqlite-schema/test_run.md b/docs/generated/sqlite-schema/test_run.md index 16820cd090f..7a909962508 100644 --- a/docs/generated/sqlite-schema/test_run.md +++ b/docs/generated/sqlite-schema/test_run.md @@ -15,39 +15,39 @@ CREATE TABLE "test_run" ("id" varchar(36) PRIMARY KEY NOT NULL, "workflowId" var | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [test_case_execution](test_case_execution.md) | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| status | varchar | | false | | | | +| cancelRequested | boolean | FALSE | false | | | | +| collectionId | varchar(36) | | true | | [evaluation_collection](evaluation_collection.md) | | +| completedAt | datetime(3) | | true | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | errorCode | varchar | | true | | | | | errorDetails | TEXT | | true | | | | -| runAt | datetime(3) | | true | | | | -| completedAt | datetime(3) | | true | | | | -| metrics | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| runningInstanceId | varchar(255) | | true | | | | -| cancelRequested | boolean | FALSE | false | | | | -| workflowVersionId | varchar(36) | | true | | | | | evaluationConfigId | varchar(36) | | true | | [evaluation_config](evaluation_config.md) | | | evaluationConfigSnapshot | TEXT | | true | | | | -| collectionId | varchar(36) | | true | | [evaluation_collection](evaluation_collection.md) | | +| id | varchar(36) | | false | [test_case_execution](test_case_execution.md) | | | +| metrics | TEXT | | true | | | | +| runAt | datetime(3) | | true | | | | +| runningInstanceId | varchar(255) | | true | | | | +| status | varchar | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | +| workflowVersionId | varchar(36) | | true | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_test_run_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_test_run_collectionId | CREATE INDEX "IDX_test_run_collectionId" ON "test_run" ("collectionId") | | IDX_d6870d3b6e4c185d33926f423c | CREATE INDEX "IDX_d6870d3b6e4c185d33926f423c" ON "test_run" ("workflowId") | +| IDX_test_run_collectionId | CREATE INDEX "IDX_test_run_collectionId" ON "test_run" ("collectionId") | | IDX_test_run_evaluationConfigId | CREATE INDEX "IDX_test_run_evaluationConfigId" ON "test_run" ("evaluationConfigId") | | sqlite_autoindex_test_run_1 | PRIMARY KEY (id) | @@ -56,93 +56,93 @@ CREATE TABLE "test_run" ("id" varchar(36) PRIMARY KEY NOT NULL, "workflowId" var ```mermaid erDiagram +"test_run" }o--o| "evaluation_collection" : "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"test_run" }o--o| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "test_case_execution" }o--|| "test_run" : "FOREIGN KEY (testRunId) REFERENCES test_run (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "test_run" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"test_run" }o--o| "evaluation_config" : "FOREIGN KEY (evaluationConfigId) REFERENCES evaluation_config (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"test_run" }o--o| "evaluation_collection" : "FOREIGN KEY (collectionId) REFERENCES evaluation_collection (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "test_run" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar status + boolean cancelRequested + varchar_36_ collectionId FK + datetime_3_ completedAt + datetime_3_ createdAt varchar errorCode TEXT errorDetails - datetime_3_ runAt - datetime_3_ completedAt - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId varchar_36_ evaluationConfigId FK TEXT evaluationConfigSnapshot - varchar_36_ collectionId FK -} -"test_case_execution" { varchar_36_ id PK - varchar_36_ testRunId FK - INTEGER pastExecutionId FK - INTEGER executionId FK - INTEGER evaluationExecutionId FK - varchar status + TEXT metrics datetime_3_ runAt - datetime_3_ completedAt - varchar errorCode - TEXT errorDetails - TEXT metrics - datetime_3_ createdAt + varchar_255_ runningInstanceId + varchar status datetime_3_ updatedAt - TEXT inputs - TEXT outputs - INTEGER runIndex -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"evaluation_config" { - varchar_36_ id PK varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - TEXT datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt + varchar_36_ workflowVersionId } "evaluation_collection" { - varchar_36_ id PK - varchar_128_ name - TEXT description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - varchar createdById FK - TEXT insightsCache datetime_3_ createdAt + varchar createdById FK + TEXT description + varchar_36_ evaluationConfigId FK + varchar_36_ id PK + TEXT insightsCache + varchar_128_ name datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"evaluation_config" { + datetime_3_ createdAt + TEXT datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id PK + varchar_64_ invalidReason + TEXT metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"test_case_execution" { + datetime_3_ completedAt + datetime_3_ createdAt + varchar errorCode + TEXT errorDetails + INTEGER evaluationExecutionId FK + INTEGER executionId FK + varchar_36_ id PK + TEXT inputs + TEXT metrics + TEXT outputs + INTEGER pastExecutionId FK + datetime_3_ runAt + INTEGER runIndex + varchar status + varchar_36_ testRunId FK + datetime_3_ updatedAt +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/token_exchange_jti.md b/docs/generated/sqlite-schema/token_exchange_jti.md index b2dc0b6a877..de093b03f1f 100644 --- a/docs/generated/sqlite-schema/token_exchange_jti.md +++ b/docs/generated/sqlite-schema/token_exchange_jti.md @@ -15,9 +15,9 @@ CREATE TABLE "token_exchange_jti" ("jti" varchar(255) PRIMARY KEY NOT NULL, "exp | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| jti | varchar(255) | | false | | | | -| expiresAt | datetime(3) | | false | | | | | createdAt | datetime(3) | | false | | | | +| expiresAt | datetime(3) | | false | | | | +| jti | varchar(255) | | false | | | | ## Constraints @@ -39,9 +39,9 @@ erDiagram "token_exchange_jti" { - varchar_255_ jti PK - datetime_3_ expiresAt datetime_3_ createdAt + datetime_3_ expiresAt + varchar_255_ jti PK } ``` diff --git a/docs/generated/sqlite-schema/trusted_key.md b/docs/generated/sqlite-schema/trusted_key.md index d4d2d6d7993..843326d5203 100644 --- a/docs/generated/sqlite-schema/trusted_key.md +++ b/docs/generated/sqlite-schema/trusted_key.md @@ -15,18 +15,18 @@ CREATE TABLE "trusted_key" ("sourceId" varchar(36) NOT NULL, "kid" varchar(255) | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| sourceId | varchar(36) | | false | | [trusted_key_source](trusted_key_source.md) | | -| kid | varchar(255) | | false | | | | -| data | TEXT | | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| data | TEXT | | false | | | | +| kid | varchar(255) | | false | | | | +| sourceId | varchar(36) | | false | | [trusted_key_source](trusted_key_source.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| sourceId | PRIMARY KEY | PRIMARY KEY (sourceId) | -| kid | PRIMARY KEY | PRIMARY KEY (kid) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| kid | PRIMARY KEY | PRIMARY KEY (kid) | +| sourceId | PRIMARY KEY | PRIMARY KEY (sourceId) | | sqlite_autoindex_trusted_key_1 | PRIMARY KEY | PRIMARY KEY (sourceId, kid) | ## Indexes @@ -43,19 +43,19 @@ erDiagram "trusted_key" |o--|| "trusted_key_source" : "FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "trusted_key" { - varchar_36_ sourceId PK - varchar_255_ kid PK - TEXT data datetime_3_ createdAt + TEXT data + varchar_255_ kid PK + varchar_36_ sourceId PK } "trusted_key_source" { - varchar_36_ id PK - varchar_32_ type TEXT config - varchar_32_ status + datetime_3_ createdAt + varchar_36_ id PK TEXT lastError datetime_3_ lastRefreshedAt - datetime_3_ createdAt + varchar_32_ status + varchar_32_ type datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/trusted_key_source.md b/docs/generated/sqlite-schema/trusted_key_source.md index f978af89139..a5a291564ec 100644 --- a/docs/generated/sqlite-schema/trusted_key_source.md +++ b/docs/generated/sqlite-schema/trusted_key_source.md @@ -15,13 +15,13 @@ CREATE TABLE "trusted_key_source" ("id" varchar(36) PRIMARY KEY NOT NULL, "type" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [trusted_key](trusted_key.md) | | | -| type | varchar(32) | | false | | | | | config | TEXT | | false | | | | -| status | varchar(32) | 'pending' | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | [trusted_key](trusted_key.md) | | | | lastError | TEXT | | true | | | | | lastRefreshedAt | datetime(3) | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| status | varchar(32) | 'pending' | false | | | | +| type | varchar(32) | | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints @@ -45,20 +45,20 @@ erDiagram "trusted_key" |o--|| "trusted_key_source" : "FOREIGN KEY (sourceId) REFERENCES trusted_key_source (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "trusted_key_source" { - varchar_36_ id PK - varchar_32_ type TEXT config - varchar_32_ status + datetime_3_ createdAt + varchar_36_ id PK TEXT lastError datetime_3_ lastRefreshedAt - datetime_3_ createdAt + varchar_32_ status + varchar_32_ type datetime_3_ updatedAt } "trusted_key" { - varchar_36_ sourceId PK - varchar_255_ kid PK - TEXT data datetime_3_ createdAt + TEXT data + varchar_255_ kid PK + varchar_36_ sourceId PK } ``` diff --git a/docs/generated/sqlite-schema/user.md b/docs/generated/sqlite-schema/user.md index ad0183b9e6f..9f1e5b06d2d 100644 --- a/docs/generated/sqlite-schema/user.md +++ b/docs/generated/sqlite-schema/user.md @@ -15,279 +15,279 @@ CREATE TABLE "user" ("id" varchar PRIMARY KEY, "email" varchar(255), "firstName" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar | | true | [auth_identity](auth_identity.md) [project_relation](project_relation.md) [oauth_access_tokens](oauth_access_tokens.md) [oauth_user_consents](oauth_user_consents.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [chat_hub_tools](chat_hub_tools.md) [chat_hub_agents](chat_hub_agents.md) [chat_hub_sessions](chat_hub_sessions.md) [workflow_builder_session](workflow_builder_session.md) [workflow_publish_history](workflow_publish_history.md) [user_favorites](user_favorites.md) [evaluation_collection](evaluation_collection.md) [agent_history](agent_history.md) [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) [user_api_keys](user_api_keys.md) [project](project.md) [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) [oauth_authorization_codes](oauth_authorization_codes.md) [oauth_refresh_tokens](oauth_refresh_tokens.md) | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| disabled | boolean | FALSE | false | | | | | email | varchar(255) | | true | | | | | firstName | varchar(32) | | true | | | | +| id | varchar | | true | [agent_history](agent_history.md) [auth_identity](auth_identity.md) [chat_hub_agents](chat_hub_agents.md) [chat_hub_sessions](chat_hub_sessions.md) [chat_hub_tools](chat_hub_tools.md) [dynamic_credential_user_entry](dynamic_credential_user_entry.md) [evaluation_collection](evaluation_collection.md) [instance_ai_mcp_registry_connections](instance_ai_mcp_registry_connections.md) [instance_ai_pending_confirmations](instance_ai_pending_confirmations.md) [oauth_access_tokens](oauth_access_tokens.md) [oauth_authorization_codes](oauth_authorization_codes.md) [oauth_refresh_tokens](oauth_refresh_tokens.md) [oauth_user_consents](oauth_user_consents.md) [project](project.md) [project_relation](project_relation.md) [user_api_keys](user_api_keys.md) [user_favorites](user_favorites.md) [workflow_builder_session](workflow_builder_session.md) [workflow_publish_history](workflow_publish_history.md) | | | +| lastActiveAt | date | | true | | | | | lastName | varchar(32) | | true | | | | +| mfaEnabled | boolean | FALSE | false | | | | +| mfaRecoveryCodes | TEXT | | true | | | | +| mfaSecret | TEXT | | true | | | | | password | varchar | | true | | | | | personalizationAnswers | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| settings | TEXT | | true | | | | -| disabled | boolean | FALSE | false | | | | -| mfaEnabled | boolean | FALSE | false | | | | -| mfaSecret | TEXT | | true | | | | -| mfaRecoveryCodes | TEXT | | true | | | | -| lastActiveAt | date | | true | | | | | roleSlug | varchar(128) | 'global:member' | false | | [role](role.md) | | +| settings | TEXT | | true | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE | -| sqlite_autoindex_user_2 | UNIQUE | UNIQUE (email) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_user_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_user_2 | UNIQUE | UNIQUE (email) | ## Indexes | Name | Definition | | ---- | ---------- | -| user_role_idx | CREATE INDEX "user_role_idx" ON "user" ("roleSlug") | -| sqlite_autoindex_user_2 | UNIQUE (email) | | sqlite_autoindex_user_1 | PRIMARY KEY (id) | +| sqlite_autoindex_user_2 | UNIQUE (email) | +| user_role_idx | CREATE INDEX "user_role_idx" ON "user" ("roleSlug") | ## Relations ```mermaid erDiagram +"agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "auth_identity" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" -"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_access_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"dynamic_credential_user_entry" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_tools" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_agents" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_sessions" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_builder_session" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_publish_history" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"user_favorites" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"chat_hub_tools" }o--|| "user" : "FOREIGN KEY (ownerId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"dynamic_credential_user_entry" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "evaluation_collection" }o--o| "user" : "FOREIGN KEY (createdById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"agent_history" }o--o| "user" : "FOREIGN KEY (publishedById) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"instance_ai_pending_confirmations" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "instance_ai_mcp_registry_connections" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"instance_ai_pending_confirmations" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_access_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_authorization_codes" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "oauth_refresh_tokens" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"project" }o--o| "user" : "FOREIGN KEY (creatorId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"project_relation" |o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"user_favorites" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_builder_session" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_publish_history" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "user" }o--|| "role" : "FOREIGN KEY (roleSlug) REFERENCES role (slug) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE" "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK -} -"auth_identity" { - VARCHAR_36_ userId FK - VARCHAR_64_ providerId PK - VARCHAR_32_ providerType PK - timestamp createdAt - timestamp updatedAt -} -"project_relation" { - varchar_36_ projectId PK - varchar userId PK - varchar role FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"oauth_access_tokens" { - varchar token PK - varchar clientId FK - varchar userId FK -} -"oauth_user_consents" { - INTEGER id - varchar userId FK - varchar clientId FK - bigint grantedAt -} -"dynamic_credential_user_entry" { - varchar_16_ credentialId PK - varchar userId PK - varchar_16_ resolverId PK - TEXT data - datetime_3_ createdAt - datetime_3_ updatedAt -} -"chat_hub_tools" { - varchar id PK - varchar_255_ name - varchar_255_ type - REAL typeVersion - varchar ownerId FK - TEXT definition - boolean enabled - datetime_3_ createdAt - datetime_3_ updatedAt -} -"chat_hub_agents" { - varchar id PK - varchar_256_ name - varchar_512_ description - TEXT systemPrompt - varchar ownerId FK - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT icon - TEXT files - TEXT suggestedPrompts -} -"chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model - varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_128_ agentName - varchar_16_ type -} -"workflow_builder_session" { - varchar id PK - varchar_36_ workflowId FK - varchar userId FK - TEXT messages - TEXT previousSummary - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ activeVersionCardId - varchar_255_ resumeAfterRestoreMessageId -} -"workflow_publish_history" { - INTEGER id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - varchar userId FK - datetime_3_ createdAt -} -"user_favorites" { - INTEGER id - varchar userId FK - varchar_255_ resourceId - varchar_64_ resourceType -} -"evaluation_collection" { - varchar_36_ id PK - varchar_128_ name - TEXT description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - varchar createdById FK - TEXT insightsCache - datetime_3_ createdAt + TEXT settings datetime_3_ updatedAt } "agent_history" { - varchar_36_ versionId PK varchar_36_ agentId FK - TEXT schema - TEXT tools - TEXT skills - varchar publishedById FK varchar_255_ author datetime_3_ createdAt + varchar publishedById FK + TEXT schema + TEXT skills + TEXT tools datetime_3_ updatedAt + varchar_36_ versionId PK +} +"auth_identity" { + timestamp createdAt + VARCHAR_64_ providerId PK + VARCHAR_32_ providerType PK + timestamp updatedAt + VARCHAR_36_ userId FK +} +"chat_hub_agents" { + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar_512_ description + TEXT files + TEXT icon + varchar id PK + varchar_64_ model + varchar_256_ name + varchar ownerId FK + varchar_16_ provider + TEXT suggestedPrompts + TEXT systemPrompt + datetime_3_ updatedAt +} +"chat_hub_sessions" { + varchar_36_ agentId FK + varchar_128_ agentName + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"chat_hub_tools" { + datetime_3_ createdAt + TEXT definition + boolean enabled + varchar id PK + varchar_255_ name + varchar ownerId FK + varchar_255_ type + REAL typeVersion + datetime_3_ updatedAt +} +"dynamic_credential_user_entry" { + datetime_3_ createdAt + varchar_16_ credentialId PK + TEXT data + varchar_16_ resolverId PK + datetime_3_ updatedAt + varchar userId PK +} +"evaluation_collection" { + datetime_3_ createdAt + varchar createdById FK + TEXT description + varchar_36_ evaluationConfigId FK + varchar_36_ id PK + TEXT insightsCache + varchar_128_ name + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"instance_ai_mcp_registry_connections" { + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + varchar_255_ serverSlug FK + TEXT toolFilter + datetime_3_ updatedAt + varchar userId FK } "instance_ai_pending_confirmations" { - varchar_36_ requestId PK - varchar threadId FK - varchar userId FK - varchar_16_ kind - varchar_36_ runId - varchar_64_ toolCallId - varchar_36_ messageGroupId varchar_255_ checkpointKey FK varchar_36_ checkpointTaskId + datetime_3_ createdAt datetime_3_ expiresAt - datetime_3_ createdAt + varchar_16_ kind + varchar_36_ messageGroupId + varchar_36_ requestId PK + varchar_36_ runId + varchar threadId FK + varchar_64_ toolCallId datetime_3_ updatedAt -} -"user_api_keys" { - varchar_36_ id PK varchar userId FK - varchar_100_ label - varchar apiKey +} +"oauth_access_tokens" { + varchar clientId FK + varchar token PK + varchar userId FK +} +"oauth_authorization_codes" { + varchar clientId FK + varchar_255_ code PK + varchar codeChallenge + varchar_255_ codeChallengeMethod datetime_3_ createdAt + bigint expiresAt + varchar redirectUri + varchar resource + TEXT scope + varchar state datetime_3_ updatedAt - TEXT scopes - varchar audience - datetime_3_ lastUsedAt + boolean used + varchar userId FK +} +"oauth_refresh_tokens" { + varchar clientId FK + datetime_3_ createdAt + bigint expiresAt + TEXT scope + varchar_255_ token PK + datetime_3_ updatedAt + varchar userId FK +} +"oauth_user_consents" { + varchar clientId FK + bigint grantedAt + INTEGER id + varchar userId FK } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } -"instance_ai_mcp_registry_connections" { +"project_relation" { + datetime_3_ createdAt + varchar_36_ projectId PK + varchar role FK + datetime_3_ updatedAt + varchar userId PK +} +"user_api_keys" { + varchar apiKey + varchar audience + datetime_3_ createdAt + varchar_36_ id PK + varchar_100_ label + datetime_3_ lastUsedAt + TEXT scopes + datetime_3_ updatedAt + varchar userId FK +} +"user_favorites" { + INTEGER id + varchar_255_ resourceId + varchar_64_ resourceType + varchar userId FK +} +"workflow_builder_session" { + varchar_255_ activeVersionCardId + datetime_3_ createdAt varchar id PK - varchar_36_ credentialId FK - varchar_255_ serverSlug FK - TEXT toolFilter - varchar userId FK - datetime_3_ createdAt + TEXT messages + TEXT previousSummary + varchar_255_ resumeAfterRestoreMessageId datetime_3_ updatedAt + varchar userId FK + varchar_36_ workflowId FK } -"oauth_authorization_codes" { - varchar_255_ code PK - varchar clientId FK - varchar userId FK - varchar redirectUri - varchar codeChallenge - varchar_255_ codeChallengeMethod - bigint expiresAt - varchar state - boolean used +"workflow_publish_history" { datetime_3_ createdAt - datetime_3_ updatedAt - varchar resource - TEXT scope -} -"oauth_refresh_tokens" { - varchar_255_ token PK - varchar clientId FK + varchar_36_ event + INTEGER id varchar userId FK - bigint expiresAt - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT scope + varchar_36_ versionId FK + varchar_36_ workflowId FK } "role" { - varchar_128_ slug PK - TEXT displayName - TEXT description - TEXT roleType - boolean systemRole datetime_3_ createdAt + TEXT description + TEXT displayName + TEXT roleType + varchar_128_ slug PK + boolean systemRole datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/user_api_keys.md b/docs/generated/sqlite-schema/user_api_keys.md index 300bc3e2f5c..8bf2bcff06c 100644 --- a/docs/generated/sqlite-schema/user_api_keys.md +++ b/docs/generated/sqlite-schema/user_api_keys.md @@ -15,33 +15,33 @@ CREATE TABLE "user_api_keys" ("id" varchar(36) PRIMARY KEY NOT NULL, "userId" va | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | | | | -| userId | varchar | | false | | [user](user.md) | | -| label | varchar(100) | | false | | | | | apiKey | varchar | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| scopes | TEXT | | true | | | | | audience | varchar | 'public-api' | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| id | varchar(36) | | false | | | | +| label | varchar(100) | | false | | | | | lastUsedAt | datetime(3) | | true | | | | +| scopes | TEXT | | true | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_user_api_keys_3 | UNIQUE | UNIQUE (userId, label) | -| sqlite_autoindex_user_api_keys_2 | UNIQUE | UNIQUE (apiKey) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_user_api_keys_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_user_api_keys_2 | UNIQUE | UNIQUE (apiKey) | +| sqlite_autoindex_user_api_keys_3 | UNIQUE | UNIQUE (userId, label) | ## Indexes | Name | Definition | | ---- | ---------- | -| sqlite_autoindex_user_api_keys_3 | UNIQUE (userId, label) | -| sqlite_autoindex_user_api_keys_2 | UNIQUE (apiKey) | | sqlite_autoindex_user_api_keys_1 | PRIMARY KEY (id) | +| sqlite_autoindex_user_api_keys_2 | UNIQUE (apiKey) | +| sqlite_autoindex_user_api_keys_3 | UNIQUE (userId, label) | ## Relations @@ -51,32 +51,32 @@ erDiagram "user_api_keys" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "user_api_keys" { - varchar_36_ id PK - varchar userId FK - varchar_100_ label varchar apiKey - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT scopes varchar audience + datetime_3_ createdAt + varchar_36_ id PK + varchar_100_ label datetime_3_ lastUsedAt + TEXT scopes + datetime_3_ updatedAt + varchar userId FK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/user_favorites.md b/docs/generated/sqlite-schema/user_favorites.md index 63178656e0e..e33d05b6f69 100644 --- a/docs/generated/sqlite-schema/user_favorites.md +++ b/docs/generated/sqlite-schema/user_favorites.md @@ -16,16 +16,16 @@ CREATE TABLE "user_favorites" ("id" integer PRIMARY KEY NOT NULL, "userId" varch | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | INTEGER | | false | | | | -| userId | varchar | | false | | [user](user.md) | | | resourceId | varchar(255) | | false | | | | | resourceType | varchar(64) | | false | | | | +| userId | varchar | | false | | [user](user.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_user_favorites_1 | UNIQUE | UNIQUE (userId, resourceId, resourceType) | ## Indexes @@ -45,26 +45,26 @@ erDiagram "user_favorites" { INTEGER id - varchar userId FK varchar_255_ resourceId varchar_64_ resourceType + varchar userId FK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/variables.md b/docs/generated/sqlite-schema/variables.md index 0b8863b9f0b..6f6622d0043 100644 --- a/docs/generated/sqlite-schema/variables.md +++ b/docs/generated/sqlite-schema/variables.md @@ -17,25 +17,25 @@ CREATE TABLE "variables" ("id" varchar(36) PRIMARY KEY NOT NULL, "key" text NOT | ---- | ---- | ------- | -------- | -------- | ------- | ------- | | id | varchar(36) | | false | | | | | key | TEXT | | false | | | | +| projectId | varchar(36) | | true | | [project](project.md) | | | type | TEXT | 'string' | false | | | | | value | TEXT | | true | | | | -| projectId | varchar(36) | | true | | [project](project.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_variables_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | +| sqlite_autoindex_variables_1 | PRIMARY KEY (id) | | variables_global_key_unique | CREATE UNIQUE INDEX "variables_global_key_unique"
ON "variables" ("key")
WHERE projectId IS NULL | | variables_project_key_unique | CREATE UNIQUE INDEX "variables_project_key_unique" ON "variables" ("projectId", "key") | -| sqlite_autoindex_variables_1 | PRIMARY KEY (id) | ## Relations @@ -47,20 +47,20 @@ erDiagram "variables" { varchar_36_ id PK TEXT key + varchar_36_ projectId FK TEXT type TEXT value - varchar_36_ projectId FK } "project" { + datetime_3_ createdAt + varchar creatorId FK + TEXT customTelemetryTags + varchar_512_ description + TEXT icon varchar_36_ id PK varchar_255_ name varchar_36_ type - datetime_3_ createdAt datetime_3_ updatedAt - TEXT icon - varchar_512_ description - varchar creatorId FK - TEXT customTelemetryTags } ``` diff --git a/docs/generated/sqlite-schema/webhook_entity.md b/docs/generated/sqlite-schema/webhook_entity.md index b1c4ac80b16..6baff78a601 100644 --- a/docs/generated/sqlite-schema/webhook_entity.md +++ b/docs/generated/sqlite-schema/webhook_entity.md @@ -15,20 +15,20 @@ CREATE TABLE "webhook_entity" ("workflowId" varchar(36) NOT NULL, "webhookPath" | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | | | -| webhookPath | varchar | | false | | | | | method | varchar | | false | | | | | node | varchar | | false | | | | -| webhookId | varchar | | true | | | | | pathLength | INTEGER | | true | | | | +| webhookId | varchar | | true | | | | +| webhookPath | varchar | | false | | | | +| workflowId | varchar(36) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| webhookPath | PRIMARY KEY | PRIMARY KEY (webhookPath) | | method | PRIMARY KEY | PRIMARY KEY (method) | | sqlite_autoindex_webhook_entity_1 | PRIMARY KEY | PRIMARY KEY (webhookPath, method) | +| webhookPath | PRIMARY KEY | PRIMARY KEY (webhookPath) | ## Indexes @@ -44,12 +44,12 @@ erDiagram "webhook_entity" { - varchar_36_ workflowId - varchar webhookPath PK varchar method PK varchar node - varchar webhookId INTEGER pathLength + varchar webhookId + varchar webhookPath PK + varchar_36_ workflowId } ``` diff --git a/docs/generated/sqlite-schema/workflow_builder_session.md b/docs/generated/sqlite-schema/workflow_builder_session.md index 750572bd511..dc75530201c 100644 --- a/docs/generated/sqlite-schema/workflow_builder_session.md +++ b/docs/generated/sqlite-schema/workflow_builder_session.md @@ -15,90 +15,90 @@ CREATE TABLE "workflow_builder_session" ("id" varchar PRIMARY KEY NOT NULL, "wor | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| activeVersionCardId | varchar(255) | | true | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | id | varchar | | false | | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| userId | varchar | | false | | [user](user.md) | | | messages | TEXT | '[]' | false | | | | | previousSummary | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| activeVersionCardId | varchar(255) | | true | | | | | resumeAfterRestoreMessageId | varchar(255) | | true | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| userId | varchar | | false | | [user](user.md) | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| sqlite_autoindex_workflow_builder_session_2 | UNIQUE | UNIQUE (workflowId, userId) | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_workflow_builder_session_1 | PRIMARY KEY | PRIMARY KEY (id) | +| sqlite_autoindex_workflow_builder_session_2 | UNIQUE | UNIQUE (workflowId, userId) | ## Indexes | Name | Definition | | ---- | ---------- | -| sqlite_autoindex_workflow_builder_session_2 | UNIQUE (workflowId, userId) | | sqlite_autoindex_workflow_builder_session_1 | PRIMARY KEY (id) | +| sqlite_autoindex_workflow_builder_session_2 | UNIQUE (workflowId, userId) | ## Relations ```mermaid erDiagram -"workflow_builder_session" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_builder_session" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_builder_session" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_builder_session" { + varchar_255_ activeVersionCardId + datetime_3_ createdAt varchar id PK - varchar_36_ workflowId FK - varchar userId FK TEXT messages TEXT previousSummary - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ activeVersionCardId varchar_255_ resumeAfterRestoreMessageId -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId + varchar userId FK + varchar_36_ workflowId FK } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/workflow_dependency.md b/docs/generated/sqlite-schema/workflow_dependency.md index c38cb7775a4..45d6e85d7c4 100644 --- a/docs/generated/sqlite-schema/workflow_dependency.md +++ b/docs/generated/sqlite-schema/workflow_dependency.md @@ -15,31 +15,31 @@ CREATE TABLE "workflow_dependency" ("id" integer PRIMARY KEY NOT NULL, "workflow | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| workflowVersionId | INTEGER | | false | | | | -| dependencyType | varchar(32) | | false | | | | -| dependencyKey | varchar(255) | | false | | | | -| indexVersionId | smallint | 1 | false | | | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | dependencyInfo | TEXT | | true | | | | +| dependencyKey | varchar(255) | | false | | | | +| dependencyType | varchar(32) | | false | | | | +| id | INTEGER | | false | | | | +| indexVersionId | smallint | 1 | false | | | | | publishedVersionId | varchar(36) | | true | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | +| workflowVersionId | INTEGER | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_workflow_dependency_publishedVersionId | CREATE INDEX "IDX_workflow_dependency_publishedVersionId" ON "workflow_dependency" ("publishedVersionId") | | IDX_a4ff2d9b9628ea988fa9e7d0bf | CREATE INDEX "IDX_a4ff2d9b9628ea988fa9e7d0bf" ON "workflow_dependency" ("workflowId") | -| IDX_e7fe1cfda990c14a445937d0b9 | CREATE INDEX "IDX_e7fe1cfda990c14a445937d0b9" ON "workflow_dependency" ("dependencyType") | | IDX_e48a201071ab85d9d09119d640 | CREATE INDEX "IDX_e48a201071ab85d9d09119d640" ON "workflow_dependency" ("dependencyKey") | +| IDX_e7fe1cfda990c14a445937d0b9 | CREATE INDEX "IDX_e7fe1cfda990c14a445937d0b9" ON "workflow_dependency" ("dependencyType") | +| IDX_workflow_dependency_publishedVersionId | CREATE INDEX "IDX_workflow_dependency_publishedVersionId" ON "workflow_dependency" ("publishedVersionId") | ## Relations @@ -49,37 +49,37 @@ erDiagram "workflow_dependency" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_dependency" { - INTEGER id - varchar_36_ workflowId FK - INTEGER workflowVersionId - varchar_32_ dependencyType - varchar_255_ dependencyKey - smallint indexVersionId datetime_3_ createdAt TEXT dependencyInfo + varchar_255_ dependencyKey + varchar_32_ dependencyType + INTEGER id + smallint indexVersionId varchar_36_ publishedVersionId + varchar_36_ workflowId FK + INTEGER workflowVersionId } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/workflow_entity.md b/docs/generated/sqlite-schema/workflow_entity.md index fdc8ee4d95b..1ab4c9a0a1b 100644 --- a/docs/generated/sqlite-schema/workflow_entity.md +++ b/docs/generated/sqlite-schema/workflow_entity.md @@ -15,42 +15,42 @@ CREATE TABLE "workflow_entity" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" va | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | varchar(36) | | false | [workflows_tags](workflows_tags.md) [shared_workflow](shared_workflow.md) [processed_data](processed_data.md) [insights_metadata](insights_metadata.md) [chat_hub_messages](chat_hub_messages.md) [workflow_dependency](workflow_dependency.md) [workflow_published_version](workflow_published_version.md) [chat_hub_sessions](chat_hub_sessions.md) [workflow_builder_session](workflow_builder_session.md) [workflow_publish_history](workflow_publish_history.md) [ai_builder_temporary_workflow](ai_builder_temporary_workflow.md) [execution_entity](execution_entity.md) [evaluation_config](evaluation_config.md) [evaluation_collection](evaluation_collection.md) [test_run](test_run.md) [workflow_history](workflow_history.md) | | | -| name | varchar(128) | | false | | | | | active | boolean | | false | | | | -| nodes | TEXT | | true | | | | -| connections | TEXT | | true | | | | -| settings | TEXT | | true | | | | -| staticData | TEXT | | true | | | | -| pinData | TEXT | | true | | | | -| versionId | varchar(36) | | false | | | | -| triggerCount | INTEGER | 0 | true | | | | -| meta | TEXT | | true | | | | -| parentFolderId | varchar(36) | | true | | [folder](folder.md) | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| isArchived | boolean | FALSE | false | | | | -| versionCounter | INTEGER | 1 | false | | | | -| description | TEXT | | true | | | | | activeVersionId | varchar(36) | | true | | [workflow_history](workflow_history.md) | | +| connections | TEXT | | true | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| description | TEXT | | true | | | | +| id | varchar(36) | | false | [ai_builder_temporary_workflow](ai_builder_temporary_workflow.md) [chat_hub_messages](chat_hub_messages.md) [chat_hub_sessions](chat_hub_sessions.md) [evaluation_collection](evaluation_collection.md) [evaluation_config](evaluation_config.md) [execution_entity](execution_entity.md) [insights_metadata](insights_metadata.md) [processed_data](processed_data.md) [shared_workflow](shared_workflow.md) [test_run](test_run.md) [workflow_builder_session](workflow_builder_session.md) [workflow_dependency](workflow_dependency.md) [workflow_history](workflow_history.md) [workflow_publish_history](workflow_publish_history.md) [workflow_published_version](workflow_published_version.md) [workflows_tags](workflows_tags.md) | | | +| isArchived | boolean | FALSE | false | | | | +| meta | TEXT | | true | | | | +| name | varchar(128) | | false | | | | | nodeGroups | TEXT | '[]' | false | | | | +| nodes | TEXT | | true | | | | +| parentFolderId | varchar(36) | | true | | [folder](folder.md) | | +| pinData | TEXT | | true | | | | +| settings | TEXT | | true | | | | | sourceWorkflowId | varchar | | true | | | | +| staticData | TEXT | | true | | | | +| triggerCount | INTEGER | 0 | true | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| versionCounter | INTEGER | 1 | false | | | | +| versionId | varchar(36) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | +| id | PRIMARY KEY | PRIMARY KEY (id) | | sqlite_autoindex_workflow_entity_1 | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes | Name | Definition | | ---- | ---------- | -| IDX_workflow_entity_sourceWorkflowId | CREATE INDEX "IDX_workflow_entity_sourceWorkflowId" ON "workflow_entity" ("sourceWorkflowId") WHERE "sourceWorkflowId" IS NOT NULL | | IDX_e10425f6ab9964c4c1623a4a03 | CREATE INDEX "IDX_e10425f6ab9964c4c1623a4a03" ON "workflow_entity" ("name") | +| IDX_workflow_entity_sourceWorkflowId | CREATE INDEX "IDX_workflow_entity_sourceWorkflowId" ON "workflow_entity" ("sourceWorkflowId") WHERE "sourceWorkflowId" IS NOT NULL | | sqlite_autoindex_workflow_entity_1 | PRIMARY KEY (id) | ## Triggers @@ -64,230 +64,230 @@ CREATE TABLE "workflow_entity" ("id" varchar(36) PRIMARY KEY NOT NULL, "name" va ```mermaid erDiagram -"workflows_tags" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"processed_data" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"insights_metadata" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"workflow_entity" }o--o| "workflow_history" : "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"ai_builder_temporary_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "chat_hub_messages" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"chat_hub_sessions" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"evaluation_collection" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"evaluation_config" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"execution_entity" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"insights_metadata" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"processed_data" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"shared_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"test_run" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_builder_session" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_dependency" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_publish_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" "workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"chat_hub_sessions" }o--o| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" -"workflow_builder_session" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_publish_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"ai_builder_temporary_workflow" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"execution_entity" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"evaluation_config" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"evaluation_collection" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"test_run" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflows_tags" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_entity" }o--o| "folder" : "FOREIGN KEY (parentFolderId) REFERENCES folder (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_entity" }o--o| "workflow_history" : "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"workflows_tags" { - varchar_36_ workflowId PK - INTEGER tagId PK -} -"shared_workflow" { - varchar_36_ workflowId PK - varchar_36_ projectId PK - TEXT role + TEXT connections datetime_3_ createdAt - datetime_3_ updatedAt -} -"processed_data" { - varchar_36_ workflowId PK - varchar_255_ context PK - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT value -} -"insights_metadata" { - INTEGER metaId - varchar_16_ workflowId FK - varchar_36_ projectId FK - varchar_128_ workflowName - varchar_255_ projectName -} -"chat_hub_messages" { - varchar id PK - varchar sessionId FK - varchar previousMessageId FK - varchar revisionOfMessageId FK - varchar retryOfMessageId FK - varchar_16_ type + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta varchar_128_ name - TEXT content - varchar_16_ provider - varchar_36_ workflowId FK - INTEGER executionId FK - datetime_3_ createdAt + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_16_ status - TEXT attachments - VARCHAR_256_ model + INTEGER versionCounter + varchar_36_ versionId } -"workflow_dependency" { - INTEGER id - varchar_36_ workflowId FK - INTEGER workflowVersionId - varchar_32_ dependencyType - varchar_255_ dependencyKey - smallint indexVersionId - datetime_3_ createdAt - TEXT dependencyInfo - varchar_36_ publishedVersionId -} -"workflow_published_version" { - varchar_36_ workflowId PK - varchar_36_ publishedVersionId FK +"workflow_history" { + varchar_255_ authors + boolean autosaved + TEXT connections datetime_3_ createdAt + TEXT description + varchar_128_ name + TEXT nodeGroups + TEXT nodes datetime_3_ updatedAt -} -"chat_hub_sessions" { - varchar id PK - varchar_256_ title - varchar ownerId FK - datetime_3_ lastMessageAt - varchar_36_ credentialId FK - varchar_16_ provider - varchar_64_ model + varchar_36_ versionId PK varchar_36_ workflowId FK - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_36_ agentId FK - varchar_128_ agentName - varchar_16_ type -} -"workflow_builder_session" { - varchar id PK - varchar_36_ workflowId FK - varchar userId FK - TEXT messages - TEXT previousSummary - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ activeVersionCardId - varchar_255_ resumeAfterRestoreMessageId -} -"workflow_publish_history" { - INTEGER id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - varchar userId FK - datetime_3_ createdAt } "ai_builder_temporary_workflow" { - varchar_36_ workflowId PK - varchar threadId FK datetime_3_ createdAt + varchar threadId FK datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"chat_hub_messages" { + varchar_36_ agentId FK + TEXT attachments + TEXT content + datetime_3_ createdAt + INTEGER executionId FK + varchar id PK + VARCHAR_256_ model + varchar_128_ name + varchar previousMessageId FK + varchar_16_ provider + varchar retryOfMessageId FK + varchar revisionOfMessageId FK + varchar sessionId FK + varchar_16_ status + varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"chat_hub_sessions" { + varchar_36_ agentId FK + varchar_128_ agentName + datetime_3_ createdAt + varchar_36_ credentialId FK + varchar id PK + datetime_3_ lastMessageAt + varchar_64_ model + varchar ownerId FK + varchar_16_ provider + varchar_256_ title + varchar_16_ type + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"evaluation_collection" { + datetime_3_ createdAt + varchar createdById FK + TEXT description + varchar_36_ evaluationConfigId FK + varchar_36_ id PK + TEXT insightsCache + varchar_128_ name + datetime_3_ updatedAt + varchar_36_ workflowId FK +} +"evaluation_config" { + datetime_3_ createdAt + TEXT datasetRef + varchar_32_ datasetSource + varchar_255_ endNodeName + varchar_36_ id PK + varchar_64_ invalidReason + TEXT metrics + varchar_128_ name + varchar_255_ startNodeName + varchar_16_ status + datetime_3_ updatedAt + varchar_36_ workflowId FK } "execution_entity" { - INTEGER id - varchar_36_ workflowId FK + datetime_3_ createdAt + varchar_255_ deduplicationKey + datetime_3_ deletedAt boolean finished + INTEGER id + BIGINT jsonSizeBytes varchar mode varchar retryOf varchar retrySuccessId datetime startedAt - datetime stoppedAt - datetime waitTill varchar status - datetime_3_ deletedAt - datetime_3_ createdAt + datetime stoppedAt varchar_2_ storedAt TEXT tracingContext - varchar_255_ deduplicationKey - BIGINT jsonSizeBytes + datetime waitTill + varchar_36_ workflowId FK VARCHAR_36_ workflowVersionId } -"evaluation_config" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar_128_ name - varchar_16_ status - varchar_64_ invalidReason - varchar_32_ datasetSource - TEXT datasetRef - varchar_255_ startNodeName - varchar_255_ endNodeName - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt +"insights_metadata" { + INTEGER metaId + varchar_36_ projectId FK + varchar_255_ projectName + varchar_16_ workflowId FK + varchar_128_ workflowName } -"evaluation_collection" { - varchar_36_ id PK - varchar_128_ name - TEXT description - varchar_36_ workflowId FK - varchar_36_ evaluationConfigId FK - varchar createdById FK - TEXT insightsCache +"processed_data" { + varchar_255_ context PK datetime_3_ createdAt datetime_3_ updatedAt + TEXT value + varchar_36_ workflowId PK +} +"shared_workflow" { + datetime_3_ createdAt + varchar_36_ projectId PK + TEXT role + datetime_3_ updatedAt + varchar_36_ workflowId PK } "test_run" { - varchar_36_ id PK - varchar_36_ workflowId FK - varchar status + boolean cancelRequested + varchar_36_ collectionId FK + datetime_3_ completedAt + datetime_3_ createdAt varchar errorCode TEXT errorDetails - datetime_3_ runAt - datetime_3_ completedAt - TEXT metrics - datetime_3_ createdAt - datetime_3_ updatedAt - varchar_255_ runningInstanceId - boolean cancelRequested - varchar_36_ workflowVersionId varchar_36_ evaluationConfigId FK TEXT evaluationConfigSnapshot - varchar_36_ collectionId FK -} -"workflow_history" { - varchar_36_ versionId PK - varchar_36_ workflowId FK - varchar_255_ authors - datetime_3_ createdAt + varchar_36_ id PK + TEXT metrics + datetime_3_ runAt + varchar_255_ runningInstanceId + varchar status datetime_3_ updatedAt - TEXT nodes - TEXT connections - varchar_128_ name - boolean autosaved - TEXT description - TEXT nodeGroups + varchar_36_ workflowId FK + varchar_36_ workflowVersionId +} +"workflow_builder_session" { + varchar_255_ activeVersionCardId + datetime_3_ createdAt + varchar id PK + TEXT messages + TEXT previousSummary + varchar_255_ resumeAfterRestoreMessageId + datetime_3_ updatedAt + varchar userId FK + varchar_36_ workflowId FK +} +"workflow_dependency" { + datetime_3_ createdAt + TEXT dependencyInfo + varchar_255_ dependencyKey + varchar_32_ dependencyType + INTEGER id + smallint indexVersionId + varchar_36_ publishedVersionId + varchar_36_ workflowId FK + INTEGER workflowVersionId +} +"workflow_publish_history" { + datetime_3_ createdAt + varchar_36_ event + INTEGER id + varchar userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK +} +"workflow_published_version" { + datetime_3_ createdAt + varchar_36_ publishedVersionId FK + datetime_3_ updatedAt + varchar_36_ workflowId PK +} +"workflows_tags" { + INTEGER tagId PK + varchar_36_ workflowId PK } "folder" { + datetime_3_ createdAt varchar_36_ id PK varchar_128_ name varchar_36_ parentFolderId FK varchar_36_ projectId FK - datetime_3_ createdAt datetime_3_ updatedAt } ``` diff --git a/docs/generated/sqlite-schema/workflow_history.md b/docs/generated/sqlite-schema/workflow_history.md index c83df7adf9a..2762dae636b 100644 --- a/docs/generated/sqlite-schema/workflow_history.md +++ b/docs/generated/sqlite-schema/workflow_history.md @@ -15,25 +15,25 @@ CREATE TABLE "workflow_history" ("versionId" varchar(36) PRIMARY KEY NOT NULL, " | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| versionId | varchar(36) | | false | [workflow_published_version](workflow_published_version.md) [workflow_publish_history](workflow_publish_history.md) [workflow_entity](workflow_entity.md) | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | | authors | varchar(255) | | false | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | -| nodes | TEXT | | false | | | | -| connections | TEXT | | false | | | | -| name | varchar(128) | | true | | | | | autosaved | boolean | false | false | | | | +| connections | TEXT | | false | | | | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | description | TEXT | | true | | | | +| name | varchar(128) | | true | | | | | nodeGroups | TEXT | '[]' | false | | | | +| nodes | TEXT | | false | | | | +| updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| versionId | varchar(36) | | false | [workflow_entity](workflow_entity.md) [workflow_publish_history](workflow_publish_history.md) [workflow_published_version](workflow_published_version.md) | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| versionId | PRIMARY KEY | PRIMARY KEY (versionId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_workflow_history_1 | PRIMARY KEY | PRIMARY KEY (versionId) | +| versionId | PRIMARY KEY | PRIMARY KEY (versionId) | ## Indexes @@ -47,61 +47,61 @@ CREATE TABLE "workflow_history" ("versionId" varchar(36) PRIMARY KEY NOT NULL, " ```mermaid erDiagram -"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" -"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_entity" }o--o| "workflow_history" : "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" "workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_entity" }o--o| "workflow_history" : "FOREIGN KEY (activeVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_history" { + varchar_255_ authors + boolean autosaved + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_128_ name + TEXT nodeGroups + TEXT nodes + datetime_3_ updatedAt varchar_36_ versionId PK varchar_36_ workflowId FK - varchar_255_ authors - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT nodes - TEXT connections - varchar_128_ name - boolean autosaved - TEXT description - TEXT nodeGroups -} -"workflow_published_version" { - varchar_36_ workflowId PK - varchar_36_ publishedVersionId FK - datetime_3_ createdAt - datetime_3_ updatedAt -} -"workflow_publish_history" { - INTEGER id - varchar_36_ workflowId FK - varchar_36_ versionId FK - varchar_36_ event - varchar userId FK - datetime_3_ createdAt } "workflow_entity" { - varchar_36_ id PK - varchar_128_ name boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId +} +"workflow_publish_history" { + datetime_3_ createdAt + varchar_36_ event + INTEGER id + varchar userId FK + varchar_36_ versionId FK + varchar_36_ workflowId FK +} +"workflow_published_version" { + datetime_3_ createdAt + varchar_36_ publishedVersionId FK + datetime_3_ updatedAt + varchar_36_ workflowId PK } ``` diff --git a/docs/generated/sqlite-schema/workflow_publication_outbox.md b/docs/generated/sqlite-schema/workflow_publication_outbox.md index 66c79919d27..cabe5eb35de 100644 --- a/docs/generated/sqlite-schema/workflow_publication_outbox.md +++ b/docs/generated/sqlite-schema/workflow_publication_outbox.md @@ -15,20 +15,20 @@ CREATE TABLE "workflow_publication_outbox" ("id" integer PRIMARY KEY NOT NULL, " | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | +| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| errorMessage | TEXT | | true | | | | | id | INTEGER | | false | | | | -| workflowId | varchar(36) | | false | | | | | publishedVersionId | varchar(36) | | false | | | | | status | varchar(20) | | false | | | | -| errorMessage | TEXT | | true | | | | -| createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | | - | CHECK | CHECK ("status" IN ('pending', 'in_progress', 'completed', 'partial_success', 'failed')) | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -43,13 +43,13 @@ erDiagram "workflow_publication_outbox" { + datetime_3_ createdAt + TEXT errorMessage INTEGER id - varchar_36_ workflowId varchar_36_ publishedVersionId varchar_20_ status - TEXT errorMessage - datetime_3_ createdAt datetime_3_ updatedAt + varchar_36_ workflowId } ``` diff --git a/docs/generated/sqlite-schema/workflow_publish_history.md b/docs/generated/sqlite-schema/workflow_publish_history.md index ffe6e523f1f..d9cdb14ff19 100644 --- a/docs/generated/sqlite-schema/workflow_publish_history.md +++ b/docs/generated/sqlite-schema/workflow_publish_history.md @@ -15,23 +15,23 @@ CREATE TABLE "workflow_publish_history" ("id" integer PRIMARY KEY NOT NULL, "wor | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | false | | | | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| versionId | varchar(36) | | true | | [workflow_history](workflow_history.md) | | -| event | varchar(36) | | false | | | | -| userId | varchar | | true | | [user](user.md) | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| event | varchar(36) | | false | | | | +| id | INTEGER | | false | | | | +| userId | varchar | | true | | [user](user.md) | | +| versionId | varchar(36) | | true | | [workflow_history](workflow_history.md) | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| id | PRIMARY KEY | PRIMARY KEY (id) | +| - | CHECK | CHECK ((("event" IN ('activated', 'deactivated')))) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 3) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | -| - | CHECK | CHECK ((("event" IN ('activated', 'deactivated')))) | +| id | PRIMARY KEY | PRIMARY KEY (id) | ## Indexes @@ -44,70 +44,70 @@ CREATE TABLE "workflow_publish_history" ("id" integer PRIMARY KEY NOT NULL, "wor ```mermaid erDiagram -"workflow_publish_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_publish_history" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" "workflow_publish_history" }o--o| "workflow_history" : "FOREIGN KEY (versionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" -"workflow_publish_history" }o--o| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE" +"workflow_publish_history" }o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_publish_history" { - INTEGER id - varchar_36_ workflowId FK - varchar_36_ versionId FK + datetime_3_ createdAt varchar_36_ event + INTEGER id varchar userId FK - datetime_3_ createdAt -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId -} -"workflow_history" { - varchar_36_ versionId PK + varchar_36_ versionId FK varchar_36_ workflowId FK - varchar_255_ authors - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT nodes - TEXT connections - varchar_128_ name - boolean autosaved - TEXT description - TEXT nodeGroups } "user" { - varchar id PK + datetime_3_ createdAt + boolean disabled varchar_255_ email varchar_32_ firstName + varchar id PK + date lastActiveAt varchar_32_ lastName + boolean mfaEnabled + TEXT mfaRecoveryCodes + TEXT mfaSecret varchar password TEXT personalizationAnswers - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT settings - boolean disabled - boolean mfaEnabled - TEXT mfaSecret - TEXT mfaRecoveryCodes - date lastActiveAt varchar_128_ roleSlug FK + TEXT settings + datetime_3_ updatedAt +} +"workflow_history" { + varchar_255_ authors + boolean autosaved + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_128_ name + TEXT nodeGroups + TEXT nodes + datetime_3_ updatedAt + varchar_36_ versionId PK + varchar_36_ workflowId FK +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/workflow_published_version.md b/docs/generated/sqlite-schema/workflow_published_version.md index 1b32fc7723c..d8cf659448c 100644 --- a/docs/generated/sqlite-schema/workflow_published_version.md +++ b/docs/generated/sqlite-schema/workflow_published_version.md @@ -15,21 +15,21 @@ CREATE TABLE "workflow_published_version" ("workflowId" varchar(36) PRIMARY KEY | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | -| publishedVersionId | varchar(36) | | false | | [workflow_history](workflow_history.md) | | | createdAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| publishedVersionId | varchar(36) | | false | | [workflow_history](workflow_history.md) | | | updatedAt | datetime(3) | STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') | false | | | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE | | - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 3) | FOREIGN KEY | FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_workflow_published_version_1 | PRIMARY KEY | PRIMARY KEY (workflowId) | +| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | ## Indexes @@ -42,51 +42,51 @@ CREATE TABLE "workflow_published_version" ("workflowId" varchar(36) PRIMARY KEY ```mermaid erDiagram -"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" -"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" "workflow_published_version" }o--|| "workflow_history" : "FOREIGN KEY (publishedVersionId) REFERENCES workflow_history (versionId) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE RESTRICT MATCH NONE" +"workflow_published_version" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflow_published_version" { - varchar_36_ workflowId PK + datetime_3_ createdAt varchar_36_ publishedVersionId FK - datetime_3_ createdAt datetime_3_ updatedAt -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId + varchar_36_ workflowId PK } "workflow_history" { + varchar_255_ authors + boolean autosaved + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_128_ name + TEXT nodeGroups + TEXT nodes + datetime_3_ updatedAt varchar_36_ versionId PK varchar_36_ workflowId FK - varchar_255_ authors - datetime_3_ createdAt - datetime_3_ updatedAt - TEXT nodes +} +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK TEXT connections - varchar_128_ name - boolean autosaved + datetime_3_ createdAt TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId } ``` diff --git a/docs/generated/sqlite-schema/workflow_statistics.md b/docs/generated/sqlite-schema/workflow_statistics.md index dc62e5d1d94..58fdbd5a521 100644 --- a/docs/generated/sqlite-schema/workflow_statistics.md +++ b/docs/generated/sqlite-schema/workflow_statistics.md @@ -23,13 +23,13 @@ CREATE TABLE "workflow_statistics" ( | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| id | INTEGER | | true | | | | | count | INTEGER | 0 | true | | | | +| id | INTEGER | | true | | | | | latestEvent | DATETIME | | true | | | | | name | VARCHAR(128) | | false | | | | +| rootCount | INTEGER | 0 | true | | | | | workflowId | VARCHAR(36) | | false | | | | | workflowName | VARCHAR(128) | | true | | | | -| rootCount | INTEGER | 0 | true | | | | ## Constraints @@ -50,13 +50,13 @@ erDiagram "workflow_statistics" { - INTEGER id INTEGER count + INTEGER id DATETIME latestEvent VARCHAR_128_ name + INTEGER rootCount VARCHAR_36_ workflowId VARCHAR_128_ workflowName - INTEGER rootCount } ``` diff --git a/docs/generated/sqlite-schema/workflows_tags.md b/docs/generated/sqlite-schema/workflows_tags.md index 1cf517d528f..1accdaef678 100644 --- a/docs/generated/sqlite-schema/workflows_tags.md +++ b/docs/generated/sqlite-schema/workflows_tags.md @@ -15,25 +15,25 @@ CREATE TABLE "workflows_tags" ("workflowId" varchar(36) NOT NULL, "tagId" intege | Name | Type | Default | Nullable | Children | Parents | Comment | | ---- | ---- | ------- | -------- | -------- | ------- | ------- | -| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | | tagId | INTEGER | | false | | [tag_entity](tag_entity.md) | | +| workflowId | varchar(36) | | false | | [workflow_entity](workflow_entity.md) | | ## Constraints | Name | Type | Definition | | ---- | ---- | ---------- | -| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | -| tagId | PRIMARY KEY | PRIMARY KEY (tagId) | | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE | | sqlite_autoindex_workflows_tags_1 | PRIMARY KEY | PRIMARY KEY (workflowId, tagId) | +| tagId | PRIMARY KEY | PRIMARY KEY (tagId) | +| workflowId | PRIMARY KEY | PRIMARY KEY (workflowId) | ## Indexes | Name | Definition | | ---- | ---------- | -| idx_workflows_tags_workflow_id | CREATE INDEX "idx_workflows_tags_workflow_id" ON "workflows_tags" ("workflowId") | | idx_workflows_tags_tag_id | CREATE INDEX "idx_workflows_tags_tag_id" ON "workflows_tags" ("tagId") | +| idx_workflows_tags_workflow_id | CREATE INDEX "idx_workflows_tags_workflow_id" ON "workflows_tags" ("workflowId") | | sqlite_autoindex_workflows_tags_1 | PRIMARY KEY (workflowId, tagId) | ## Relations @@ -41,41 +41,41 @@ CREATE TABLE "workflows_tags" ("workflowId" varchar(36) NOT NULL, "tagId" intege ```mermaid erDiagram -"workflows_tags" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflows_tags" |o--|| "tag_entity" : "FOREIGN KEY (tagId) REFERENCES tag_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" +"workflows_tags" |o--|| "workflow_entity" : "FOREIGN KEY (workflowId) REFERENCES workflow_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE" "workflows_tags" { - varchar_36_ workflowId PK INTEGER tagId PK -} -"workflow_entity" { - varchar_36_ id PK - varchar_128_ name - boolean active - TEXT nodes - TEXT connections - TEXT settings - TEXT staticData - TEXT pinData - varchar_36_ versionId - INTEGER triggerCount - TEXT meta - varchar_36_ parentFolderId FK - datetime_3_ createdAt - datetime_3_ updatedAt - boolean isArchived - INTEGER versionCounter - TEXT description - varchar_36_ activeVersionId FK - TEXT nodeGroups - varchar sourceWorkflowId + varchar_36_ workflowId PK } "tag_entity" { + datetime_3_ createdAt varchar_36_ id PK varchar_24_ name - datetime_3_ createdAt datetime_3_ updatedAt } +"workflow_entity" { + boolean active + varchar_36_ activeVersionId FK + TEXT connections + datetime_3_ createdAt + TEXT description + varchar_36_ id PK + boolean isArchived + TEXT meta + varchar_128_ name + TEXT nodeGroups + TEXT nodes + varchar_36_ parentFolderId FK + TEXT pinData + TEXT settings + varchar sourceWorkflowId + TEXT staticData + INTEGER triggerCount + datetime_3_ updatedAt + INTEGER versionCounter + varchar_36_ versionId +} ``` ---