Saltar a contenido

PostgreSQL Schema Report

Scope

  • Source: live PostgreSQL connection using ConnectionStrings__DefaultConnection.
  • Database: nexus on localhost:5432.
  • Extracted at (UTC): 2026-03-09 23:08:17.511264.
  • Engine: PostgreSQL 16.1, compiled by Visual C++ build 1937, 64-bit.
  • Full machine-readable snapshot: docs/nexus/database/postgresql-schema-snapshot.json.

Executive Summary

  • Non-system schemas: 1
  • Base tables: 100
  • Columns: 1499
  • Constraints: 1080
  • Foreign keys: 161
  • Indexes: 485
  • Tables with primary key: 100 / 100
  • Isolated tables with no inbound/outbound FK: 12
  • Root tables referenced by others but not referencing another table: 8
  • Leaf tables referencing others but not referenced themselves: 57

Tables Requiring Review

Isolated Tables

These tables have no inbound or outbound foreign keys. Some may be intentional logs or configuration tables, but they are structurally disconnected from the main domain graph and should be reviewed.

  • public.AutomationRules
  • public.CopilotBatchExecutions
  • public.ModelRecommendationRules
  • public.ProjectTemplates
  • public.QuickReplyTemplates
  • public.ResourceUsages
  • public.SystemMetrics
  • public.SystemThresholds
  • public.WhatsappGroupConfigs
  • public.WhatsappMessageLogs
  • public.__EFMigrationsHistory
  • public.system_logs

Naming Outliers

These names do not follow the dominant PascalCase naming convention used by most domain tables.

  • public.system_logs

Catalog Mismatches

The following relation names appeared in PostgreSQL catalog views but not in information_schema.tables as base tables. They may be materialized views, renamed objects, or stale catalog entries and should be reviewed separately.

  • public.McpRequestStats_Daily

Largest Tables By Estimated Rows

Table Estimated Rows Dead Rows Last Auto Analyze
public.system_logs 227499 0 2026-03-09 23:16:14.064105+01:00
public.ClickUpSyncLogs 49948 0 2026-02-05 22:09:54.409606+01:00
public.DevSessionMessages 6591 14 2026-03-08 19:46:01.723574+01:00
public.McpRequestLogs 3890 330 2026-03-08 23:23:11.600792+01:00
public.UpeContacts 1183 71 2026-02-23 22:04:32.955895+01:00
public.UpeTimelineEvents 1173 0 2026-02-22 23:46:20.911606+01:00
public.UpeConversationMessages 1112 0 2026-03-09 10:31:34.110541+01:00
public.WhatsappMessageLogs 923 0 2026-03-07 10:05:17.665912+01:00
public.DocumentContextLinks 808 0 2026-03-09 23:53:11.558864+01:00
public.Executions 804 25 2026-03-08 01:59:24.281828+01:00
public.RemoteAgentCommands 745 111 2026-03-09 12:59:23.549679+01:00
public.UpeToolExecutions 553 0 2026-03-09 12:24:01.304765+01:00
public.BacklogItems 529 27 2026-02-16 20:57:19.357257+01:00
public.AgentSkills 526 5 2026-01-11 18:34:13.689812+01:00
public.FeedbackEvents 446 0 2026-03-07 01:57:29.895763+01:00

Relationship Overview

Table Outbound FKs Inbound FKs
public.AIProviderConfigs 2 0
public.AgentReleases 1 0
public.AgentSkills 1 0
public.AgentTriggers 1 0
public.Agents 0 5
public.AutomationRules 0 0
public.BacklogAIAnalyses 1 1
public.BacklogItems 5 9
public.ChatbotConfigs 1 0
public.ClickUpConfigs 1 0
public.ClickUpSyncLogs 2 0
public.ClientRegistrations 2 0
public.Clients 2 3
public.Commands 0 1
public.CommunicationChannels 1 0
public.ContextSnippets 4 0
public.CopilotBatchExecutions 0 0
public.CopilotExecutions 2 2
public.CopilotSteps 1 0
public.DevSessionMessages 1 0
public.DevSessions 5 6
public.DocumentContextLinks 1 0
public.Executions 2 4
public.FeedbackEvents 3 0
public.KnowledgeDocumentSources 1 0
public.KnowledgeDocuments 1 1
public.KnownErrors 4 0
public.McpRequestLogs 2 0
public.ModelRecommendationRules 0 0
public.OperatorSessions 1 0
public.Organizations 0 29
public.PasswordResetTokens 1 0
public.PersonProject 2 0
public.Persons 1 3
public.PluginAgents 2 0
public.PluginCommands 2 0
public.PluginProcedures 2 0
public.PluginSkills 2 0
public.Plugins 0 4
public.Procedures 2 3
public.ProjectAgentPaths 2 0
public.ProjectMembers 2 0
public.ProjectMemories 3 0
public.ProjectMetricsOverrides 1 0
public.ProjectSecrets 1 0
public.ProjectTemplates 0 0
public.Projects 3 22
public.QuickActions 3 0
public.QuickReplyTemplates 0 0
public.RemoteAgentCommands 3 0
public.RemoteAgents 2 3
public.ResourceUsages 0 0
public.ScheduledSummaries 0 1
public.ScheduledTask 6 6
public.SessionModes 1 0
public.Skills 0 1
public.SummaryHistories 1 0
public.SystemMetrics 0 0
public.SystemThresholds 0 0
public.TaskCheckpoints 1 0
public.UpeAgentConfigs 2 12
public.UpeAgentMemorySections 1 0
public.UpeAgentSkills 2 0
public.UpeAgentTools 3 0
public.UpeAutonomousTasks 1 0
public.UpeChannelBindings 2 0
public.UpeContacts 1 1
public.UpeConversationMessages 1 0
public.UpeConversations 4 4
public.UpeDataSources 1 3
public.UpeInsights 3 0
public.UpeKnowledge 3 3
public.UpeKnowledgeRelations 3 0
public.UpeKnowledgeTags 1 0
public.UpePlanningDecisions 2 0
public.UpePlanningGoals 4 2
public.UpePlanningPlans 1 2
public.UpePlanningReviews 1 0
public.UpePlanningTasks 3 1
public.UpeProactiveTriggers 2 0
public.UpeSkillDefinitions 0 1
public.UpeSourceItems 2 0
public.UpeTimelineEvents 2 0
public.UpeToolDefinitions 1 3
public.UpeToolExecutions 4 0
public.UpeToolGroupMemberships 2 0
public.UpeToolGroups 1 2
public.UserGitHubIntegrations 1 0
public.UserMemories 2 0
public.UserOrganizations 2 0
public.UserWellnessSettings 1 0
public.Users 0 22
public.WebhookTriggerLogs 3 0
public.WebhookTriggers 3 1
public.WellnessRecords 1 0
public.WhatsappGroupConfigs 0 0
public.WhatsappMessageLogs 0 0
public.WorkSessions 4 0
public.__EFMigrationsHistory 0 0
public.system_logs 0 0

Full Table Catalog

public.AIProviderConfigs

  • Estimated rows: 8
  • Dead rows: 31

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 OrganizationId uuid YES ``
3 UserId uuid YES ``
4 ProviderType character varying(50) NO ``
5 DisplayName character varying(200) YES ``
6 ApiKeyEncrypted text YES ``
7 ApiKeyMasked character varying(50) YES ``
8 CliPath character varying(500) YES ``
9 CliSessionId character varying(100) YES ``
10 DefaultModel character varying(100) YES ``
11 ConfigJson text YES ``
12 IsActive boolean NO ``
13 IsDefault boolean NO ``
14 LastUsedAt timestamp with time zone YES ``
15 CreatedAt timestamp with time zone NO ``
16 UpdatedAt timestamp with time zone NO ``

Constraints

Type Name Columns
CHECK 17249_18255_12_not_null ``
CHECK 17249_18255_13_not_null ``
CHECK 17249_18255_15_not_null ``
CHECK 17249_18255_16_not_null ``
CHECK 17249_18255_1_not_null ``
CHECK 17249_18255_4_not_null ``
FOREIGN KEY FK_AIProviderConfigs_Organizations_OrganizationId OrganizationId
FOREIGN KEY FK_AIProviderConfigs_Users_UserId UserId
PRIMARY KEY PK_AIProviderConfigs Id

Foreign Keys

Name Columns References On Update On Delete
FK_AIProviderConfigs_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION CASCADE
FK_AIProviderConfigs_Users_UserId UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_AIProviderConfigs_OrganizationId CREATE INDEX "IX_AIProviderConfigs_OrganizationId" ON public."AIProviderConfigs" USING btree ("OrganizationId")
IX_AIProviderConfigs_OrganizationId_IsDefault CREATE INDEX "IX_AIProviderConfigs_OrganizationId_IsDefault" ON public."AIProviderConfigs" USING btree ("OrganizationId", "IsDefault") WHERE ("OrganizationId" IS NOT NULL)
IX_AIProviderConfigs_UserId CREATE INDEX "IX_AIProviderConfigs_UserId" ON public."AIProviderConfigs" USING btree ("UserId")
IX_AIProviderConfigs_UserId_IsDefault CREATE INDEX "IX_AIProviderConfigs_UserId_IsDefault" ON public."AIProviderConfigs" USING btree ("UserId", "IsDefault") WHERE ("UserId" IS NOT NULL)
PK_AIProviderConfigs CREATE UNIQUE INDEX "PK_AIProviderConfigs" ON public."AIProviderConfigs" USING btree ("Id")

public.AgentReleases

  • Estimated rows: 12
  • Dead rows: 21

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Version character varying(20) NO ``
3 ReleaseNotes character varying(2000) YES ``
4 FileName character varying(100) NO ``
5 FileContent bytea NO ``
6 FileSizeBytes bigint(64,0) NO ``
7 FileHash character varying(64) NO ``
8 IsActive boolean NO false
9 IsMandatory boolean NO false
10 MinimumPreviousVersion character varying(20) YES ``
11 PublishedById uuid YES ``
12 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
13 PublishedAt timestamp with time zone YES ``
14 DownloadCount integer(32,0) NO 0

Constraints

Type Name Columns
CHECK 17249_20483_12_not_null ``
CHECK 17249_20483_14_not_null ``
CHECK 17249_20483_1_not_null ``
CHECK 17249_20483_2_not_null ``
CHECK 17249_20483_4_not_null ``
CHECK 17249_20483_5_not_null ``
CHECK 17249_20483_6_not_null ``
CHECK 17249_20483_7_not_null ``
CHECK 17249_20483_8_not_null ``
CHECK 17249_20483_9_not_null ``
FOREIGN KEY FK_AgentReleases_Users_PublishedById PublishedById
PRIMARY KEY PK_AgentReleases Id

Foreign Keys

Name Columns References On Update On Delete
FK_AgentReleases_Users_PublishedById PublishedById public.Users(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_AgentReleases_IsActive CREATE INDEX "IX_AgentReleases_IsActive" ON public."AgentReleases" USING btree ("IsActive")
IX_AgentReleases_PublishedById CREATE INDEX "IX_AgentReleases_PublishedById" ON public."AgentReleases" USING btree ("PublishedById")
IX_AgentReleases_Version CREATE UNIQUE INDEX "IX_AgentReleases_Version" ON public."AgentReleases" USING btree ("Version")
PK_AgentReleases CREATE UNIQUE INDEX "PK_AgentReleases" ON public."AgentReleases" USING btree ("Id")

public.AgentSkills

  • Estimated rows: 526
  • Dead rows: 5

Columns

# Column Type Nullable Default
1 AgentId uuid NO ``
2 Skill character varying(50) NO ``
3 Proficiency integer(32,0) NO 0

Constraints

Type Name Columns
CHECK 17249_17250_1_not_null ``
CHECK 17249_17250_2_not_null ``
CHECK 17249_17250_3_not_null ``
FOREIGN KEY FK_AgentSkills_Agents_AgentId AgentId
PRIMARY KEY PK_AgentSkills AgentId, Skill

Foreign Keys

Name Columns References On Update On Delete
FK_AgentSkills_Agents_AgentId AgentId public.Agents(Id) NO ACTION CASCADE

Indexes

Name Definition
PK_AgentSkills CREATE UNIQUE INDEX "PK_AgentSkills" ON public."AgentSkills" USING btree ("AgentId", "Skill")

public.AgentTriggers

  • Estimated rows: 5
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 AgentId uuid NO ``
3 Pattern character varying(200) NO ``
4 Priority integer(32,0) NO ``
5 TriggerType character varying(20) NO ''::character varying

Constraints

Type Name Columns
CHECK 17249_17254_1_not_null ``
CHECK 17249_17254_2_not_null ``
CHECK 17249_17254_3_not_null ``
CHECK 17249_17254_4_not_null ``
CHECK 17249_17254_5_not_null ``
FOREIGN KEY FK_AgentTriggers_Agents_AgentId AgentId
PRIMARY KEY PK_AgentTriggers Id

Foreign Keys

Name Columns References On Update On Delete
FK_AgentTriggers_Agents_AgentId AgentId public.Agents(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_AgentTriggers_AgentId CREATE INDEX "IX_AgentTriggers_AgentId" ON public."AgentTriggers" USING btree ("AgentId")
PK_AgentTriggers CREATE UNIQUE INDEX "PK_AgentTriggers" ON public."AgentTriggers" USING btree ("Id")

public.Agents

  • Estimated rows: 126
  • Dead rows: 3

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Slug character varying(50) NO ``
3 Name character varying(100) NO ``
4 Description text YES ``
5 Model character varying(50) NO ``
6 SystemPrompt text NO ``
7 IsActive boolean NO ``
8 CreatedAt timestamp with time zone NO ``
9 UpdatedAt timestamp with time zone NO ``
10 Source character varying(20) NO 'custom'::character varying

Constraints

Type Name Columns
CHECK 17249_17258_10_not_null ``
CHECK 17249_17258_1_not_null ``
CHECK 17249_17258_2_not_null ``
CHECK 17249_17258_3_not_null ``
CHECK 17249_17258_5_not_null ``
CHECK 17249_17258_6_not_null ``
CHECK 17249_17258_7_not_null ``
CHECK 17249_17258_8_not_null ``
CHECK 17249_17258_9_not_null ``
PRIMARY KEY PK_Agents Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_Agents_Slug CREATE UNIQUE INDEX "IX_Agents_Slug" ON public."Agents" USING btree ("Slug")
IX_Agents_Source CREATE INDEX "IX_Agents_Source" ON public."Agents" USING btree ("Source")
PK_Agents CREATE UNIQUE INDEX "PK_Agents" ON public."Agents" USING btree ("Id")

public.AutomationRules

  • Estimated rows: 0
  • Dead rows: 0
  • Comment: Reglas de automatización con triggers y acciones

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Name character varying(200) NO ``
3 TriggerType character varying(50) NO ``
4 TriggerValue jsonb NO ``
5 ActionType character varying(50) NO ``
6 ActionValue jsonb NO ``
7 IsActive boolean NO true
8 TimesTriggered integer(32,0) NO 0
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
10 Priority integer(32,0) NO 100
11 LastTriggeredAt timestamp with time zone YES ``
12 UpdatedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_27988_10_not_null ``
CHECK 17249_27988_1_not_null ``
CHECK 17249_27988_2_not_null ``
CHECK 17249_27988_3_not_null ``
CHECK 17249_27988_4_not_null ``
CHECK 17249_27988_5_not_null ``
CHECK 17249_27988_6_not_null ``
CHECK 17249_27988_7_not_null ``
CHECK 17249_27988_8_not_null ``
CHECK 17249_27988_9_not_null ``
PRIMARY KEY AutomationRules_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
AutomationRules_pkey CREATE UNIQUE INDEX "AutomationRules_pkey" ON public."AutomationRules" USING btree ("Id")
IX_AutomationRules_IsActive CREATE INDEX "IX_AutomationRules_IsActive" ON public."AutomationRules" USING btree ("IsActive") WHERE ("IsActive" = true)
IX_AutomationRules_TriggerType_IsActive CREATE INDEX "IX_AutomationRules_TriggerType_IsActive" ON public."AutomationRules" USING btree ("TriggerType", "IsActive")
idx_automation_rules_is_active CREATE INDEX idx_automation_rules_is_active ON public."AutomationRules" USING btree ("IsActive") WHERE ("IsActive" = true)
idx_automation_rules_last_triggered CREATE INDEX idx_automation_rules_last_triggered ON public."AutomationRules" USING btree ("LastTriggeredAt" DESC) WHERE ("LastTriggeredAt" IS NOT NULL)
idx_automation_rules_trigger_type_active CREATE INDEX idx_automation_rules_trigger_type_active ON public."AutomationRules" USING btree ("TriggerType", "IsActive")

public.BacklogAIAnalyses

  • Estimated rows: 0
  • Dead rows: 0
  • Comment: Almacena resultados del análisis de IA para items del backlog, incluyendo clasificación, estimación de esfuerzo y recomendaciones

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 BacklogItemId uuid NO ``
3 AICategory character varying(50) YES ``
4 AIPriority character varying(20) YES ``
5 AIConfidence integer(32,0) YES 0
6 EstimatedEffort character varying(10) YES ``
7 EstimatedComplexity character varying(20) YES ``
8 AffectedAreasJson jsonb YES ``
9 SuggestedAgentId character varying(100) YES ``
10 SuggestedAgentReason text YES ``
11 SuggestedProcedureId character varying(50) YES ``
12 RelatedDocsJson jsonb YES ``
13 DependenciesJson jsonb YES ``
14 AISummary text YES ``
15 AIRecommendation text YES ``
16 KeywordsJson jsonb YES ``
17 ModelUsed character varying(100) YES ``
18 TokensUsed integer(32,0) YES 0
19 AnalysisTimeMs integer(32,0) YES 0
20 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
21 UpdatedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_20073_1_not_null ``
CHECK 17249_20073_2_not_null ``
FOREIGN KEY BacklogAIAnalyses_BacklogItemId_fkey BacklogItemId
PRIMARY KEY BacklogAIAnalyses_pkey Id

Foreign Keys

Name Columns References On Update On Delete
BacklogAIAnalyses_BacklogItemId_fkey BacklogItemId public.BacklogItems(Id) NO ACTION CASCADE

Indexes

Name Definition
BacklogAIAnalyses_pkey CREATE UNIQUE INDEX "BacklogAIAnalyses_pkey" ON public."BacklogAIAnalyses" USING btree ("Id")
IX_BacklogAIAnalyses_AICategory CREATE INDEX "IX_BacklogAIAnalyses_AICategory" ON public."BacklogAIAnalyses" USING btree ("AICategory")
IX_BacklogAIAnalyses_AIPriority CREATE INDEX "IX_BacklogAIAnalyses_AIPriority" ON public."BacklogAIAnalyses" USING btree ("AIPriority")
IX_BacklogAIAnalyses_BacklogItemId CREATE INDEX "IX_BacklogAIAnalyses_BacklogItemId" ON public."BacklogAIAnalyses" USING btree ("BacklogItemId")
IX_BacklogAIAnalyses_SuggestedAgentId CREATE INDEX "IX_BacklogAIAnalyses_SuggestedAgentId" ON public."BacklogAIAnalyses" USING btree ("SuggestedAgentId")

public.BacklogItems

  • Estimated rows: 529
  • Dead rows: 27

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 ExecutionId uuid YES ``
3 ProjectId uuid YES ``
4 Title character varying(200) NO ``
5 Description text YES ``
6 ItemType character varying(50) YES ``
7 Priority character varying(20) NO ``
8 Status character varying(20) NO ``
9 MetadataJson text YES ``
10 HoldedTaskId character varying(50) YES ``
11 FollowUpTaskId uuid YES ``
12 CreatedAt timestamp with time zone NO ``
13 UpdatedAt timestamp with time zone NO ``
14 ResolvedAt timestamp with time zone YES ``
15 ConvertedToTaskId uuid YES ``
16 ConvertedAt timestamp without time zone YES ``
17 ConversionNotes text YES ``
18 ProcedureId character varying(100) YES ``
19 ProcedureName character varying(200) YES ``
20 SuggestedProcedure character varying(255) YES ``
21 AIAnalysisId uuid YES ``
22 ClickUpTaskId character varying(50) YES ``
23 ClickUpListId character varying(50) YES ``
24 ClickUpSyncedAt timestamp without time zone YES ``
25 ClickUpUrl character varying(500) YES ``
26 SentryIssueId character varying(100) YES ``
27 SentryPermalink text YES ``
28 AICategory character varying(50) YES ``
29 AISummary text YES ``
30 EstimatedEffort character varying(10) YES ``
31 Source character varying(50) YES ``

Constraints

Type Name Columns
CHECK 17249_17264_12_not_null ``
CHECK 17249_17264_13_not_null ``
CHECK 17249_17264_1_not_null ``
CHECK 17249_17264_4_not_null ``
CHECK 17249_17264_7_not_null ``
CHECK 17249_17264_8_not_null ``
FOREIGN KEY BacklogItems_AIAnalysisId_fkey AIAnalysisId
FOREIGN KEY FK_BacklogItems_ConvertedTask ConvertedToTaskId
FOREIGN KEY FK_BacklogItems_Executions_ExecutionId ExecutionId
FOREIGN KEY FK_BacklogItems_Projects_ProjectId ProjectId
FOREIGN KEY FK_BacklogItems_ScheduledTask_FollowUpTaskId FollowUpTaskId
PRIMARY KEY PK_BacklogItems Id

Foreign Keys

Name Columns References On Update On Delete
BacklogItems_AIAnalysisId_fkey AIAnalysisId public.BacklogAIAnalyses(Id) NO ACTION SET NULL
FK_BacklogItems_ConvertedTask ConvertedToTaskId public.ScheduledTask(Id) NO ACTION SET NULL
FK_BacklogItems_Executions_ExecutionId ExecutionId public.Executions(Id) NO ACTION SET NULL
FK_BacklogItems_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION SET NULL
FK_BacklogItems_ScheduledTask_FollowUpTaskId FollowUpTaskId public.ScheduledTask(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_BacklogItems_AIAnalysisId CREATE INDEX "IX_BacklogItems_AIAnalysisId" ON public."BacklogItems" USING btree ("AIAnalysisId")
IX_BacklogItems_ClickUpTaskId CREATE INDEX "IX_BacklogItems_ClickUpTaskId" ON public."BacklogItems" USING btree ("ClickUpTaskId") WHERE ("ClickUpTaskId" IS NOT NULL)
IX_BacklogItems_ConvertedToTaskId CREATE INDEX "IX_BacklogItems_ConvertedToTaskId" ON public."BacklogItems" USING btree ("ConvertedToTaskId")
IX_BacklogItems_ExecutionId CREATE INDEX "IX_BacklogItems_ExecutionId" ON public."BacklogItems" USING btree ("ExecutionId")
IX_BacklogItems_FollowUpTaskId CREATE INDEX "IX_BacklogItems_FollowUpTaskId" ON public."BacklogItems" USING btree ("FollowUpTaskId")
IX_BacklogItems_Priority CREATE INDEX "IX_BacklogItems_Priority" ON public."BacklogItems" USING btree ("Priority")
IX_BacklogItems_ProcedureId CREATE INDEX "IX_BacklogItems_ProcedureId" ON public."BacklogItems" USING btree ("ProcedureId")
IX_BacklogItems_ProjectId CREATE INDEX "IX_BacklogItems_ProjectId" ON public."BacklogItems" USING btree ("ProjectId")
IX_BacklogItems_Status CREATE INDEX "IX_BacklogItems_Status" ON public."BacklogItems" USING btree ("Status")
PK_BacklogItems CREATE UNIQUE INDEX "PK_BacklogItems" ON public."BacklogItems" USING btree ("Id")
idx_backlog_items_ai_category CREATE INDEX idx_backlog_items_ai_category ON public."BacklogItems" USING btree ("AICategory") WHERE ("AICategory" IS NOT NULL)
idx_backlog_items_sentry_issue CREATE INDEX idx_backlog_items_sentry_issue ON public."BacklogItems" USING btree ("SentryIssueId") WHERE ("SentryIssueId" IS NOT NULL)
idx_backlog_items_source CREATE INDEX idx_backlog_items_source ON public."BacklogItems" USING btree ("Source") WHERE ("Source" IS NOT NULL)

public.ChatbotConfigs

  • Estimated rows: 1
  • Dead rows: 2

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Name character varying(200) NO ``
3 SystemPrompt text NO ''::text
4 WelcomeMessage text YES ``
5 EscalationMessage text YES ``
6 EscalationPhone character varying(50) YES ``
7 Model character varying(100) NO 'claude-3-5-haiku-latest'::character varying
8 MaxResponseTokens integer(32,0) NO 1024
9 MaxDocsPerQuery integer(32,0) NO 3
10 MinRelevance double precision(53,0) NO 0.3
11 IsActive boolean NO true
12 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
13 UpdatedAt timestamp with time zone YES ``
14 OrganizationId uuid NO ``

Constraints

Type Name Columns
CHECK 17249_27469_10_not_null ``
CHECK 17249_27469_11_not_null ``
CHECK 17249_27469_12_not_null ``
CHECK 17249_27469_14_not_null ``
CHECK 17249_27469_1_not_null ``
CHECK 17249_27469_2_not_null ``
CHECK 17249_27469_3_not_null ``
CHECK 17249_27469_7_not_null ``
CHECK 17249_27469_8_not_null ``
CHECK 17249_27469_9_not_null ``
FOREIGN KEY FK_ChatbotConfigs_Organizations_OrganizationId OrganizationId
PRIMARY KEY ChatbotConfigs_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_ChatbotConfigs_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION RESTRICT

Indexes

Name Definition
ChatbotConfigs_pkey CREATE UNIQUE INDEX "ChatbotConfigs_pkey" ON public."ChatbotConfigs" USING btree ("Id")
IX_ChatbotConfigs_OrganizationId CREATE INDEX "IX_ChatbotConfigs_OrganizationId" ON public."ChatbotConfigs" USING btree ("OrganizationId")

public.ClickUpConfigs

  • Estimated rows: 2
  • Dead rows: 5

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ProjectId uuid NO ``
3 ApiToken character varying(200) YES ``
4 ClickUpTeamId character varying(50) NO ``
5 ClickUpSpaceId character varying(50) NO ``
6 ClickUpListId character varying(50) NO ``
7 ClickUpFolderId character varying(50) YES ``
8 SyncEnabled boolean NO true
9 SyncDirection character varying(20) NO 'push'::character varying
10 StatusMappingJson jsonb YES ``
11 CreatedAt timestamp with time zone NO now()
12 UpdatedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_20648_11_not_null ``
CHECK 17249_20648_1_not_null ``
CHECK 17249_20648_2_not_null ``
CHECK 17249_20648_4_not_null ``
CHECK 17249_20648_5_not_null ``
CHECK 17249_20648_6_not_null ``
CHECK 17249_20648_8_not_null ``
CHECK 17249_20648_9_not_null ``
FOREIGN KEY ClickUpConfigs_ProjectId_fkey ProjectId
PRIMARY KEY ClickUpConfigs_pkey Id
UNIQUE UQ_ClickUpConfigs_ProjectId ProjectId

Foreign Keys

Name Columns References On Update On Delete
ClickUpConfigs_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
ClickUpConfigs_pkey CREATE UNIQUE INDEX "ClickUpConfigs_pkey" ON public."ClickUpConfigs" USING btree ("Id")
UQ_ClickUpConfigs_ProjectId CREATE UNIQUE INDEX "UQ_ClickUpConfigs_ProjectId" ON public."ClickUpConfigs" USING btree ("ProjectId")

public.ClickUpSyncLogs

  • Estimated rows: 49948
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 BacklogItemId uuid YES ``
3 ProjectId uuid YES ``
4 ClickUpTaskId character varying(50) YES ``
5 Operation character varying(20) NO ``
6 Direction character varying(10) NO ``
7 Status character varying(20) NO 'pending'::character varying
8 ErrorMessage text YES ``
9 RequestPayload jsonb YES ``
10 ResponsePayload jsonb YES ``
11 DurationMs integer(32,0) YES ``
12 CreatedAt timestamp with time zone NO now()

Constraints

Type Name Columns
CHECK 17249_20666_12_not_null ``
CHECK 17249_20666_1_not_null ``
CHECK 17249_20666_5_not_null ``
CHECK 17249_20666_6_not_null ``
CHECK 17249_20666_7_not_null ``
FOREIGN KEY ClickUpSyncLogs_BacklogItemId_fkey BacklogItemId
FOREIGN KEY ClickUpSyncLogs_ProjectId_fkey ProjectId
PRIMARY KEY ClickUpSyncLogs_pkey Id

Foreign Keys

Name Columns References On Update On Delete
ClickUpSyncLogs_BacklogItemId_fkey BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
ClickUpSyncLogs_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
ClickUpSyncLogs_pkey CREATE UNIQUE INDEX "ClickUpSyncLogs_pkey" ON public."ClickUpSyncLogs" USING btree ("Id")
IX_ClickUpSyncLogs_BacklogItemId CREATE INDEX "IX_ClickUpSyncLogs_BacklogItemId" ON public."ClickUpSyncLogs" USING btree ("BacklogItemId")
IX_ClickUpSyncLogs_CreatedAt CREATE INDEX "IX_ClickUpSyncLogs_CreatedAt" ON public."ClickUpSyncLogs" USING btree ("CreatedAt" DESC)
IX_ClickUpSyncLogs_ProjectId CREATE INDEX "IX_ClickUpSyncLogs_ProjectId" ON public."ClickUpSyncLogs" USING btree ("ProjectId")
IX_ClickUpSyncLogs_Status CREATE INDEX "IX_ClickUpSyncLogs_Status" ON public."ClickUpSyncLogs" USING btree ("Status")

public.ClientRegistrations

  • Estimated rows: 3
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 FullName character varying(200) NO ``
3 Email character varying(200) NO ``
4 Phone character varying(50) YES ``
5 JobTitle character varying(100) YES ``
6 CompanyName character varying(200) NO ``
7 Industry character varying(50) YES ``
8 CompanySize character varying(20) YES ``
9 Website character varying(500) YES ``
10 Country character varying(100) YES ``
11 DevToolsJson jsonb YES ``
12 AIExperienceJson jsonb YES ``
13 PrimaryUseCase character varying(50) YES ``
14 InfrastructureJson jsonb YES ``
15 TechScore integer(32,0) NO 0
16 TechLevel character varying(20) NO 'basic'::character varying
17 Status character varying(20) NO 'pending'::character varying
18 Notes character varying(2000) YES ``
19 ReviewedById uuid YES ``
20 ReviewedAt timestamp with time zone YES ``
21 OrganizationId uuid YES ``
22 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
23 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_26130_15_not_null ``
CHECK 17249_26130_16_not_null ``
CHECK 17249_26130_17_not_null ``
CHECK 17249_26130_1_not_null ``
CHECK 17249_26130_22_not_null ``
CHECK 17249_26130_23_not_null ``
CHECK 17249_26130_2_not_null ``
CHECK 17249_26130_3_not_null ``
CHECK 17249_26130_6_not_null ``
FOREIGN KEY FK_ClientRegistrations_Organizations_OrganizationId OrganizationId
FOREIGN KEY FK_ClientRegistrations_Users_ReviewedById ReviewedById
PRIMARY KEY PK_ClientRegistrations Id

Foreign Keys

Name Columns References On Update On Delete
FK_ClientRegistrations_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION SET NULL
FK_ClientRegistrations_Users_ReviewedById ReviewedById public.Users(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_ClientRegistrations_CreatedAt CREATE INDEX "IX_ClientRegistrations_CreatedAt" ON public."ClientRegistrations" USING btree ("CreatedAt" DESC)
IX_ClientRegistrations_Email CREATE UNIQUE INDEX "IX_ClientRegistrations_Email" ON public."ClientRegistrations" USING btree ("Email")
IX_ClientRegistrations_OrganizationId CREATE INDEX "IX_ClientRegistrations_OrganizationId" ON public."ClientRegistrations" USING btree ("OrganizationId")
IX_ClientRegistrations_ReviewedById CREATE INDEX "IX_ClientRegistrations_ReviewedById" ON public."ClientRegistrations" USING btree ("ReviewedById")
IX_ClientRegistrations_Status CREATE INDEX "IX_ClientRegistrations_Status" ON public."ClientRegistrations" USING btree ("Status")
IX_ClientRegistrations_TechLevel CREATE INDEX "IX_ClientRegistrations_TechLevel" ON public."ClientRegistrations" USING btree ("TechLevel")
PK_ClientRegistrations CREATE UNIQUE INDEX "PK_ClientRegistrations" ON public."ClientRegistrations" USING btree ("Id")

public.Clients

  • Estimated rows: 8
  • Dead rows: 17

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Slug character varying(50) NO ``
3 Name character varying(100) NO ``
4 Description character varying(500) YES ``
5 IsActive boolean NO true
6 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
7 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP
8 OrganizationId uuid YES ``
9 ClientType integer(32,0) NO 0
10 Status integer(32,0) NO 1
11 Website character varying(200) YES ``
12 Email character varying(150) YES ``
13 Phone character varying(30) YES ``
14 Address character varying(300) YES ``
15 City character varying(100) YES ``
16 Country character varying(100) YES ``
17 Cif character varying(20) YES ``
18 LegalName character varying(200) YES ``
19 ContactName character varying(150) YES ``
20 ContactEmail character varying(150) YES ``
21 ContactPhone character varying(30) YES ``
22 ContactPosition character varying(100) YES ``
23 AccountManager character varying(150) YES ``
24 ClientSince timestamp with time zone YES ``
25 Notes character varying(2000) YES ``
26 BilledToClientId uuid YES ``
27 HoldedContactId character varying(50) YES ``
28 HoldedContactType character varying(50) YES ``
29 ClickUpSpaceId character varying(50) YES ``
30 ExternalIds jsonb YES ``
31 InvoiceEmail character varying(150) YES ``
32 PaymentTermsDays integer(32,0) YES ``
33 DefaultBillingType integer(32,0) YES ``
34 InternalCode character varying(50) YES ``
35 DeletedAt timestamp with time zone YES ``
36 ClickUpFolderId character varying(50) YES ``
37 SocialMedia jsonb YES ``

Constraints

Type Name Columns
CHECK 17249_66118_10_not_null ``
CHECK 17249_66118_1_not_null ``
CHECK 17249_66118_2_not_null ``
CHECK 17249_66118_3_not_null ``
CHECK 17249_66118_5_not_null ``
CHECK 17249_66118_6_not_null ``
CHECK 17249_66118_7_not_null ``
CHECK 17249_66118_9_not_null ``
FOREIGN KEY FK_Clients_Clients_BilledToClientId BilledToClientId
FOREIGN KEY FK_Clients_Organizations_OrganizationId OrganizationId
PRIMARY KEY PK_Clients Id

Foreign Keys

Name Columns References On Update On Delete
FK_Clients_Clients_BilledToClientId BilledToClientId public.Clients(Id) NO ACTION SET NULL
FK_Clients_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_Clients_BilledToClientId CREATE INDEX "IX_Clients_BilledToClientId" ON public."Clients" USING btree ("BilledToClientId")
IX_Clients_Cif CREATE INDEX "IX_Clients_Cif" ON public."Clients" USING btree ("Cif")
IX_Clients_ClientType CREATE INDEX "IX_Clients_ClientType" ON public."Clients" USING btree ("ClientType")
IX_Clients_InternalCode CREATE INDEX "IX_Clients_InternalCode" ON public."Clients" USING btree ("InternalCode")
IX_Clients_IsActive CREATE INDEX "IX_Clients_IsActive" ON public."Clients" USING btree ("IsActive")
IX_Clients_OrganizationId CREATE INDEX "IX_Clients_OrganizationId" ON public."Clients" USING btree ("OrganizationId")
IX_Clients_Slug CREATE UNIQUE INDEX "IX_Clients_Slug" ON public."Clients" USING btree ("Slug")
IX_Clients_Status CREATE INDEX "IX_Clients_Status" ON public."Clients" USING btree ("Status")
PK_Clients CREATE UNIQUE INDEX "PK_Clients" ON public."Clients" USING btree ("Id")

public.Commands

  • Estimated rows: 64
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id character varying(100) NO ``
2 Name character varying(200) NO ``
3 Description text YES ``
4 Category character varying(50) YES ``
5 ContentMd text NO ''::text
6 ContentPath character varying(500) YES ``
7 IsActive boolean NO true
8 CreatedAt timestamp with time zone NO now()
9 UpdatedAt timestamp with time zone NO now()
10 UsageCount integer(32,0) NO 0
11 LastUsedAt timestamp with time zone YES ``
12 Source character varying(20) NO 'custom'::character varying

Constraints

Type Name Columns
CHECK 17249_17269_10_not_null ``
CHECK 17249_17269_12_not_null ``
CHECK 17249_17269_1_not_null ``
CHECK 17249_17269_2_not_null ``
CHECK 17249_17269_5_not_null ``
CHECK 17249_17269_7_not_null ``
CHECK 17249_17269_8_not_null ``
CHECK 17249_17269_9_not_null ``
PRIMARY KEY Commands_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
Commands_pkey CREATE UNIQUE INDEX "Commands_pkey" ON public."Commands" USING btree ("Id")
IX_Commands_Category CREATE INDEX "IX_Commands_Category" ON public."Commands" USING btree ("Category")
IX_Commands_Source CREATE INDEX "IX_Commands_Source" ON public."Commands" USING btree ("Source")

public.CommunicationChannels

  • Estimated rows: 1
  • Dead rows: 0
  • Comment: Canales de comunicacion (email, teams, slack) por organizacion

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 ChannelType character varying(20) NO ``
4 Name character varying(100) NO ``
5 IsDefault boolean NO false
6 IsActive boolean NO true
7 CredentialsJson text YES ``
8 ConfigJson text YES ``
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
10 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP
11 Description text YES ``

Constraints

Type Name Columns
CHECK 17249_17280_10_not_null ``
CHECK 17249_17280_1_not_null ``
CHECK 17249_17280_2_not_null ``
CHECK 17249_17280_3_not_null ``
CHECK 17249_17280_4_not_null ``
CHECK 17249_17280_5_not_null ``
CHECK 17249_17280_6_not_null ``
CHECK 17249_17280_9_not_null ``
FOREIGN KEY CommunicationChannels_OrganizationId_fkey OrganizationId
PRIMARY KEY CommunicationChannels_pkey Id

Foreign Keys

Name Columns References On Update On Delete
CommunicationChannels_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
CommunicationChannels_pkey CREATE UNIQUE INDEX "CommunicationChannels_pkey" ON public."CommunicationChannels" USING btree ("Id")
IX_CommunicationChannels_ChannelType CREATE INDEX "IX_CommunicationChannels_ChannelType" ON public."CommunicationChannels" USING btree ("ChannelType")
IX_CommunicationChannels_OrganizationId CREATE INDEX "IX_CommunicationChannels_OrganizationId" ON public."CommunicationChannels" USING btree ("OrganizationId")

public.ContextSnippets

  • Estimated rows: 9
  • Dead rows: 0
  • Comment: Fragmentos de contexto guardados (código, URLs, notas) para uso rápido en Workspace

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 Title character varying(100) NO ``
4 Content text NO ``
5 SnippetType character varying(30) NO 'Note'::character varying
6 Language character varying(30) YES ``
7 Tags character varying(200) YES ``
8 Color character varying(20) NO 'Default'::character varying
9 Icon character varying(50) NO 'ContentCopy'::character varying
10 IsPinned boolean NO false
11 SortOrder integer(32,0) NO 0
12 ProjectId uuid YES ``
13 DevSessionId uuid YES ``
14 BacklogItemId uuid YES ``
15 UsageCount integer(32,0) NO 0
16 LastUsedAt timestamp with time zone YES ``
17 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
18 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_20104_10_not_null ``
CHECK 17249_20104_11_not_null ``
CHECK 17249_20104_15_not_null ``
CHECK 17249_20104_17_not_null ``
CHECK 17249_20104_18_not_null ``
CHECK 17249_20104_1_not_null ``
CHECK 17249_20104_2_not_null ``
CHECK 17249_20104_3_not_null ``
CHECK 17249_20104_4_not_null ``
CHECK 17249_20104_5_not_null ``
CHECK 17249_20104_8_not_null ``
CHECK 17249_20104_9_not_null ``
FOREIGN KEY FK_ContextSnippets_BacklogItems BacklogItemId
FOREIGN KEY FK_ContextSnippets_DevSessions DevSessionId
FOREIGN KEY FK_ContextSnippets_Projects ProjectId
FOREIGN KEY FK_ContextSnippets_Users UserId
PRIMARY KEY ContextSnippets_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_ContextSnippets_BacklogItems BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
FK_ContextSnippets_DevSessions DevSessionId public.DevSessions(Id) NO ACTION SET NULL
FK_ContextSnippets_Projects ProjectId public.Projects(Id) NO ACTION SET NULL
FK_ContextSnippets_Users UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
ContextSnippets_pkey CREATE UNIQUE INDEX "ContextSnippets_pkey" ON public."ContextSnippets" USING btree ("Id")
IX_ContextSnippets_DevSessionId CREATE INDEX "IX_ContextSnippets_DevSessionId" ON public."ContextSnippets" USING btree ("DevSessionId") WHERE ("DevSessionId" IS NOT NULL)
IX_ContextSnippets_LastUsedAt CREATE INDEX "IX_ContextSnippets_LastUsedAt" ON public."ContextSnippets" USING btree ("UserId", "LastUsedAt" DESC NULLS LAST)
IX_ContextSnippets_ProjectId CREATE INDEX "IX_ContextSnippets_ProjectId" ON public."ContextSnippets" USING btree ("ProjectId") WHERE ("ProjectId" IS NOT NULL)
IX_ContextSnippets_UserId_IsPinned CREATE INDEX "IX_ContextSnippets_UserId_IsPinned" ON public."ContextSnippets" USING btree ("UserId", "IsPinned" DESC, "SortOrder")
IX_ContextSnippets_UserId_SnippetType CREATE INDEX "IX_ContextSnippets_UserId_SnippetType" ON public."ContextSnippets" USING btree ("UserId", "SnippetType")

public.CopilotBatchExecutions

  • Estimated rows: 23
  • Dead rows: 28

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 SessionId uuid NO ``
4 ProjectId uuid YES ``
5 State integer(32,0) NO 0
6 BacklogItemIdsJson text NO '[]'::text
7 CurrentTaskIndex integer(32,0) NO 0
8 TotalTasks integer(32,0) NO 0
9 CompletedTasks integer(32,0) NO 0
10 FailedTasks integer(32,0) NO 0
11 SkippedTasks integer(32,0) NO 0
12 CurrentCopilotExecutionId uuid YES ``
13 TaskResultsJson text NO '[]'::text
14 Summary text YES ``
15 ErrorMessage text YES ``
16 CreatedAt timestamp with time zone NO now()
17 StartedAt timestamp with time zone YES ``
18 CompletedAt timestamp with time zone YES ``
19 PausedAt timestamp with time zone YES ``
20 UpdatedAt timestamp with time zone NO now()

Constraints

Type Name Columns
CHECK 17249_21176_10_not_null ``
CHECK 17249_21176_11_not_null ``
CHECK 17249_21176_13_not_null ``
CHECK 17249_21176_16_not_null ``
CHECK 17249_21176_1_not_null ``
CHECK 17249_21176_20_not_null ``
CHECK 17249_21176_2_not_null ``
CHECK 17249_21176_3_not_null ``
CHECK 17249_21176_5_not_null ``
CHECK 17249_21176_6_not_null ``
CHECK 17249_21176_7_not_null ``
CHECK 17249_21176_8_not_null ``
CHECK 17249_21176_9_not_null ``
PRIMARY KEY CopilotBatchExecutions_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
CopilotBatchExecutions_pkey CREATE UNIQUE INDEX "CopilotBatchExecutions_pkey" ON public."CopilotBatchExecutions" USING btree ("Id")
idx_copilot_batch_created CREATE INDEX idx_copilot_batch_created ON public."CopilotBatchExecutions" USING btree ("CreatedAt" DESC)
idx_copilot_batch_session CREATE INDEX idx_copilot_batch_session ON public."CopilotBatchExecutions" USING btree ("SessionId")
idx_copilot_batch_state CREATE INDEX idx_copilot_batch_state ON public."CopilotBatchExecutions" USING btree ("State")
idx_copilot_batch_user CREATE INDEX idx_copilot_batch_user ON public."CopilotBatchExecutions" USING btree ("UserId")

public.CopilotExecutions

  • Estimated rows: 127
  • Dead rows: 24
  • Comment: Ejecuciones del Copiloto Autónomo - meta-agente que ejecuta tareas complejas

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 DevSessionId uuid NO ``
3 UserId uuid NO ``
4 Objective text NO ``
5 ObjectiveContext text YES ``
6 ProjectContext text YES ``
7 PlanSummary text YES ``
8 PlanReasoning text YES ``
9 TotalSteps integer(32,0) NO 0
10 CurrentStepIndex integer(32,0) NO 0
11 CompletedSteps integer(32,0) NO 0
12 FailedSteps integer(32,0) NO 0
13 State integer(32,0) NO 0
14 StateMessage text YES ``
15 LastStateChange timestamp with time zone YES ``
16 LastError text YES ``
17 AutoApprove boolean NO false
18 AutoContinue boolean NO true
19 PauseOnWarning boolean NO true
20 MaxIterations integer(32,0) NO 50
21 MaxRetries integer(32,0) NO 3
22 TimeoutMinutes integer(32,0) NO 30
23 StepTimeoutSeconds integer(32,0) NO 180
24 TotalIterations integer(32,0) NO 0
25 TotalTokensUsed integer(32,0) NO 0
26 TotalMessagesGenerated integer(32,0) NO 0
27 TotalRetriesUsed integer(32,0) NO 0
28 TotalDurationMs bigint(64,0) NO 0
29 CreatedAt timestamp with time zone NO now()
30 StartedAt timestamp with time zone YES ``
31 CompletedAt timestamp with time zone YES ``
32 PausedAt timestamp with time zone YES ``
33 Result integer(32,0) NO 0
34 ResultSummary text YES ``
35 ArtifactsJson jsonb YES ``
36 WarningsJson jsonb YES ``
37 BatchId uuid YES ``
38 BatchBacklogItemId uuid YES ``
39 NeedsInputAutoRespondSeconds integer(32,0) NO 0
40 NeedsInputAutoResponseText text YES ``
41 NeedsInputAutoSkipStep boolean NO false

Constraints

Type Name Columns
CHECK 17249_20785_10_not_null ``
CHECK 17249_20785_11_not_null ``
CHECK 17249_20785_12_not_null ``
CHECK 17249_20785_13_not_null ``
CHECK 17249_20785_17_not_null ``
CHECK 17249_20785_18_not_null ``
CHECK 17249_20785_19_not_null ``
CHECK 17249_20785_1_not_null ``
CHECK 17249_20785_20_not_null ``
CHECK 17249_20785_21_not_null ``
CHECK 17249_20785_22_not_null ``
CHECK 17249_20785_23_not_null ``
CHECK 17249_20785_24_not_null ``
CHECK 17249_20785_25_not_null ``
CHECK 17249_20785_26_not_null ``
CHECK 17249_20785_27_not_null ``
CHECK 17249_20785_28_not_null ``
CHECK 17249_20785_29_not_null ``
CHECK 17249_20785_2_not_null ``
CHECK 17249_20785_33_not_null ``
CHECK 17249_20785_39_not_null ``
CHECK 17249_20785_3_not_null ``
CHECK 17249_20785_41_not_null ``
CHECK 17249_20785_4_not_null ``
CHECK 17249_20785_9_not_null ``
FOREIGN KEY CopilotExecutions_DevSessionId_fkey DevSessionId
FOREIGN KEY CopilotExecutions_UserId_fkey UserId
PRIMARY KEY CopilotExecutions_pkey Id

Foreign Keys

Name Columns References On Update On Delete
CopilotExecutions_DevSessionId_fkey DevSessionId public.DevSessions(Id) NO ACTION CASCADE
CopilotExecutions_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
CopilotExecutions_pkey CREATE UNIQUE INDEX "CopilotExecutions_pkey" ON public."CopilotExecutions" USING btree ("Id")
IX_CopilotExecutions_BatchId CREATE INDEX "IX_CopilotExecutions_BatchId" ON public."CopilotExecutions" USING btree ("BatchId") WHERE ("BatchId" IS NOT NULL)
IX_CopilotExecutions_CreatedAt CREATE INDEX "IX_CopilotExecutions_CreatedAt" ON public."CopilotExecutions" USING btree ("CreatedAt" DESC)
IX_CopilotExecutions_DevSessionId CREATE INDEX "IX_CopilotExecutions_DevSessionId" ON public."CopilotExecutions" USING btree ("DevSessionId")
IX_CopilotExecutions_State CREATE INDEX "IX_CopilotExecutions_State" ON public."CopilotExecutions" USING btree ("State")
IX_CopilotExecutions_UserId CREATE INDEX "IX_CopilotExecutions_UserId" ON public."CopilotExecutions" USING btree ("UserId")

public.CopilotSteps

  • Estimated rows: 374
  • Dead rows: 101
  • Comment: Pasos individuales de una ejecución del Copiloto

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ExecutionId uuid NO ``
3 Order integer(32,0) NO ``
4 Title character varying(200) NO ``
5 Description text NO ``
6 ExpectedOutcome text YES ``
7 VerificationCriteria text YES ``
8 PromptTemplate text YES ``
9 PrerequisitesJson jsonb YES ``
10 Category character varying(50) YES ``
11 Status integer(32,0) NO 0
12 GeneratedPrompt text YES ``
13 SentMessageId uuid YES ``
14 ResponseMessageId uuid YES ``
15 ResponseContent text YES ``
16 ResponseSummary text YES ``
17 ResponseTokens integer(32,0) NO 0
18 WasSuccessful boolean YES ``
19 ConfidenceScore double precision(53,0) YES ``
20 EvaluationNotes text YES ``
21 FailureReason text YES ``
22 AdjustmentMade text YES ``
23 RetryCount integer(32,0) NO 0
24 StartedAt timestamp with time zone YES ``
25 CompletedAt timestamp with time zone YES ``
26 DurationMs bigint(64,0) NO 0

Constraints

Type Name Columns
CHECK 17249_20826_11_not_null ``
CHECK 17249_20826_17_not_null ``
CHECK 17249_20826_1_not_null ``
CHECK 17249_20826_23_not_null ``
CHECK 17249_20826_26_not_null ``
CHECK 17249_20826_2_not_null ``
CHECK 17249_20826_3_not_null ``
CHECK 17249_20826_4_not_null ``
CHECK 17249_20826_5_not_null ``
FOREIGN KEY CopilotSteps_ExecutionId_fkey ExecutionId
PRIMARY KEY CopilotSteps_pkey Id

Foreign Keys

Name Columns References On Update On Delete
CopilotSteps_ExecutionId_fkey ExecutionId public.CopilotExecutions(Id) NO ACTION CASCADE

Indexes

Name Definition
CopilotSteps_pkey CREATE UNIQUE INDEX "CopilotSteps_pkey" ON public."CopilotSteps" USING btree ("Id")
IX_CopilotSteps_ExecutionId CREATE INDEX "IX_CopilotSteps_ExecutionId" ON public."CopilotSteps" USING btree ("ExecutionId")
IX_CopilotSteps_ExecutionId_Order CREATE UNIQUE INDEX "IX_CopilotSteps_ExecutionId_Order" ON public."CopilotSteps" USING btree ("ExecutionId", "Order")
IX_CopilotSteps_Status CREATE INDEX "IX_CopilotSteps_Status" ON public."CopilotSteps" USING btree ("Status")

public.DevSessionMessages

  • Estimated rows: 6591
  • Dead rows: 14

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 SessionId uuid NO ``
3 Role character varying(20) NO ``
4 Content text NO ``
5 ContentType character varying(20) NO ``
6 EnrichedWith character varying(500) YES ``
7 TokenCount integer(32,0) YES ``
8 DurationMs double precision(53,0) YES ``
9 Model character varying(50) YES ``
10 ToolName character varying(100) YES ``
11 ToolInput text YES ``
12 ToolOutput text YES ``
13 CreatedAt timestamp with time zone NO ``
14 CompletedAt timestamp with time zone YES ``
15 ProviderSource text YES ``
16 ProviderType text YES ``
17 FeedbackEventId uuid YES ``

Constraints

Type Name Columns
CHECK 17249_18214_13_not_null ``
CHECK 17249_18214_1_not_null ``
CHECK 17249_18214_2_not_null ``
CHECK 17249_18214_3_not_null ``
CHECK 17249_18214_4_not_null ``
CHECK 17249_18214_5_not_null ``
FOREIGN KEY FK_DevSessionMessages_DevSessions_SessionId SessionId
PRIMARY KEY PK_DevSessionMessages Id

Foreign Keys

Name Columns References On Update On Delete
FK_DevSessionMessages_DevSessions_SessionId SessionId public.DevSessions(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_DevSessionMessages_CreatedAt CREATE INDEX "IX_DevSessionMessages_CreatedAt" ON public."DevSessionMessages" USING btree ("CreatedAt")
IX_DevSessionMessages_FeedbackEventId CREATE INDEX "IX_DevSessionMessages_FeedbackEventId" ON public."DevSessionMessages" USING btree ("FeedbackEventId") WHERE ("FeedbackEventId" IS NOT NULL)
IX_DevSessionMessages_SessionId CREATE INDEX "IX_DevSessionMessages_SessionId" ON public."DevSessionMessages" USING btree ("SessionId")
PK_DevSessionMessages CREATE UNIQUE INDEX "PK_DevSessionMessages" ON public."DevSessionMessages" USING btree ("Id")

public.DevSessions

  • Estimated rows: 200
  • Dead rows: 67

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Name character varying(200) NO ``
3 Description character varying(1000) YES ``
4 ProjectId uuid YES ``
5 AgentId character varying(100) YES ``
6 PluginId character varying(100) YES ``
7 UserId uuid NO ``
8 OrganizationId uuid YES ``
9 Status character varying(20) NO ``
10 MessageCount integer(32,0) NO 0
11 TokensUsed integer(32,0) NO 0
12 CreatedAt timestamp with time zone NO ``
13 LastActivityAt timestamp with time zone YES ``
14 CompletedAt timestamp with time zone YES ``
15 BacklogItemId uuid YES ``
16 WorkStartedAt timestamp with time zone YES ``
17 WorkEndedAt timestamp with time zone YES ``
18 RemoteAgentId uuid YES ``
19 SessionInstructions text YES ``
20 InjectSessionInstructions boolean NO true
21 MaxHistoryMessages integer(32,0) NO 20
22 MaxHistoryTokens integer(32,0) NO 50000
23 AutoSummarizeHistory boolean NO true
24 HistorySummary text YES ``
25 HistorySummaryGeneratedAt timestamp with time zone YES ``
26 HistorySummaryMessageCount integer(32,0) NO 0
27 ExecutionMode character varying(20) NO 'local'::character varying
28 CloudWorkspacePath character varying(500) YES ``
29 CloudBranchName character varying(200) YES ``
30 CloudPullRequestUrl character varying(500) YES ``
31 CloudWorkspaceStatus character varying(30) YES ``

Constraints

Type Name Columns
CHECK 17249_18190_10_not_null ``
CHECK 17249_18190_11_not_null ``
CHECK 17249_18190_12_not_null ``
CHECK 17249_18190_1_not_null ``
CHECK 17249_18190_20_not_null ``
CHECK 17249_18190_21_not_null ``
CHECK 17249_18190_22_not_null ``
CHECK 17249_18190_23_not_null ``
CHECK 17249_18190_26_not_null ``
CHECK 17249_18190_27_not_null ``
CHECK 17249_18190_2_not_null ``
CHECK 17249_18190_7_not_null ``
CHECK 17249_18190_9_not_null ``
FOREIGN KEY FK_DevSessions_BacklogItems_BacklogItemId BacklogItemId
FOREIGN KEY FK_DevSessions_Organizations_OrganizationId OrganizationId
FOREIGN KEY FK_DevSessions_Projects_ProjectId ProjectId
FOREIGN KEY FK_DevSessions_RemoteAgents_RemoteAgentId RemoteAgentId
FOREIGN KEY FK_DevSessions_Users_UserId UserId
PRIMARY KEY PK_DevSessions Id

Foreign Keys

Name Columns References On Update On Delete
FK_DevSessions_BacklogItems_BacklogItemId BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
FK_DevSessions_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION SET NULL
FK_DevSessions_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION SET NULL
FK_DevSessions_RemoteAgents_RemoteAgentId RemoteAgentId public.RemoteAgents(Id) NO ACTION SET NULL
FK_DevSessions_Users_UserId UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_DevSessions_BacklogItemId CREATE INDEX "IX_DevSessions_BacklogItemId" ON public."DevSessions" USING btree ("BacklogItemId")
IX_DevSessions_CloudWorkspaceStatus CREATE INDEX "IX_DevSessions_CloudWorkspaceStatus" ON public."DevSessions" USING btree ("CloudWorkspaceStatus") WHERE ("CloudWorkspaceStatus" IS NOT NULL)
IX_DevSessions_CreatedAt CREATE INDEX "IX_DevSessions_CreatedAt" ON public."DevSessions" USING btree ("CreatedAt")
IX_DevSessions_ExecutionMode CREATE INDEX "IX_DevSessions_ExecutionMode" ON public."DevSessions" USING btree ("ExecutionMode")
IX_DevSessions_RemoteAgentId CREATE INDEX "IX_DevSessions_RemoteAgentId" ON public."DevSessions" USING btree ("RemoteAgentId")
IX_DevSessions_Status CREATE INDEX "IX_DevSessions_Status" ON public."DevSessions" USING btree ("Status")
IX_DevSessions_UserId CREATE INDEX "IX_DevSessions_UserId" ON public."DevSessions" USING btree ("UserId")
PK_DevSessions CREATE UNIQUE INDEX "PK_DevSessions" ON public."DevSessions" USING btree ("Id")
  • Estimated rows: 808
  • Dead rows: 0
  • Comment: Vincula documentos del proyecto con keywords para contextualización automática

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ProjectId uuid NO ``
3 Keywords character varying(500) NO ``
4 DocumentPath character varying(500) NO ``
5 Description text YES ``
6 RelevanceWeight double precision(53,0) NO 0.5
7 MaxTokens integer(32,0) NO 2000
8 Category character varying(50) YES ``
9 IsActive boolean NO true
10 UsageCount integer(32,0) NO 0
11 LastUsedAt timestamp with time zone YES ``
12 CreatedAt timestamp with time zone NO now()
13 UpdatedAt timestamp with time zone YES ``
14 LastDiscoveredAt timestamp with time zone YES ``
15 FeedbackScore double precision(53,0) NO 1.0

Constraints

Type Name Columns
CHECK 17249_20755_10_not_null ``
CHECK 17249_20755_12_not_null ``
CHECK 17249_20755_15_not_null ``
CHECK 17249_20755_1_not_null ``
CHECK 17249_20755_2_not_null ``
CHECK 17249_20755_3_not_null ``
CHECK 17249_20755_4_not_null ``
CHECK 17249_20755_6_not_null ``
CHECK 17249_20755_7_not_null ``
CHECK 17249_20755_9_not_null ``
FOREIGN KEY DocumentContextLinks_ProjectId_fkey ProjectId
PRIMARY KEY DocumentContextLinks_pkey Id

Foreign Keys

Name Columns References On Update On Delete
DocumentContextLinks_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
DocumentContextLinks_pkey CREATE UNIQUE INDEX "DocumentContextLinks_pkey" ON public."DocumentContextLinks" USING btree ("Id")
IX_DocumentContextLinks_Category CREATE INDEX "IX_DocumentContextLinks_Category" ON public."DocumentContextLinks" USING btree ("Category")
IX_DocumentContextLinks_FeedbackScore CREATE INDEX "IX_DocumentContextLinks_FeedbackScore" ON public."DocumentContextLinks" USING btree ("ProjectId", "FeedbackScore" DESC) WHERE ("FeedbackScore" <> (1.0)::double precision)
IX_DocumentContextLinks_IsActive CREATE INDEX "IX_DocumentContextLinks_IsActive" ON public."DocumentContextLinks" USING btree ("IsActive") WHERE ("IsActive" = true)
IX_DocumentContextLinks_ProjectId CREATE INDEX "IX_DocumentContextLinks_ProjectId" ON public."DocumentContextLinks" USING btree ("ProjectId")

public.Executions

  • Estimated rows: 804
  • Dead rows: 25

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 TaskId uuid YES ``
3 TaskName character varying(100) NO ``
4 ProcedureId character varying(100) YES ``
5 ProjectId uuid YES ``
6 StartedAt timestamp with time zone NO ``
7 CompletedAt timestamp with time zone YES ``
8 DurationMinutes integer(32,0) YES ``
9 Status character varying(20) NO ``
10 Source character varying(20) NO ``
11 Success boolean YES ``
12 ErrorMessage text YES ``
13 OutputSummary text YES ``
14 OutputFull text YES ``
15 HoldedTaskId character varying(50) YES ``
16 CreatedAt timestamp with time zone NO ``
17 HasStructuredOutput boolean NO false
18 StructuredOutputJson text YES ``
19 ResultType character varying(50) YES ``
20 MetricsJson text YES ``
21 IssuesFound integer(32,0) YES ``
22 IssuesResolved integer(32,0) YES ``
23 BacklogItemsGenerated integer(32,0) YES ``
24 TriggeredBy character varying(20) YES 'scheduler'::character varying
25 TriggeredByUser character varying(100) YES ``
26 PromptPayloadJson text YES ``

Constraints

Type Name Columns
CHECK 17249_17290_10_not_null ``
CHECK 17249_17290_16_not_null ``
CHECK 17249_17290_17_not_null ``
CHECK 17249_17290_1_not_null ``
CHECK 17249_17290_3_not_null ``
CHECK 17249_17290_6_not_null ``
CHECK 17249_17290_9_not_null ``
FOREIGN KEY FK_Executions_Projects_ProjectId ProjectId
FOREIGN KEY FK_Executions_ScheduledTask_TaskId TaskId
PRIMARY KEY PK_Executions Id

Foreign Keys

Name Columns References On Update On Delete
FK_Executions_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION SET NULL
FK_Executions_ScheduledTask_TaskId TaskId public.ScheduledTask(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_Executions_HasStructuredOutput CREATE INDEX "IX_Executions_HasStructuredOutput" ON public."Executions" USING btree ("HasStructuredOutput")
IX_Executions_ProjectId CREATE INDEX "IX_Executions_ProjectId" ON public."Executions" USING btree ("ProjectId")
IX_Executions_ResultType CREATE INDEX "IX_Executions_ResultType" ON public."Executions" USING btree ("ResultType")
IX_Executions_StartedAt CREATE INDEX "IX_Executions_StartedAt" ON public."Executions" USING btree ("StartedAt")
IX_Executions_Status CREATE INDEX "IX_Executions_Status" ON public."Executions" USING btree ("Status")
IX_Executions_TaskId CREATE INDEX "IX_Executions_TaskId" ON public."Executions" USING btree ("TaskId")
IX_Executions_TriggeredBy CREATE INDEX "IX_Executions_TriggeredBy" ON public."Executions" USING btree ("TriggeredBy")
PK_Executions CREATE UNIQUE INDEX "PK_Executions" ON public."Executions" USING btree ("Id")

public.FeedbackEvents

  • Estimated rows: 446
  • Dead rows: 0
  • Comment: Tracks metrics and user feedback for each AI interaction in the dev session pipeline

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 DevSessionId uuid NO ``
3 UserId uuid NO ``
4 ProjectId uuid YES ``
5 DetectedIntent character varying(50) YES ``
6 IntentConfidence double precision(53,0) NO 0
7 ModelUsed character varying(100) YES ``
8 ProviderType character varying(50) YES ``
9 InputTokens integer(32,0) NO 0
10 OutputTokens integer(32,0) NO 0
11 DurationMs double precision(53,0) NO 0
12 ContextDocsCount integer(32,0) NO 0
13 ContextDocPaths text YES ``
14 MemoriesInjectedCount integer(32,0) NO 0
15 UserFeedback boolean YES ``
16 FeedbackText character varying(500) YES ``
17 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_38898_10_not_null ``
CHECK 17249_38898_11_not_null ``
CHECK 17249_38898_12_not_null ``
CHECK 17249_38898_14_not_null ``
CHECK 17249_38898_17_not_null ``
CHECK 17249_38898_1_not_null ``
CHECK 17249_38898_2_not_null ``
CHECK 17249_38898_3_not_null ``
CHECK 17249_38898_6_not_null ``
CHECK 17249_38898_9_not_null ``
CHECK CK_FeedbackEvents_FeedbackText_Length ``
FOREIGN KEY FeedbackEvents_DevSessionId_fkey DevSessionId
FOREIGN KEY FeedbackEvents_ProjectId_fkey ProjectId
FOREIGN KEY FeedbackEvents_UserId_fkey UserId
PRIMARY KEY FeedbackEvents_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FeedbackEvents_DevSessionId_fkey DevSessionId public.DevSessions(Id) NO ACTION CASCADE
FeedbackEvents_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION SET NULL
FeedbackEvents_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
FeedbackEvents_pkey CREATE UNIQUE INDEX "FeedbackEvents_pkey" ON public."FeedbackEvents" USING btree ("Id")
IX_FeedbackEvents_CreatedAt CREATE INDEX "IX_FeedbackEvents_CreatedAt" ON public."FeedbackEvents" USING btree ("CreatedAt" DESC)
IX_FeedbackEvents_DetectedIntent CREATE INDEX "IX_FeedbackEvents_DetectedIntent" ON public."FeedbackEvents" USING btree ("DetectedIntent") WHERE ("DetectedIntent" IS NOT NULL)
IX_FeedbackEvents_DevSessionId CREATE INDEX "IX_FeedbackEvents_DevSessionId" ON public."FeedbackEvents" USING btree ("DevSessionId")
IX_FeedbackEvents_ModelUsed_DetectedIntent CREATE INDEX "IX_FeedbackEvents_ModelUsed_DetectedIntent" ON public."FeedbackEvents" USING btree ("ModelUsed", "DetectedIntent") WHERE ("ModelUsed" IS NOT NULL)
IX_FeedbackEvents_ProjectId CREATE INDEX "IX_FeedbackEvents_ProjectId" ON public."FeedbackEvents" USING btree ("ProjectId") WHERE ("ProjectId" IS NOT NULL)
IX_FeedbackEvents_ProjectId_CreatedAt CREATE INDEX "IX_FeedbackEvents_ProjectId_CreatedAt" ON public."FeedbackEvents" USING btree ("ProjectId", "CreatedAt" DESC) WHERE ("ProjectId" IS NOT NULL)
IX_FeedbackEvents_UserFeedback CREATE INDEX "IX_FeedbackEvents_UserFeedback" ON public."FeedbackEvents" USING btree ("UserFeedback") WHERE ("UserFeedback" IS NOT NULL)
IX_FeedbackEvents_UserFeedback_Pending CREATE INDEX "IX_FeedbackEvents_UserFeedback_Pending" ON public."FeedbackEvents" USING btree ("DevSessionId", "CreatedAt" DESC) WHERE ("UserFeedback" IS NULL)
IX_FeedbackEvents_UserId CREATE INDEX "IX_FeedbackEvents_UserId" ON public."FeedbackEvents" USING btree ("UserId")

public.KnowledgeDocumentSources

  • Estimated rows: 0
  • Dead rows: 0
  • Comment: Mapeo filesystem ↔ BD para sincronización automática

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 KnowledgeDocumentId uuid NO ``
3 FilePath character varying(500) NO ``
4 FileHash character varying(64) NO ``
5 LastSyncedAt timestamp with time zone NO CURRENT_TIMESTAMP
6 AutoSync boolean NO true

Constraints

Type Name Columns
CHECK 17249_27937_1_not_null ``
CHECK 17249_27937_2_not_null ``
CHECK 17249_27937_3_not_null ``
CHECK 17249_27937_4_not_null ``
CHECK 17249_27937_5_not_null ``
CHECK 17249_27937_6_not_null ``
FOREIGN KEY KnowledgeDocumentSources_KnowledgeDocumentId_fkey KnowledgeDocumentId
PRIMARY KEY KnowledgeDocumentSources_pkey Id
UNIQUE KnowledgeDocumentSources_FilePath_key FilePath

Foreign Keys

Name Columns References On Update On Delete
KnowledgeDocumentSources_KnowledgeDocumentId_fkey KnowledgeDocumentId public.KnowledgeDocuments(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_KnowledgeDocumentSources_FilePath CREATE UNIQUE INDEX "IX_KnowledgeDocumentSources_FilePath" ON public."KnowledgeDocumentSources" USING btree ("FilePath")
IX_KnowledgeDocumentSources_KnowledgeDocumentId CREATE INDEX "IX_KnowledgeDocumentSources_KnowledgeDocumentId" ON public."KnowledgeDocumentSources" USING btree ("KnowledgeDocumentId")
KnowledgeDocumentSources_FilePath_key CREATE UNIQUE INDEX "KnowledgeDocumentSources_FilePath_key" ON public."KnowledgeDocumentSources" USING btree ("FilePath")
KnowledgeDocumentSources_pkey CREATE UNIQUE INDEX "KnowledgeDocumentSources_pkey" ON public."KnowledgeDocumentSources" USING btree ("Id")
idx_knowledge_document_sources_document_id CREATE INDEX idx_knowledge_document_sources_document_id ON public."KnowledgeDocumentSources" USING btree ("KnowledgeDocumentId")
idx_knowledge_document_sources_file_path CREATE UNIQUE INDEX idx_knowledge_document_sources_file_path ON public."KnowledgeDocumentSources" USING btree ("FilePath")

public.KnowledgeDocuments

  • Estimated rows: 6
  • Dead rows: 28

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Title character varying(500) NO ``
3 Content text NO ''::text
4 Source character varying(50) NO 'manual'::character varying
5 SourceUrl character varying(1000) YES ``
6 Keywords character varying(1000) NO ''::character varying
7 Category character varying(100) NO 'general'::character varying
8 RelevanceWeight double precision(53,0) NO 0.5
9 MaxTokens integer(32,0) NO 2000
10 IsActive boolean NO true
11 UsageCount integer(32,0) NO 0
12 LastUsedAt timestamp with time zone YES ``
13 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
14 UpdatedAt timestamp with time zone YES ``
15 OrganizationId uuid NO ``

Constraints

Type Name Columns
CHECK 17249_27449_10_not_null ``
CHECK 17249_27449_11_not_null ``
CHECK 17249_27449_13_not_null ``
CHECK 17249_27449_15_not_null ``
CHECK 17249_27449_1_not_null ``
CHECK 17249_27449_2_not_null ``
CHECK 17249_27449_3_not_null ``
CHECK 17249_27449_4_not_null ``
CHECK 17249_27449_6_not_null ``
CHECK 17249_27449_7_not_null ``
CHECK 17249_27449_8_not_null ``
CHECK 17249_27449_9_not_null ``
FOREIGN KEY FK_KnowledgeDocuments_Organizations_OrganizationId OrganizationId
PRIMARY KEY KnowledgeDocuments_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_KnowledgeDocuments_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION RESTRICT

Indexes

Name Definition
IX_KnowledgeDocuments_Category CREATE INDEX "IX_KnowledgeDocuments_Category" ON public."KnowledgeDocuments" USING btree ("Category")
IX_KnowledgeDocuments_IsActive CREATE INDEX "IX_KnowledgeDocuments_IsActive" ON public."KnowledgeDocuments" USING btree ("IsActive") WHERE ("IsActive" = true)
IX_KnowledgeDocuments_OrganizationId CREATE INDEX "IX_KnowledgeDocuments_OrganizationId" ON public."KnowledgeDocuments" USING btree ("OrganizationId")
IX_KnowledgeDocuments_Source CREATE INDEX "IX_KnowledgeDocuments_Source" ON public."KnowledgeDocuments" USING btree ("Source")
KnowledgeDocuments_pkey CREATE UNIQUE INDEX "KnowledgeDocuments_pkey" ON public."KnowledgeDocuments" USING btree ("Id")

public.KnownErrors

  • Estimated rows: 14
  • Dead rows: 0
  • Comment: Registro de errores conocidos/resueltos para que los agentes de revisión no reporten los mismos problemas

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ProjectId uuid YES ``
3 Pattern character varying(500) NO ``
4 PatternType character varying(20) NO 'contains'::character varying
5 LogLevel character varying(20) YES ``
6 ServiceName character varying(100) YES ``
7 SourceContext character varying(200) YES ``
8 Status character varying(20) NO 'known'::character varying
9 Title character varying(200) NO ``
10 Description text YES ``
11 Resolution text YES ``
12 FixReference character varying(100) YES ``
13 ExpiresAt timestamp with time zone YES ``
14 Category character varying(50) YES ``
15 Tags jsonb YES ``
16 BacklogItemId uuid YES ``
17 SentryIssueId character varying(50) YES ``
18 HitCount integer(32,0) NO 0
19 LastSeenAt timestamp with time zone YES ``
20 AlertThreshold integer(32,0) YES ``
21 CreatedBy character varying(100) YES ``
22 UpdatedBy character varying(100) YES ``
23 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
24 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP
25 IsActive boolean NO true

Constraints

Type Name Columns
CHECK 17249_21752_18_not_null ``
CHECK 17249_21752_1_not_null ``
CHECK 17249_21752_23_not_null ``
CHECK 17249_21752_24_not_null ``
CHECK 17249_21752_25_not_null ``
CHECK 17249_21752_3_not_null ``
CHECK 17249_21752_4_not_null ``
CHECK 17249_21752_8_not_null ``
CHECK 17249_21752_9_not_null ``
FOREIGN KEY FK_KnownErrors_BacklogItems_BacklogItemId BacklogItemId
FOREIGN KEY FK_KnownErrors_Projects_ProjectId ProjectId
FOREIGN KEY KnownErrors_BacklogItemId_fkey BacklogItemId
FOREIGN KEY KnownErrors_ProjectId_fkey ProjectId
PRIMARY KEY KnownErrors_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_KnownErrors_BacklogItems_BacklogItemId BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
FK_KnownErrors_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION SET NULL
KnownErrors_BacklogItemId_fkey BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
KnownErrors_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_KnownErrors_Active_Status CREATE INDEX "IX_KnownErrors_Active_Status" ON public."KnownErrors" USING btree ("IsActive", "Status") WHERE ("IsActive" = true)
IX_KnownErrors_BacklogItemId CREATE INDEX "IX_KnownErrors_BacklogItemId" ON public."KnownErrors" USING btree ("BacklogItemId")
IX_KnownErrors_Category CREATE INDEX "IX_KnownErrors_Category" ON public."KnownErrors" USING btree ("Category")
IX_KnownErrors_IsActive CREATE INDEX "IX_KnownErrors_IsActive" ON public."KnownErrors" USING btree ("IsActive") WHERE ("IsActive" = true)
IX_KnownErrors_IsActive_Status CREATE INDEX "IX_KnownErrors_IsActive_Status" ON public."KnownErrors" USING btree ("IsActive", "Status") WHERE ("IsActive" = true)
IX_KnownErrors_ProjectId CREATE INDEX "IX_KnownErrors_ProjectId" ON public."KnownErrors" USING btree ("ProjectId")
IX_KnownErrors_ServiceName CREATE INDEX "IX_KnownErrors_ServiceName" ON public."KnownErrors" USING btree ("ServiceName")
IX_KnownErrors_Status CREATE INDEX "IX_KnownErrors_Status" ON public."KnownErrors" USING btree ("Status")
KnownErrors_pkey CREATE UNIQUE INDEX "KnownErrors_pkey" ON public."KnownErrors" USING btree ("Id")

public.McpRequestLogs

  • Estimated rows: 3890
  • Dead rows: 330
  • Comment: Log de todas las llamadas MCP (Model Context Protocol). Captura requests, responses, tiempos y errores para análisis y debugging.

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 CorrelationId character varying(50) NO ``
3 ReceivedAt timestamp with time zone NO CURRENT_TIMESTAMP
4 CompletedAt timestamp with time zone YES ``
5 Method character varying(100) NO ``
6 TransportType character varying(20) NO 'http'::character varying
7 HttpEndpoint character varying(200) YES ``
8 HttpMethod character varying(10) YES ``
9 SessionId character varying(50) YES ``
10 JsonRpcId character varying(50) YES ``
11 ToolName character varying(100) YES ``
12 ResourceUri character varying(500) YES ``
13 RequestParamsJson jsonb YES ``
14 RequestSizeBytes integer(32,0) YES ``
15 ResponseJson jsonb YES ``
16 ResponseSizeBytes integer(32,0) YES ``
17 Status character varying(20) NO 'pending'::character varying
18 ErrorCode integer(32,0) YES ``
19 ErrorMessage character varying(2000) YES ``
20 ErrorStackTrace text YES ``
21 ExceptionType character varying(200) YES ``
22 DurationMs integer(32,0) YES ``
23 ClientIp character varying(50) YES ``
24 UserAgent character varying(500) YES ``
25 ClientId character varying(100) YES ``
26 UserId uuid YES ``
27 OrganizationId uuid YES ``
28 Scopes character varying(500) YES ``
29 ProtocolVersion character varying(20) YES ``
30 ServerName character varying(50) NO 'nexus-mcp-remote'::character varying
31 ServerVersion character varying(20) YES ``
32 MetadataJson jsonb YES ``
33 Tags character varying(200) YES ``

Constraints

Type Name Columns
CHECK 17249_18717_17_not_null ``
CHECK 17249_18717_1_not_null ``
CHECK 17249_18717_2_not_null ``
CHECK 17249_18717_30_not_null ``
CHECK 17249_18717_3_not_null ``
CHECK 17249_18717_5_not_null ``
CHECK 17249_18717_6_not_null ``
FOREIGN KEY FK_McpRequestLogs_Organizations_OrganizationId OrganizationId
FOREIGN KEY FK_McpRequestLogs_Users_UserId UserId
PRIMARY KEY McpRequestLogs_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_McpRequestLogs_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION SET NULL
FK_McpRequestLogs_Users_UserId UserId public.Users(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_McpRequestLogs_ClientId CREATE INDEX "IX_McpRequestLogs_ClientId" ON public."McpRequestLogs" USING btree ("ClientId")
IX_McpRequestLogs_CorrelationId CREATE INDEX "IX_McpRequestLogs_CorrelationId" ON public."McpRequestLogs" USING btree ("CorrelationId")
IX_McpRequestLogs_ErrorCode CREATE INDEX "IX_McpRequestLogs_ErrorCode" ON public."McpRequestLogs" USING btree ("ErrorCode") WHERE ("ErrorCode" IS NOT NULL)
IX_McpRequestLogs_Errors CREATE INDEX "IX_McpRequestLogs_Errors" ON public."McpRequestLogs" USING btree ("ReceivedAt" DESC, "ErrorCode", "Method") WHERE (("Status")::text = 'error'::text)
IX_McpRequestLogs_Metadata_GIN CREATE INDEX "IX_McpRequestLogs_Metadata_GIN" ON public."McpRequestLogs" USING gin ("MetadataJson")
IX_McpRequestLogs_Method CREATE INDEX "IX_McpRequestLogs_Method" ON public."McpRequestLogs" USING btree ("Method")
IX_McpRequestLogs_Method_Status CREATE INDEX "IX_McpRequestLogs_Method_Status" ON public."McpRequestLogs" USING btree ("Method", "Status")
IX_McpRequestLogs_OrganizationId CREATE INDEX "IX_McpRequestLogs_OrganizationId" ON public."McpRequestLogs" USING btree ("OrganizationId")
IX_McpRequestLogs_ReceivedAt CREATE INDEX "IX_McpRequestLogs_ReceivedAt" ON public."McpRequestLogs" USING btree ("ReceivedAt" DESC)
IX_McpRequestLogs_ReceivedAt_Status CREATE INDEX "IX_McpRequestLogs_ReceivedAt_Status" ON public."McpRequestLogs" USING btree ("ReceivedAt", "Status")
IX_McpRequestLogs_SessionId CREATE INDEX "IX_McpRequestLogs_SessionId" ON public."McpRequestLogs" USING btree ("SessionId")
IX_McpRequestLogs_SlowQueries CREATE INDEX "IX_McpRequestLogs_SlowQueries" ON public."McpRequestLogs" USING btree ("ReceivedAt" DESC, "DurationMs", "Method") WHERE ("DurationMs" > 1000)
IX_McpRequestLogs_Status CREATE INDEX "IX_McpRequestLogs_Status" ON public."McpRequestLogs" USING btree ("Status")
IX_McpRequestLogs_ToolName CREATE INDEX "IX_McpRequestLogs_ToolName" ON public."McpRequestLogs" USING btree ("ToolName")
IX_McpRequestLogs_ToolName_ReceivedAt CREATE INDEX "IX_McpRequestLogs_ToolName_ReceivedAt" ON public."McpRequestLogs" USING btree ("ToolName", "ReceivedAt")
IX_McpRequestLogs_UserId CREATE INDEX "IX_McpRequestLogs_UserId" ON public."McpRequestLogs" USING btree ("UserId")
McpRequestLogs_pkey CREATE UNIQUE INDEX "McpRequestLogs_pkey" ON public."McpRequestLogs" USING btree ("Id")

public.ModelRecommendationRules

  • Estimated rows: 29
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Intent character varying(50) NO ``
3 ProviderType character varying(50) NO ``
4 CurrentModelPattern character varying(100) NO ``
5 RecommendedModel character varying(100) NO ``
6 MinConfidence double precision(53,0) NO 0.7
7 Reason character varying(500) YES ``
8 Priority integer(32,0) NO 0
9 IsActive boolean NO true
10 TimesRecommended integer(32,0) NO 0
11 TimesAccepted integer(32,0) NO 0
12 CreatedAt timestamp with time zone NO now()
13 UpdatedAt timestamp with time zone YES ``
14 Complexity character varying(20) NO 'Medium'::character varying
15 CliType character varying(20) NO 'Web'::character varying

Constraints

Type Name Columns
CHECK 17249_38971_10_not_null ``
CHECK 17249_38971_11_not_null ``
CHECK 17249_38971_12_not_null ``
CHECK 17249_38971_14_not_null ``
CHECK 17249_38971_15_not_null ``
CHECK 17249_38971_1_not_null ``
CHECK 17249_38971_2_not_null ``
CHECK 17249_38971_3_not_null ``
CHECK 17249_38971_4_not_null ``
CHECK 17249_38971_5_not_null ``
CHECK 17249_38971_6_not_null ``
CHECK 17249_38971_8_not_null ``
CHECK 17249_38971_9_not_null ``
PRIMARY KEY ModelRecommendationRules_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_ModelRecommendationRules_Intent_Provider CREATE INDEX "IX_ModelRecommendationRules_Intent_Provider" ON public."ModelRecommendationRules" USING btree ("Intent", "ProviderType") WHERE ("IsActive" = true)
IX_ModelRecommendationRules_IsActive CREATE INDEX "IX_ModelRecommendationRules_IsActive" ON public."ModelRecommendationRules" USING btree ("IsActive") WHERE ("IsActive" = true)
IX_ModelRecommendationRules_Priority CREATE INDEX "IX_ModelRecommendationRules_Priority" ON public."ModelRecommendationRules" USING btree ("Priority" DESC) WHERE ("IsActive" = true)
IX_ModelRecommendationRules_Unique CREATE UNIQUE INDEX "IX_ModelRecommendationRules_Unique" ON public."ModelRecommendationRules" USING btree ("Intent", "ProviderType", "CurrentModelPattern") WHERE ("IsActive" = true)
ModelRecommendationRules_pkey CREATE UNIQUE INDEX "ModelRecommendationRules_pkey" ON public."ModelRecommendationRules" USING btree ("Id")

public.OperatorSessions

  • Estimated rows: 16
  • Dead rows: 26
  • Comment: Sesiones de control manual del operador humano

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 ContactPhone character varying(50) NO ``
4 ContactName character varying(200) YES ``
5 StartedAt timestamp with time zone NO CURRENT_TIMESTAMP
6 EndedAt timestamp with time zone YES ``
7 IsActive boolean NO true
8 MessagesSent integer(32,0) NO 0
9 Notes character varying(2000) YES ``

Constraints

Type Name Columns
CHECK 17249_27956_1_not_null ``
CHECK 17249_27956_2_not_null ``
CHECK 17249_27956_3_not_null ``
CHECK 17249_27956_5_not_null ``
CHECK 17249_27956_7_not_null ``
CHECK 17249_27956_8_not_null ``
FOREIGN KEY OperatorSessions_UserId_fkey UserId
PRIMARY KEY OperatorSessions_pkey Id

Foreign Keys

Name Columns References On Update On Delete
OperatorSessions_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_OperatorSessions_ContactPhone CREATE INDEX "IX_OperatorSessions_ContactPhone" ON public."OperatorSessions" USING btree ("ContactPhone")
IX_OperatorSessions_IsActive_StartedAt CREATE INDEX "IX_OperatorSessions_IsActive_StartedAt" ON public."OperatorSessions" USING btree ("IsActive", "StartedAt")
IX_OperatorSessions_UserId CREATE INDEX "IX_OperatorSessions_UserId" ON public."OperatorSessions" USING btree ("UserId")
OperatorSessions_pkey CREATE UNIQUE INDEX "OperatorSessions_pkey" ON public."OperatorSessions" USING btree ("Id")
idx_operator_sessions_active_started CREATE INDEX idx_operator_sessions_active_started ON public."OperatorSessions" USING btree ("IsActive", "StartedAt")
idx_operator_sessions_contact_phone CREATE INDEX idx_operator_sessions_contact_phone ON public."OperatorSessions" USING btree ("ContactPhone")
idx_operator_sessions_user_id CREATE INDEX idx_operator_sessions_user_id ON public."OperatorSessions" USING btree ("UserId")

public.Organizations

  • Estimated rows: 4
  • Dead rows: 5
  • Comment: Agrupacion de proyectos por cliente/organizacion

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Slug character varying(50) NO ``
3 Name character varying(100) NO ``
4 Description text YES ``
5 LogoUrl character varying(500) YES ``
6 PrimaryColor character varying(7) YES ``
7 IsActive boolean NO true
8 PrimaryEmail character varying(255) YES ``
9 PrimaryPhone character varying(50) YES ``
10 SettingsJson text YES ``
11 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
12 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP
13 ThemeId character varying(20) NO 'nexus'::character varying

Constraints

Type Name Columns
CHECK 17249_17297_11_not_null ``
CHECK 17249_17297_12_not_null ``
CHECK 17249_17297_13_not_null ``
CHECK 17249_17297_1_not_null ``
CHECK 17249_17297_2_not_null ``
CHECK 17249_17297_3_not_null ``
CHECK 17249_17297_7_not_null ``
PRIMARY KEY Organizations_pkey Id
UNIQUE Organizations_Slug_key Slug

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_Organizations_IsActive CREATE INDEX "IX_Organizations_IsActive" ON public."Organizations" USING btree ("IsActive")
Organizations_Slug_key CREATE UNIQUE INDEX "Organizations_Slug_key" ON public."Organizations" USING btree ("Slug")
Organizations_pkey CREATE UNIQUE INDEX "Organizations_pkey" ON public."Organizations" USING btree ("Id")

public.PasswordResetTokens

  • Estimated rows: 0
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 UserId uuid NO ``
3 TokenHash character varying(100) NO ``
4 ExpiresAt timestamp with time zone NO ``
5 IsUsed boolean NO false
6 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_27312_1_not_null ``
CHECK 17249_27312_2_not_null ``
CHECK 17249_27312_3_not_null ``
CHECK 17249_27312_4_not_null ``
CHECK 17249_27312_5_not_null ``
CHECK 17249_27312_6_not_null ``
FOREIGN KEY FK_PasswordResetTokens_Users_UserId UserId
PRIMARY KEY PK_PasswordResetTokens Id

Foreign Keys

Name Columns References On Update On Delete
FK_PasswordResetTokens_Users_UserId UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_PasswordResetTokens_Lookup CREATE INDEX "IX_PasswordResetTokens_Lookup" ON public."PasswordResetTokens" USING btree ("TokenHash", "IsUsed", "ExpiresAt")
IX_PasswordResetTokens_TokenHash CREATE INDEX "IX_PasswordResetTokens_TokenHash" ON public."PasswordResetTokens" USING btree ("TokenHash")
IX_PasswordResetTokens_UserId CREATE INDEX "IX_PasswordResetTokens_UserId" ON public."PasswordResetTokens" USING btree ("UserId")
PK_PasswordResetTokens CREATE UNIQUE INDEX "PK_PasswordResetTokens" ON public."PasswordResetTokens" USING btree ("Id")

public.PersonProject

  • Estimated rows: 1
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 PersonsId uuid NO ``
2 ProjectsId uuid NO ``

Constraints

Type Name Columns
CHECK 17249_66781_1_not_null ``
CHECK 17249_66781_2_not_null ``
FOREIGN KEY FK_PersonProject_Persons PersonsId
FOREIGN KEY FK_PersonProject_Projects ProjectsId
PRIMARY KEY PK_PersonProject PersonsId, ProjectsId

Foreign Keys

Name Columns References On Update On Delete
FK_PersonProject_Persons PersonsId public.Persons(Id) NO ACTION CASCADE
FK_PersonProject_Projects ProjectsId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_PersonProject_ProjectsId CREATE INDEX "IX_PersonProject_ProjectsId" ON public."PersonProject" USING btree ("ProjectsId")
PK_PersonProject CREATE UNIQUE INDEX "PK_PersonProject" ON public."PersonProject" USING btree ("PersonsId", "ProjectsId")

public.Persons

  • Estimated rows: 9
  • Dead rows: 26

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Name character varying(200) NO ``
3 Slug character varying(80) NO ``
4 Alias character varying(100) YES ``
5 Title character varying(100) YES ``
6 Bio character varying(2000) YES ``
7 WebsiteUrl character varying(500) YES ``
8 Email character varying(150) YES ``
9 Phone character varying(30) YES ``
10 Role character varying(100) YES ``
11 SocialMedia jsonb YES ``
12 OrganizationClientId uuid YES ``
13 DeletedAt timestamp with time zone YES ``
14 CreatedAt timestamp with time zone NO now()
15 UpdatedAt timestamp with time zone NO now()

Constraints

Type Name Columns
CHECK 17249_66763_14_not_null ``
CHECK 17249_66763_15_not_null ``
CHECK 17249_66763_1_not_null ``
CHECK 17249_66763_2_not_null ``
CHECK 17249_66763_3_not_null ``
FOREIGN KEY FK_Persons_Clients_OrganizationClientId OrganizationClientId
PRIMARY KEY PK_Persons Id

Foreign Keys

Name Columns References On Update On Delete
FK_Persons_Clients_OrganizationClientId OrganizationClientId public.Clients(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_Persons_Email CREATE INDEX "IX_Persons_Email" ON public."Persons" USING btree ("Email")
IX_Persons_OrganizationClientId CREATE INDEX "IX_Persons_OrganizationClientId" ON public."Persons" USING btree ("OrganizationClientId")
IX_Persons_Slug CREATE UNIQUE INDEX "IX_Persons_Slug" ON public."Persons" USING btree ("Slug")
PK_Persons CREATE UNIQUE INDEX "PK_Persons" ON public."Persons" USING btree ("Id")

public.PluginAgents

  • Estimated rows: 178
  • Dead rows: 0
  • Comment: Relaci├│n Many-to-Many: un agente puede estar en m├║ltiples plugins

Columns

# Column Type Nullable Default
1 PluginId character varying(100) NO ``
2 AgentId uuid NO ``

Constraints

Type Name Columns
CHECK 17249_17306_1_not_null ``
CHECK 17249_17306_2_not_null ``
FOREIGN KEY FK_PluginAgents_Agents AgentId
FOREIGN KEY FK_PluginAgents_Plugins PluginId
PRIMARY KEY PluginAgents_pkey PluginId, AgentId

Foreign Keys

Name Columns References On Update On Delete
FK_PluginAgents_Agents AgentId public.Agents(Id) NO ACTION CASCADE
FK_PluginAgents_Plugins PluginId public.Plugins(Id) NO ACTION CASCADE

Indexes

Name Definition
PluginAgents_pkey CREATE UNIQUE INDEX "PluginAgents_pkey" ON public."PluginAgents" USING btree ("PluginId", "AgentId")
idx_plugin_agents_agent_id CREATE INDEX idx_plugin_agents_agent_id ON public."PluginAgents" USING btree ("AgentId")

public.PluginCommands

  • Estimated rows: 87
  • Dead rows: 0
  • Comment: Relaci├│n Many-to-Many: un command puede estar en m├║ltiples plugins

Columns

# Column Type Nullable Default
1 PluginId character varying(100) NO ``
2 CommandId character varying(100) NO ``

Constraints

Type Name Columns
CHECK 17249_17309_1_not_null ``
CHECK 17249_17309_2_not_null ``
FOREIGN KEY FK_PluginCommands_Commands CommandId
FOREIGN KEY FK_PluginCommands_Plugins PluginId
PRIMARY KEY PluginCommands_pkey PluginId, CommandId

Foreign Keys

Name Columns References On Update On Delete
FK_PluginCommands_Commands CommandId public.Commands(Id) NO ACTION CASCADE
FK_PluginCommands_Plugins PluginId public.Plugins(Id) NO ACTION CASCADE

Indexes

Name Definition
PluginCommands_pkey CREATE UNIQUE INDEX "PluginCommands_pkey" ON public."PluginCommands" USING btree ("PluginId", "CommandId")

public.PluginProcedures

  • Estimated rows: 51
  • Dead rows: 0
  • Comment: Relaci├│n Many-to-Many: un procedure puede pertenecer a un plugin

Columns

# Column Type Nullable Default
1 PluginId character varying(100) NO ``
2 ProcedureId character varying(50) NO ``

Constraints

Type Name Columns
CHECK 17249_17312_1_not_null ``
CHECK 17249_17312_2_not_null ``
FOREIGN KEY FK_PluginProcedures_Plugins PluginId
FOREIGN KEY FK_PluginProcedures_Procedures ProcedureId
PRIMARY KEY PluginProcedures_pkey PluginId, ProcedureId

Foreign Keys

Name Columns References On Update On Delete
FK_PluginProcedures_Plugins PluginId public.Plugins(Id) NO ACTION CASCADE
FK_PluginProcedures_Procedures ProcedureId public.Procedures(Id) NO ACTION CASCADE

Indexes

Name Definition
PluginProcedures_pkey CREATE UNIQUE INDEX "PluginProcedures_pkey" ON public."PluginProcedures" USING btree ("PluginId", "ProcedureId")

public.PluginSkills

  • Estimated rows: 130
  • Dead rows: 0
  • Comment: Relaci├│n Many-to-Many: un skill puede estar en m├║ltiples plugins

Columns

# Column Type Nullable Default
1 PluginId character varying(100) NO ``
2 SkillId character varying(100) NO ``

Constraints

Type Name Columns
CHECK 17249_17315_1_not_null ``
CHECK 17249_17315_2_not_null ``
FOREIGN KEY FK_PluginSkills_Plugins PluginId
FOREIGN KEY FK_PluginSkills_Skills SkillId
PRIMARY KEY PluginSkills_pkey PluginId, SkillId

Foreign Keys

Name Columns References On Update On Delete
FK_PluginSkills_Plugins PluginId public.Plugins(Id) NO ACTION CASCADE
FK_PluginSkills_Skills SkillId public.Skills(Id) NO ACTION CASCADE

Indexes

Name Definition
PluginSkills_pkey CREATE UNIQUE INDEX "PluginSkills_pkey" ON public."PluginSkills" USING btree ("PluginId", "SkillId")
idx_plugin_skills_skill_id CREATE INDEX idx_plugin_skills_skill_id ON public."PluginSkills" USING btree ("SkillId")

public.Plugins

  • Estimated rows: 75
  • Dead rows: 0
  • Comment: Plugin: agrupador de agents, commands y skills por dominio. Ej: backend-development, security-scanning

Columns

# Column Type Nullable Default
1 Id character varying(100) NO ``
2 Name character varying(200) NO ``
3 Description text YES ``
4 Category character varying(50) NO ``
5 ContentPath character varying(500) YES ``
6 Source character varying(20) NO 'upstream'::character varying
7 IsInstalled boolean NO false
8 IsActive boolean NO true
9 CreatedAt timestamp without time zone NO now()
10 UpdatedAt timestamp without time zone NO now()
11 UsageCount integer(32,0) NO 0
12 LastUsedAt timestamp without time zone YES ``

Constraints

Type Name Columns
CHECK 17249_17318_10_not_null ``
CHECK 17249_17318_11_not_null ``
CHECK 17249_17318_1_not_null ``
CHECK 17249_17318_2_not_null ``
CHECK 17249_17318_4_not_null ``
CHECK 17249_17318_6_not_null ``
CHECK 17249_17318_7_not_null ``
CHECK 17249_17318_8_not_null ``
CHECK 17249_17318_9_not_null ``
PRIMARY KEY Plugins_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_Plugins_Category CREATE INDEX "IX_Plugins_Category" ON public."Plugins" USING btree ("Category")
IX_Plugins_Source CREATE INDEX "IX_Plugins_Source" ON public."Plugins" USING btree ("Source")
Plugins_pkey CREATE UNIQUE INDEX "Plugins_pkey" ON public."Plugins" USING btree ("Id")

public.Procedures

  • Estimated rows: 54
  • Dead rows: 51

Columns

# Column Type Nullable Default
1 Id character varying(50) NO ``
2 Description text YES ``
3 Category character varying(50) NO ``
4 Frequency character varying(50) YES ``
5 EstimatedDurationMinutes integer(32,0) YES ``
6 ContentPath character varying(500) YES ``
7 ContentMd text NO ''::text
8 RequiresAgent boolean NO ``
9 DefaultAgentId uuid YES ``
10 IsActive boolean NO ``
11 CreatedAt timestamp with time zone NO ``
12 UpdatedAt timestamp with time zone NO ``
13 Title character varying(200) NO ''::character varying
14 Source character varying(20) NO 'custom'::character varying
15 OutputFormat character varying(50) YES ``
16 OrganizationId uuid YES ``

Constraints

Type Name Columns
CHECK 17249_17329_10_not_null ``
CHECK 17249_17329_11_not_null ``
CHECK 17249_17329_12_not_null ``
CHECK 17249_17329_13_not_null ``
CHECK 17249_17329_14_not_null ``
CHECK 17249_17329_1_not_null ``
CHECK 17249_17329_3_not_null ``
CHECK 17249_17329_7_not_null ``
CHECK 17249_17329_8_not_null ``
FOREIGN KEY FK_Procedures_Agents_DefaultAgentId DefaultAgentId
FOREIGN KEY FK_Procedures_Organizations_OrganizationId OrganizationId
PRIMARY KEY PK_Procedures Id

Foreign Keys

Name Columns References On Update On Delete
FK_Procedures_Agents_DefaultAgentId DefaultAgentId public.Agents(Id) NO ACTION SET NULL
FK_Procedures_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_Procedures_DefaultAgentId CREATE INDEX "IX_Procedures_DefaultAgentId" ON public."Procedures" USING btree ("DefaultAgentId")
IX_Procedures_OrganizationId CREATE INDEX "IX_Procedures_OrganizationId" ON public."Procedures" USING btree ("OrganizationId")
IX_Procedures_Source CREATE INDEX "IX_Procedures_Source" ON public."Procedures" USING btree ("Source")
PK_Procedures CREATE UNIQUE INDEX "PK_Procedures" ON public."Procedures" USING btree ("Id")

public.ProjectAgentPaths

  • Estimated rows: 13
  • Dead rows: 28

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ProjectId uuid NO ``
3 RemoteAgentId uuid NO ``
4 Path character varying(500) NO ``
5 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
6 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_19844_1_not_null ``
CHECK 17249_19844_2_not_null ``
CHECK 17249_19844_3_not_null ``
CHECK 17249_19844_4_not_null ``
CHECK 17249_19844_5_not_null ``
CHECK 17249_19844_6_not_null ``
FOREIGN KEY FK_ProjectAgentPaths_Projects_ProjectId ProjectId
FOREIGN KEY FK_ProjectAgentPaths_RemoteAgents_RemoteAgentId RemoteAgentId
PRIMARY KEY ProjectAgentPaths_pkey Id
UNIQUE UQ_ProjectAgentPaths_ProjectId_RemoteAgentId ProjectId, RemoteAgentId

Foreign Keys

Name Columns References On Update On Delete
FK_ProjectAgentPaths_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION CASCADE
FK_ProjectAgentPaths_RemoteAgents_RemoteAgentId RemoteAgentId public.RemoteAgents(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_ProjectAgentPaths_ProjectId CREATE INDEX "IX_ProjectAgentPaths_ProjectId" ON public."ProjectAgentPaths" USING btree ("ProjectId")
IX_ProjectAgentPaths_RemoteAgentId CREATE INDEX "IX_ProjectAgentPaths_RemoteAgentId" ON public."ProjectAgentPaths" USING btree ("RemoteAgentId")
ProjectAgentPaths_pkey CREATE UNIQUE INDEX "ProjectAgentPaths_pkey" ON public."ProjectAgentPaths" USING btree ("Id")
UQ_ProjectAgentPaths_ProjectId_RemoteAgentId CREATE UNIQUE INDEX "UQ_ProjectAgentPaths_ProjectId_RemoteAgentId" ON public."ProjectAgentPaths" USING btree ("ProjectId", "RemoteAgentId")

public.ProjectMembers

  • Estimated rows: 33
  • Dead rows: 10

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ProjectId uuid NO ``
3 PersonId uuid NO ``
4 Role character varying(100) YES ``
5 IsLead boolean NO false
6 JoinedAt timestamp with time zone YES ``
7 LeftAt timestamp with time zone YES ``
8 CreatedAt timestamp with time zone NO now()

Constraints

Type Name Columns
CHECK 17249_66813_1_not_null ``
CHECK 17249_66813_2_not_null ``
CHECK 17249_66813_3_not_null ``
CHECK 17249_66813_5_not_null ``
CHECK 17249_66813_8_not_null ``
FOREIGN KEY FK_ProjectMembers_Persons_PersonId PersonId
FOREIGN KEY FK_ProjectMembers_Projects_ProjectId ProjectId
PRIMARY KEY PK_ProjectMembers Id

Foreign Keys

Name Columns References On Update On Delete
FK_ProjectMembers_Persons_PersonId PersonId public.Persons(Id) NO ACTION RESTRICT
FK_ProjectMembers_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_ProjectMembers_PersonId CREATE INDEX "IX_ProjectMembers_PersonId" ON public."ProjectMembers" USING btree ("PersonId")
IX_ProjectMembers_ProjectId_PersonId CREATE UNIQUE INDEX "IX_ProjectMembers_ProjectId_PersonId" ON public."ProjectMembers" USING btree ("ProjectId", "PersonId")
PK_ProjectMembers CREATE UNIQUE INDEX "PK_ProjectMembers" ON public."ProjectMembers" USING btree ("Id")

public.ProjectMemories

  • Estimated rows: 103
  • Dead rows: 24
  • Comment: Shared memories at project level with approval workflow (pending → approved/rejected)

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ProjectId uuid NO ``
3 Category character varying(50) NO 'decision'::character varying
4 Content text NO ``
5 Status character varying(20) NO 'pending'::character varying
6 ProposedByUserId uuid NO ``
7 ReviewedByUserId uuid YES ``
8 Source character varying(20) NO 'auto'::character varying
9 Confidence integer(32,0) NO 80
10 UseCount integer(32,0) NO 0
11 IsActive boolean NO true
12 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
13 ReviewedAt timestamp with time zone YES ``
14 LastUsedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_38934_10_not_null ``
CHECK 17249_38934_11_not_null ``
CHECK 17249_38934_12_not_null ``
CHECK 17249_38934_1_not_null ``
CHECK 17249_38934_2_not_null ``
CHECK 17249_38934_3_not_null ``
CHECK 17249_38934_4_not_null ``
CHECK 17249_38934_5_not_null ``
CHECK 17249_38934_6_not_null ``
CHECK 17249_38934_8_not_null ``
CHECK 17249_38934_9_not_null ``
FOREIGN KEY ProjectMemories_ProjectId_fkey ProjectId
FOREIGN KEY ProjectMemories_ProposedByUserId_fkey ProposedByUserId
FOREIGN KEY ProjectMemories_ReviewedByUserId_fkey ReviewedByUserId
PRIMARY KEY ProjectMemories_pkey Id

Foreign Keys

Name Columns References On Update On Delete
ProjectMemories_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION CASCADE
ProjectMemories_ProposedByUserId_fkey ProposedByUserId public.Users(Id) NO ACTION CASCADE
ProjectMemories_ReviewedByUserId_fkey ReviewedByUserId public.Users(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_ProjectMemories_Approved_Active CREATE INDEX "IX_ProjectMemories_Approved_Active" ON public."ProjectMemories" USING btree ("ProjectId", "UseCount" DESC, "Confidence" DESC) WHERE ((("Status")::text = 'approved'::text) AND ("IsActive" = true))
IX_ProjectMemories_Pending CREATE INDEX "IX_ProjectMemories_Pending" ON public."ProjectMemories" USING btree ("CreatedAt" DESC) WHERE ((("Status")::text = 'pending'::text) AND ("IsActive" = true))
IX_ProjectMemories_ProjectId CREATE INDEX "IX_ProjectMemories_ProjectId" ON public."ProjectMemories" USING btree ("ProjectId")
IX_ProjectMemories_ProjectId_Category CREATE INDEX "IX_ProjectMemories_ProjectId_Category" ON public."ProjectMemories" USING btree ("ProjectId", "Category") WHERE ((("Status")::text = 'approved'::text) AND ("IsActive" = true))
IX_ProjectMemories_ProjectId_Status CREATE INDEX "IX_ProjectMemories_ProjectId_Status" ON public."ProjectMemories" USING btree ("ProjectId", "Status") WHERE ("IsActive" = true)
IX_ProjectMemories_ProposedByUserId CREATE INDEX "IX_ProjectMemories_ProposedByUserId" ON public."ProjectMemories" USING btree ("ProposedByUserId")
IX_ProjectMemories_ReviewedByUserId CREATE INDEX "IX_ProjectMemories_ReviewedByUserId" ON public."ProjectMemories" USING btree ("ReviewedByUserId")
ProjectMemories_pkey CREATE UNIQUE INDEX "ProjectMemories_pkey" ON public."ProjectMemories" USING btree ("Id")

public.ProjectMetricsOverrides

  • Estimated rows: 0
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 ProjectId uuid NO ``
3 PeriodStart timestamp with time zone NO ``
4 PeriodEnd timestamp with time zone NO ``
5 PeriodType character varying(20) NO ``
6 HumanHoursOverride double precision(53,0) NO ``
7 Notes character varying(500) YES ``
8 CreatedBy character varying(100) YES ``
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
10 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_17337_10_not_null ``
CHECK 17249_17337_1_not_null ``
CHECK 17249_17337_2_not_null ``
CHECK 17249_17337_3_not_null ``
CHECK 17249_17337_4_not_null ``
CHECK 17249_17337_5_not_null ``
CHECK 17249_17337_6_not_null ``
CHECK 17249_17337_9_not_null ``
FOREIGN KEY FK_ProjectMetricsOverrides_Projects_ProjectId ProjectId
PRIMARY KEY ProjectMetricsOverrides_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_ProjectMetricsOverrides_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_ProjectMetricsOverrides_ProjectId_PeriodStart_PeriodEnd CREATE UNIQUE INDEX "IX_ProjectMetricsOverrides_ProjectId_PeriodStart_PeriodEnd" ON public."ProjectMetricsOverrides" USING btree ("ProjectId", "PeriodStart", "PeriodEnd")
ProjectMetricsOverrides_pkey CREATE UNIQUE INDEX "ProjectMetricsOverrides_pkey" ON public."ProjectMetricsOverrides" USING btree ("Id")

public.ProjectSecrets

  • Estimated rows: 12
  • Dead rows: 6

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 ProjectId uuid NO ``
3 Key character varying(100) NO ``
4 EncryptedValue text NO ``
5 Category character varying(50) YES ``
6 CreatedAt timestamp with time zone NO ``
7 UpdatedAt timestamp with time zone NO ``

Constraints

Type Name Columns
CHECK 17249_17344_1_not_null ``
CHECK 17249_17344_2_not_null ``
CHECK 17249_17344_3_not_null ``
CHECK 17249_17344_4_not_null ``
CHECK 17249_17344_6_not_null ``
CHECK 17249_17344_7_not_null ``
FOREIGN KEY FK_ProjectSecrets_Projects_ProjectId ProjectId
PRIMARY KEY PK_ProjectSecrets Id

Foreign Keys

Name Columns References On Update On Delete
FK_ProjectSecrets_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_ProjectSecrets_ProjectId_Key CREATE UNIQUE INDEX "IX_ProjectSecrets_ProjectId_Key" ON public."ProjectSecrets" USING btree ("ProjectId", "Key")
PK_ProjectSecrets CREATE UNIQUE INDEX "PK_ProjectSecrets" ON public."ProjectSecrets" USING btree ("Id")

public.ProjectTemplates

  • Estimated rows: 0
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Name character varying(200) NO ``
3 Description character varying(1000) YES ``
4 SourceProjectId uuid YES ``
5 SourceProjectName character varying(200) YES ``
6 OrganizationId uuid YES ``
7 TaskCount integer(32,0) NO 0
8 TemplateJson jsonb NO '{}'::jsonb
9 CreatedAt timestamp with time zone NO now()
10 CreatedByUserId uuid YES ``
11 CreatedByUserName character varying(200) YES ``

Constraints

Type Name Columns
CHECK 17249_18610_1_not_null ``
CHECK 17249_18610_2_not_null ``
CHECK 17249_18610_7_not_null ``
CHECK 17249_18610_8_not_null ``
CHECK 17249_18610_9_not_null ``
PRIMARY KEY ProjectTemplates_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_ProjectTemplates_CreatedAt CREATE INDEX "IX_ProjectTemplates_CreatedAt" ON public."ProjectTemplates" USING btree ("CreatedAt")
IX_ProjectTemplates_OrganizationId CREATE INDEX "IX_ProjectTemplates_OrganizationId" ON public."ProjectTemplates" USING btree ("OrganizationId")
ProjectTemplates_pkey CREATE UNIQUE INDEX "ProjectTemplates_pkey" ON public."ProjectTemplates" USING btree ("Id")

public.Projects

  • Estimated rows: 56
  • Dead rows: 52

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Slug character varying(50) NO ``
3 Name character varying(100) NO ``
4 Description text YES ``
5 RepoPath character varying(500) YES ``
6 IsActive boolean NO ``
7 CreatedAt timestamp with time zone NO ``
8 UpdatedAt timestamp with time zone NO ``
9 OrganizationId uuid YES ``
10 Instructions text YES ``
11 InjectInstructions boolean NO true
12 EnableDocumentContextualization boolean NO true
13 MaxDocumentsPerRequest integer(32,0) NO 3
14 MinDocumentRelevance double precision(53,0) NO 0.3
15 MaxDocumentContextTokens integer(32,0) NO 5000
16 SentryConfigJson text YES ``
17 GitHubRepoUrl character varying(500) YES ``
18 CustomColor character varying(7) YES ``
19 ClientId uuid YES ``
20 ProjectType integer(32,0) NO 0
21 Status integer(32,0) NO 1
22 Priority integer(32,0) NO 1
23 BillingTypeOverride integer(32,0) YES ``
24 IsBillable boolean NO true
25 Code character varying(20) YES ``
26 ClickUpSpaceId character varying(50) YES ``
27 ClickUpFolderId character varying(50) YES ``
28 ClickUpListId character varying(50) YES ``
29 HoldedProjectId character varying(50) YES ``
30 DeletedAt timestamp with time zone YES ``
31 PersonId uuid YES ``
32 Budget numeric YES ``
33 Currency character varying(10) YES ``
34 UrlProduction character varying(500) YES ``
35 UrlStaging character varying(500) YES ``
36 TechStack jsonb YES ``
37 RepositoryUrl character varying(500) YES ``
38 RepositoryBranch character varying(100) YES ``
39 Notes character varying(2000) YES ``
40 Tags jsonb YES ``

Constraints

Type Name Columns
CHECK 17249_17349_11_not_null ``
CHECK 17249_17349_12_not_null ``
CHECK 17249_17349_13_not_null ``
CHECK 17249_17349_14_not_null ``
CHECK 17249_17349_15_not_null ``
CHECK 17249_17349_1_not_null ``
CHECK 17249_17349_20_not_null ``
CHECK 17249_17349_21_not_null ``
CHECK 17249_17349_22_not_null ``
CHECK 17249_17349_24_not_null ``
CHECK 17249_17349_2_not_null ``
CHECK 17249_17349_3_not_null ``
CHECK 17249_17349_6_not_null ``
CHECK 17249_17349_7_not_null ``
CHECK 17249_17349_8_not_null ``
FOREIGN KEY FK_Projects_Clients_ClientId ClientId
FOREIGN KEY FK_Projects_Persons_PersonId PersonId
FOREIGN KEY Projects_OrganizationId_fkey OrganizationId
PRIMARY KEY PK_Projects Id

Foreign Keys

Name Columns References On Update On Delete
FK_Projects_Clients_ClientId ClientId public.Clients(Id) NO ACTION SET NULL
FK_Projects_Persons_PersonId PersonId public.Persons(Id) NO ACTION SET NULL
Projects_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_Projects_ClientId CREATE INDEX "IX_Projects_ClientId" ON public."Projects" USING btree ("ClientId")
IX_Projects_Code CREATE INDEX "IX_Projects_Code" ON public."Projects" USING btree ("Code")
IX_Projects_OrganizationId CREATE INDEX "IX_Projects_OrganizationId" ON public."Projects" USING btree ("OrganizationId")
IX_Projects_PersonId CREATE INDEX "IX_Projects_PersonId" ON public."Projects" USING btree ("PersonId")
IX_Projects_ProjectType CREATE INDEX "IX_Projects_ProjectType" ON public."Projects" USING btree ("ProjectType")
IX_Projects_Slug CREATE UNIQUE INDEX "IX_Projects_Slug" ON public."Projects" USING btree ("Slug")
IX_Projects_Status CREATE INDEX "IX_Projects_Status" ON public."Projects" USING btree ("Status")
PK_Projects CREATE UNIQUE INDEX "PK_Projects" ON public."Projects" USING btree ("Id")

public.QuickActions

  • Estimated rows: 20
  • Dead rows: 11

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 UserId uuid YES ``
3 OrganizationId uuid YES ``
4 ProjectId uuid YES ``
5 Label character varying(100) NO ``
6 Icon character varying(100) YES ``
7 Color character varying(50) YES ``
8 Tooltip character varying(500) YES ``
9 PromptTemplate text NO ``
10 Category character varying(50) YES ``
11 RequiresConfirmation boolean NO ``
12 AutoExecute boolean NO ``
13 SortOrder integer(32,0) NO ``
14 IsActive boolean NO ``
15 IsPinned boolean NO ``
16 UseCount integer(32,0) NO ``
17 LastUsedAt timestamp with time zone YES ``
18 CreatedAt timestamp with time zone NO ``
19 UpdatedAt timestamp with time zone NO ``

Constraints

Type Name Columns
CHECK 17249_18297_11_not_null ``
CHECK 17249_18297_12_not_null ``
CHECK 17249_18297_13_not_null ``
CHECK 17249_18297_14_not_null ``
CHECK 17249_18297_15_not_null ``
CHECK 17249_18297_16_not_null ``
CHECK 17249_18297_18_not_null ``
CHECK 17249_18297_19_not_null ``
CHECK 17249_18297_1_not_null ``
CHECK 17249_18297_5_not_null ``
CHECK 17249_18297_9_not_null ``
FOREIGN KEY FK_QuickActions_Organizations_OrganizationId OrganizationId
FOREIGN KEY FK_QuickActions_Projects_ProjectId ProjectId
FOREIGN KEY FK_QuickActions_Users_UserId UserId
PRIMARY KEY PK_QuickActions Id

Foreign Keys

Name Columns References On Update On Delete
FK_QuickActions_Organizations_OrganizationId OrganizationId public.Organizations(Id) NO ACTION CASCADE
FK_QuickActions_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION SET NULL
FK_QuickActions_Users_UserId UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_QuickActions_Category CREATE INDEX "IX_QuickActions_Category" ON public."QuickActions" USING btree ("Category")
IX_QuickActions_OrganizationId CREATE INDEX "IX_QuickActions_OrganizationId" ON public."QuickActions" USING btree ("OrganizationId")
IX_QuickActions_OrganizationId_SortOrder CREATE INDEX "IX_QuickActions_OrganizationId_SortOrder" ON public."QuickActions" USING btree ("OrganizationId", "SortOrder")
IX_QuickActions_ProjectId CREATE INDEX "IX_QuickActions_ProjectId" ON public."QuickActions" USING btree ("ProjectId")
IX_QuickActions_UserId CREATE INDEX "IX_QuickActions_UserId" ON public."QuickActions" USING btree ("UserId")
IX_QuickActions_UserId_SortOrder CREATE INDEX "IX_QuickActions_UserId_SortOrder" ON public."QuickActions" USING btree ("UserId", "SortOrder")
PK_QuickActions CREATE UNIQUE INDEX "PK_QuickActions" ON public."QuickActions" USING btree ("Id")

public.QuickReplyTemplates

  • Estimated rows: 0
  • Dead rows: 0
  • Comment: Templates de respuestas rápidas para operador

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Name character varying(100) NO ``
3 Content character varying(2000) NO ``
4 Category character varying(50) NO 'general'::character varying
5 UsageCount integer(32,0) NO 0
6 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
7 Shortcut text YES ``
8 UpdatedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_27975_1_not_null ``
CHECK 17249_27975_2_not_null ``
CHECK 17249_27975_3_not_null ``
CHECK 17249_27975_4_not_null ``
CHECK 17249_27975_5_not_null ``
CHECK 17249_27975_6_not_null ``
PRIMARY KEY QuickReplyTemplates_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_QuickReplyTemplates_Category CREATE INDEX "IX_QuickReplyTemplates_Category" ON public."QuickReplyTemplates" USING btree ("Category")
IX_QuickReplyTemplates_Category_UsageCount CREATE INDEX "IX_QuickReplyTemplates_Category_UsageCount" ON public."QuickReplyTemplates" USING btree ("Category", "UsageCount" DESC)
QuickReplyTemplates_pkey CREATE UNIQUE INDEX "QuickReplyTemplates_pkey" ON public."QuickReplyTemplates" USING btree ("Id")
idx_quick_reply_templates_category CREATE INDEX idx_quick_reply_templates_category ON public."QuickReplyTemplates" USING btree ("Category")
idx_quick_reply_templates_category_usage CREATE INDEX idx_quick_reply_templates_category_usage ON public."QuickReplyTemplates" USING btree ("Category", "UsageCount" DESC)

public.RemoteAgentCommands

  • Estimated rows: 745
  • Dead rows: 111

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 RemoteAgentId uuid NO ``
3 DevSessionId uuid YES ``
4 RequestedById uuid YES ``
5 Prompt text NO ``
6 SystemPrompt text YES ``
7 WorkingDirectory character varying(500) YES ``
8 Status integer(32,0) NO 0
9 Response text YES ``
10 ErrorMessage text YES ``
11 ExitCode integer(32,0) YES ``
12 InputTokens integer(32,0) YES ``
13 OutputTokens integer(32,0) YES ``
14 DurationMs bigint(64,0) YES ``
15 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
16 StartedAt timestamp with time zone YES ``
17 CompletedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_19801_15_not_null ``
CHECK 17249_19801_1_not_null ``
CHECK 17249_19801_2_not_null ``
CHECK 17249_19801_5_not_null ``
CHECK 17249_19801_8_not_null ``
FOREIGN KEY RemoteAgentCommands_DevSessionId_fkey DevSessionId
FOREIGN KEY RemoteAgentCommands_RemoteAgentId_fkey RemoteAgentId
FOREIGN KEY RemoteAgentCommands_RequestedById_fkey RequestedById
PRIMARY KEY RemoteAgentCommands_pkey Id

Foreign Keys

Name Columns References On Update On Delete
RemoteAgentCommands_DevSessionId_fkey DevSessionId public.DevSessions(Id) NO ACTION SET NULL
RemoteAgentCommands_RemoteAgentId_fkey RemoteAgentId public.RemoteAgents(Id) NO ACTION CASCADE
RemoteAgentCommands_RequestedById_fkey RequestedById public.Users(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_RemoteAgentCommands_CreatedAt CREATE INDEX "IX_RemoteAgentCommands_CreatedAt" ON public."RemoteAgentCommands" USING btree ("CreatedAt" DESC)
IX_RemoteAgentCommands_RemoteAgentId CREATE INDEX "IX_RemoteAgentCommands_RemoteAgentId" ON public."RemoteAgentCommands" USING btree ("RemoteAgentId")
IX_RemoteAgentCommands_Status CREATE INDEX "IX_RemoteAgentCommands_Status" ON public."RemoteAgentCommands" USING btree ("Status")
RemoteAgentCommands_pkey CREATE UNIQUE INDEX "RemoteAgentCommands_pkey" ON public."RemoteAgentCommands" USING btree ("Id")

public.RemoteAgents

  • Estimated rows: 3
  • Dead rows: 36

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Name character varying(100) NO ``
3 ApiKey character varying(50) NO ''::character varying
4 ApiKeyHash character varying(100) NO ``
5 OrganizationId uuid NO ``
6 OwnerId uuid YES ``
7 Status integer(32,0) NO 0
8 ConnectionId character varying(100) YES ``
9 LastHeartbeat timestamp with time zone YES ``
10 LastConnectedAt timestamp with time zone YES ``
11 SystemInfo character varying(500) YES ``
12 AgentVersion character varying(20) YES ``
13 DefaultWorkingDirectory character varying(500) YES ``
14 CapabilitiesJson jsonb YES ``
15 ConfigJson jsonb YES ``
16 IsEnabled boolean NO true
17 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
18 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP
19 TotalCommandsExecuted integer(32,0) NO 0
20 TotalErrors integer(32,0) NO 0
21 TotalTokensUsed bigint(64,0) NO 0
22 IpAddress text YES ``
23 LastUpdateAt timestamp with time zone YES ``
24 LastUpdateCheckAt timestamp with time zone YES ``
25 MachineName text YES ``
26 MachineUser text YES ``
27 OsVersion text YES ``
28 ProcessorCount integer(32,0) YES ``
29 TotalMemoryMb bigint(64,0) YES ``
30 AvailableMemoryMb bigint(64,0) YES ``
31 CpuUsagePercent integer(32,0) YES ``
32 DiskFreeMb bigint(64,0) YES ``
33 DiskUsagePercent integer(32,0) YES ``
34 LastPerformanceAt timestamp with time zone YES ``
35 MemoryUsagePercent integer(32,0) YES ``

Constraints

Type Name Columns
CHECK 17249_19773_16_not_null ``
CHECK 17249_19773_17_not_null ``
CHECK 17249_19773_18_not_null ``
CHECK 17249_19773_19_not_null ``
CHECK 17249_19773_1_not_null ``
CHECK 17249_19773_20_not_null ``
CHECK 17249_19773_21_not_null ``
CHECK 17249_19773_2_not_null ``
CHECK 17249_19773_3_not_null ``
CHECK 17249_19773_4_not_null ``
CHECK 17249_19773_5_not_null ``
CHECK 17249_19773_7_not_null ``
FOREIGN KEY RemoteAgents_OrganizationId_fkey OrganizationId
FOREIGN KEY RemoteAgents_OwnerId_fkey OwnerId
PRIMARY KEY RemoteAgents_pkey Id

Foreign Keys

Name Columns References On Update On Delete
RemoteAgents_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE
RemoteAgents_OwnerId_fkey OwnerId public.Users(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_RemoteAgents_Active CREATE INDEX "IX_RemoteAgents_Active" ON public."RemoteAgents" USING btree ("OrganizationId", "LastConnectedAt" DESC) WHERE ("Status" = ANY (ARRAY[1, 2]))
IX_RemoteAgents_ApiKeyHash CREATE UNIQUE INDEX "IX_RemoteAgents_ApiKeyHash" ON public."RemoteAgents" USING btree ("ApiKeyHash")
IX_RemoteAgents_ApiKey_Enabled CREATE INDEX "IX_RemoteAgents_ApiKey_Enabled" ON public."RemoteAgents" USING btree ("ApiKeyHash") WHERE ("IsEnabled" = true)
IX_RemoteAgents_LastConnected CREATE INDEX "IX_RemoteAgents_LastConnected" ON public."RemoteAgents" USING btree ("LastConnectedAt" DESC)
IX_RemoteAgents_Online CREATE INDEX "IX_RemoteAgents_Online" ON public."RemoteAgents" USING btree ("OrganizationId", "Name") WHERE ("Status" = 1)
IX_RemoteAgents_Org_Enabled_LastConnected CREATE INDEX "IX_RemoteAgents_Org_Enabled_LastConnected" ON public."RemoteAgents" USING btree ("OrganizationId", "IsEnabled", "LastConnectedAt" DESC)
IX_RemoteAgents_OrganizationId CREATE INDEX "IX_RemoteAgents_OrganizationId" ON public."RemoteAgents" USING btree ("OrganizationId")
IX_RemoteAgents_Status CREATE INDEX "IX_RemoteAgents_Status" ON public."RemoteAgents" USING btree ("Status")
RemoteAgents_pkey CREATE UNIQUE INDEX "RemoteAgents_pkey" ON public."RemoteAgents" USING btree ("Id")

public.ResourceUsages

  • Estimated rows: 348
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ResourceType character varying(20) NO ``
3 ResourceId character varying(100) NO ``
4 ProjectSlug character varying(50) YES ``
5 AccessType character varying(20) NO 'content'::character varying
6 Source character varying(50) YES ``
7 ExecutionId uuid YES ``
8 AccessedAt timestamp with time zone NO now()
9 Metadata text YES ``

Constraints

Type Name Columns
CHECK 17249_17354_1_not_null ``
CHECK 17249_17354_2_not_null ``
CHECK 17249_17354_3_not_null ``
CHECK 17249_17354_5_not_null ``
CHECK 17249_17354_8_not_null ``
PRIMARY KEY ResourceUsages_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_ResourceUsages_AccessedAt CREATE INDEX "IX_ResourceUsages_AccessedAt" ON public."ResourceUsages" USING btree ("AccessedAt")
IX_ResourceUsages_ResourceType_ResourceId CREATE INDEX "IX_ResourceUsages_ResourceType_ResourceId" ON public."ResourceUsages" USING btree ("ResourceType", "ResourceId")
ResourceUsages_pkey CREATE UNIQUE INDEX "ResourceUsages_pkey" ON public."ResourceUsages" USING btree ("Id")

public.ScheduledSummaries

  • Estimated rows: 0
  • Dead rows: 0
  • Comment: Resúmenes programados de WhatsApp

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Name character varying(200) NO ``
3 Frequency character varying(50) NO 'daily'::character varying
4 CronExpression character varying(100) NO '0 20 * * *'::character varying
5 Recipients jsonb NO ``
6 TemplateType character varying(50) NO 'stats'::character varying
7 IncludeStats boolean NO true
8 IncludeTopMessages boolean NO false
9 TopMessagesCount integer(32,0) NO 5
10 IncludeKeywords boolean NO false
11 IsActive boolean NO true
12 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
13 LastSentAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_27902_10_not_null ``
CHECK 17249_27902_11_not_null ``
CHECK 17249_27902_12_not_null ``
CHECK 17249_27902_1_not_null ``
CHECK 17249_27902_2_not_null ``
CHECK 17249_27902_3_not_null ``
CHECK 17249_27902_4_not_null ``
CHECK 17249_27902_5_not_null ``
CHECK 17249_27902_6_not_null ``
CHECK 17249_27902_7_not_null ``
CHECK 17249_27902_8_not_null ``
CHECK 17249_27902_9_not_null ``
PRIMARY KEY ScheduledSummaries_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
ScheduledSummaries_pkey CREATE UNIQUE INDEX "ScheduledSummaries_pkey" ON public."ScheduledSummaries" USING btree ("Id")
idx_scheduled_summaries_is_active CREATE INDEX idx_scheduled_summaries_is_active ON public."ScheduledSummaries" USING btree ("IsActive")

public.ScheduledTask

  • Estimated rows: 68
  • Dead rows: 22

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Slug character varying(50) NO ``
3 Name character varying(100) NO ``
4 TaskType character varying(20) NO ``
5 ProcedureId character varying(50) YES ``
6 ProjectId uuid YES ``
7 CronExpression character varying(50) YES ``
8 ManualPrompt text YES ``
9 AgentId uuid YES ``
10 Enabled boolean NO ``
11 Description text YES ``
12 CreatedAt timestamp with time zone NO ``
13 UpdatedAt timestamp with time zone NO ``
14 LastRun timestamp with time zone YES ``
15 NextRun timestamp with time zone YES ``
16 SourceBacklogItemId uuid YES ``
17 SourceExecutionId uuid YES ``
18 PluginId character varying(100) YES ``
19 SelectedSkills text YES ``
20 SuggestedByAI text YES ``
21 ExecuteImmediately boolean YES false
22 OutputFormat character varying(20) YES ``
23 CommandId character varying(100) YES ``
24 UseOrchestratorSecrets boolean NO true
25 TimeoutMinutes integer(32,0) YES ``
26 RequiresApproval boolean NO false
27 IncludeStructuredFooter boolean NO true
28 FooterIncludeBacklogItems boolean NO true
29 FooterIncludeTasks boolean NO true
30 FooterIncludeNotifications boolean NO false
31 ScheduledAtUtc timestamp with time zone YES ``
32 IsOneTimeExecution boolean NO false
33 Priority character varying(20) NO 'medium'::character varying
34 PriorityOrder integer(32,0) NO 50
35 DelayMinutes integer(32,0) YES ``
36 NotBeforeUtc timestamp with time zone YES ``
37 NotAfterUtc timestamp with time zone YES ``
38 MaxRetries integer(32,0) NO 0
39 RetryDelayMinutes integer(32,0) NO 5
40 CurrentRetryCount integer(32,0) NO 0
41 RetryStrategy character varying(20) YES ``
42 DependsOnTaskId uuid YES ``
43 DependsOnStatus character varying(20) YES ``
44 WaitForDependency boolean NO false

Constraints

Type Name Columns
CHECK 17249_17362_10_not_null ``
CHECK 17249_17362_12_not_null ``
CHECK 17249_17362_13_not_null ``
CHECK 17249_17362_1_not_null ``
CHECK 17249_17362_24_not_null ``
CHECK 17249_17362_26_not_null ``
CHECK 17249_17362_27_not_null ``
CHECK 17249_17362_28_not_null ``
CHECK 17249_17362_29_not_null ``
CHECK 17249_17362_2_not_null ``
CHECK 17249_17362_30_not_null ``
CHECK 17249_17362_32_not_null ``
CHECK 17249_17362_33_not_null ``
CHECK 17249_17362_34_not_null ``
CHECK 17249_17362_38_not_null ``
CHECK 17249_17362_39_not_null ``
CHECK 17249_17362_3_not_null ``
CHECK 17249_17362_40_not_null ``
CHECK 17249_17362_44_not_null ``
CHECK 17249_17362_4_not_null ``
FOREIGN KEY FK_ScheduledTask_Agents_AgentId AgentId
FOREIGN KEY FK_ScheduledTask_Procedures_ProcedureId ProcedureId
FOREIGN KEY FK_ScheduledTask_Projects_ProjectId ProjectId
FOREIGN KEY FK_ScheduledTask_SourceBacklogItem SourceBacklogItemId
FOREIGN KEY FK_ScheduledTask_SourceExecution SourceExecutionId
FOREIGN KEY ScheduledTask_DependsOnTaskId_fkey DependsOnTaskId
PRIMARY KEY PK_ScheduledTask Id

Foreign Keys

Name Columns References On Update On Delete
FK_ScheduledTask_Agents_AgentId AgentId public.Agents(Id) NO ACTION SET NULL
FK_ScheduledTask_Procedures_ProcedureId ProcedureId public.Procedures(Id) NO ACTION SET NULL
FK_ScheduledTask_Projects_ProjectId ProjectId public.Projects(Id) NO ACTION SET NULL
FK_ScheduledTask_SourceBacklogItem SourceBacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
FK_ScheduledTask_SourceExecution SourceExecutionId public.Executions(Id) NO ACTION SET NULL
ScheduledTask_DependsOnTaskId_fkey DependsOnTaskId public.ScheduledTask(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_ScheduledTask_AgentId CREATE INDEX "IX_ScheduledTask_AgentId" ON public."ScheduledTask" USING btree ("AgentId")
IX_ScheduledTask_CommandId CREATE INDEX "IX_ScheduledTask_CommandId" ON public."ScheduledTask" USING btree ("CommandId")
IX_ScheduledTask_DependsOnTaskId CREATE INDEX "IX_ScheduledTask_DependsOnTaskId" ON public."ScheduledTask" USING btree ("DependsOnTaskId")
IX_ScheduledTask_PluginId CREATE INDEX "IX_ScheduledTask_PluginId" ON public."ScheduledTask" USING btree ("PluginId")
IX_ScheduledTask_Priority CREATE INDEX "IX_ScheduledTask_Priority" ON public."ScheduledTask" USING btree ("Priority", "PriorityOrder")
IX_ScheduledTask_ProcedureId CREATE INDEX "IX_ScheduledTask_ProcedureId" ON public."ScheduledTask" USING btree ("ProcedureId")
IX_ScheduledTask_ProjectId CREATE INDEX "IX_ScheduledTask_ProjectId" ON public."ScheduledTask" USING btree ("ProjectId")
IX_ScheduledTask_Slug CREATE UNIQUE INDEX "IX_ScheduledTask_Slug" ON public."ScheduledTask" USING btree ("Slug")
IX_ScheduledTask_SourceBacklogItemId CREATE INDEX "IX_ScheduledTask_SourceBacklogItemId" ON public."ScheduledTask" USING btree ("SourceBacklogItemId")
IX_ScheduledTask_SourceExecutionId CREATE INDEX "IX_ScheduledTask_SourceExecutionId" ON public."ScheduledTask" USING btree ("SourceExecutionId")
PK_ScheduledTask CREATE UNIQUE INDEX "PK_ScheduledTask" ON public."ScheduledTask" USING btree ("Id")

public.SessionModes

  • Estimated rows: 5
  • Dead rows: 1
  • Comment: Modos/plantillas de sesión que configuran el layout y comportamiento del Workspace

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid YES ``
3 Name character varying(50) NO ``
4 Description character varying(200) YES ``
5 Icon character varying(50) NO 'Folder'::character varying
6 Color character varying(20) NO 'Primary'::character varying
7 IsSystem boolean NO false
8 IsActive boolean NO true
9 SortOrder integer(32,0) NO 0
10 ShowSnippetsPanel boolean NO true
11 ShowBacklogPanel boolean NO true
12 ShowQuickActionsPanel boolean NO true
13 ShowStatusBar boolean NO true
14 ShowContextPanel boolean NO true
15 ShowSessionsPanel boolean NO true
16 AutoLoadActiveBacklog boolean NO true
17 AutoLoadRelatedDocs boolean NO false
18 AutoLoadRecentLogs boolean NO false
19 BacklogCategoryFilter character varying(200) YES ``
20 SnippetTypeFilter character varying(200) YES ``
21 CustomSystemPrompt text YES ``
22 InitialContext text YES ``
23 UsageCount integer(32,0) NO 0
24 LastUsedAt timestamp with time zone YES ``
25 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
26 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_20143_10_not_null ``
CHECK 17249_20143_11_not_null ``
CHECK 17249_20143_12_not_null ``
CHECK 17249_20143_13_not_null ``
CHECK 17249_20143_14_not_null ``
CHECK 17249_20143_15_not_null ``
CHECK 17249_20143_16_not_null ``
CHECK 17249_20143_17_not_null ``
CHECK 17249_20143_18_not_null ``
CHECK 17249_20143_1_not_null ``
CHECK 17249_20143_23_not_null ``
CHECK 17249_20143_25_not_null ``
CHECK 17249_20143_26_not_null ``
CHECK 17249_20143_3_not_null ``
CHECK 17249_20143_5_not_null ``
CHECK 17249_20143_6_not_null ``
CHECK 17249_20143_7_not_null ``
CHECK 17249_20143_8_not_null ``
CHECK 17249_20143_9_not_null ``
FOREIGN KEY FK_SessionModes_Users UserId
PRIMARY KEY SessionModes_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_SessionModes_Users UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_SessionModes_IsSystem CREATE INDEX "IX_SessionModes_IsSystem" ON public."SessionModes" USING btree ("IsSystem", "SortOrder") WHERE ("IsSystem" = true)
IX_SessionModes_UserId_IsActive CREATE INDEX "IX_SessionModes_UserId_IsActive" ON public."SessionModes" USING btree ("UserId", "IsActive", "SortOrder") WHERE ("UserId" IS NOT NULL)
SessionModes_pkey CREATE UNIQUE INDEX "SessionModes_pkey" ON public."SessionModes" USING btree ("Id")

public.Skills

  • Estimated rows: 116
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id character varying(100) NO ``
2 Name character varying(200) NO ``
3 Description text YES ``
4 Category character varying(50) YES ``
5 ContentMd text NO ''::text
6 ContentPath character varying(500) YES ``
7 IsActive boolean NO true
8 CreatedAt timestamp with time zone NO now()
9 UpdatedAt timestamp with time zone NO now()
10 UsageCount integer(32,0) NO 0
11 LastUsedAt timestamp with time zone YES ``
12 Source character varying(20) NO 'custom'::character varying

Constraints

Type Name Columns
CHECK 17249_17381_10_not_null ``
CHECK 17249_17381_12_not_null ``
CHECK 17249_17381_1_not_null ``
CHECK 17249_17381_2_not_null ``
CHECK 17249_17381_5_not_null ``
CHECK 17249_17381_7_not_null ``
CHECK 17249_17381_8_not_null ``
CHECK 17249_17381_9_not_null ``
PRIMARY KEY Skills_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_Skills_Category CREATE INDEX "IX_Skills_Category" ON public."Skills" USING btree ("Category")
IX_Skills_Source CREATE INDEX "IX_Skills_Source" ON public."Skills" USING btree ("Source")
Skills_pkey CREATE UNIQUE INDEX "Skills_pkey" ON public."Skills" USING btree ("Id")

public.SummaryHistories

  • Estimated rows: 0
  • Dead rows: 0
  • Comment: Historial de resúmenes enviados

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ScheduledSummaryId uuid NO ``
3 Recipients character varying(500) NO ``
4 Content text NO ``
5 SentAt timestamp with time zone NO CURRENT_TIMESTAMP
6 Success boolean NO true
7 ErrorMessage character varying(1000) YES ``
8 PeriodStart timestamp with time zone NO ``
9 PeriodEnd timestamp with time zone NO ``
10 Statistics jsonb YES ``

Constraints

Type Name Columns
CHECK 17249_27919_1_not_null ``
CHECK 17249_27919_2_not_null ``
CHECK 17249_27919_3_not_null ``
CHECK 17249_27919_4_not_null ``
CHECK 17249_27919_5_not_null ``
CHECK 17249_27919_6_not_null ``
CHECK 17249_27919_8_not_null ``
CHECK 17249_27919_9_not_null ``
FOREIGN KEY SummaryHistories_ScheduledSummaryId_fkey ScheduledSummaryId
PRIMARY KEY SummaryHistories_pkey Id

Foreign Keys

Name Columns References On Update On Delete
SummaryHistories_ScheduledSummaryId_fkey ScheduledSummaryId public.ScheduledSummaries(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_SummaryHistories_ScheduledSummaryId CREATE INDEX "IX_SummaryHistories_ScheduledSummaryId" ON public."SummaryHistories" USING btree ("ScheduledSummaryId")
IX_SummaryHistories_SentAt CREATE INDEX "IX_SummaryHistories_SentAt" ON public."SummaryHistories" USING btree ("SentAt")
SummaryHistories_pkey CREATE UNIQUE INDEX "SummaryHistories_pkey" ON public."SummaryHistories" USING btree ("Id")
idx_summary_histories_scheduled_summary_id CREATE INDEX idx_summary_histories_scheduled_summary_id ON public."SummaryHistories" USING btree ("ScheduledSummaryId")
idx_summary_histories_sent_at CREATE INDEX idx_summary_histories_sent_at ON public."SummaryHistories" USING btree ("SentAt")

public.SystemMetrics

  • Estimated rows: 75
  • Dead rows: 0
  • Comment: Metricas del sistema (CPU, RAM, Disk) recolectadas periodicamente

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 RecordedAt timestamp with time zone NO CURRENT_TIMESTAMP
3 Source character varying(50) NO 'orchestrator'::character varying
4 CpuUsagePercent double precision(53,0) NO 0.0
5 CpuCoreCount integer(32,0) NO 0
6 MemoryTotalBytes bigint(64,0) NO 0
7 MemoryUsedBytes bigint(64,0) NO 0
8 MemoryUsagePercent double precision(53,0) NO 0.0
9 DiskTotalBytes bigint(64,0) NO 0
10 DiskUsedBytes bigint(64,0) NO 0
11 DiskUsagePercent double precision(53,0) NO 0.0
12 RunningExecutionsCount integer(32,0) NO 0
13 PendingTasksCount integer(32,0) NO 0
14 IsHealthy boolean NO true
15 HealthIssues text YES ``
16 ActiveProcessCount integer(32,0) NO 0
17 CpuTemperature double precision(53,0) YES ``
18 MemoryAvailableBytes bigint(64,0) NO 0
19 DiskFreeBytes bigint(64,0) NO 0
20 NetworkBytesReceived bigint(64,0) YES ``
21 NetworkBytesSent bigint(64,0) YES ``

Constraints

Type Name Columns
CHECK 17249_17392_10_not_null ``
CHECK 17249_17392_11_not_null ``
CHECK 17249_17392_12_not_null ``
CHECK 17249_17392_13_not_null ``
CHECK 17249_17392_14_not_null ``
CHECK 17249_17392_16_not_null ``
CHECK 17249_17392_18_not_null ``
CHECK 17249_17392_19_not_null ``
CHECK 17249_17392_1_not_null ``
CHECK 17249_17392_2_not_null ``
CHECK 17249_17392_3_not_null ``
CHECK 17249_17392_4_not_null ``
CHECK 17249_17392_5_not_null ``
CHECK 17249_17392_6_not_null ``
CHECK 17249_17392_7_not_null ``
CHECK 17249_17392_8_not_null ``
CHECK 17249_17392_9_not_null ``
PRIMARY KEY SystemMetrics_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_SystemMetrics_RecordedAt CREATE INDEX "IX_SystemMetrics_RecordedAt" ON public."SystemMetrics" USING btree ("RecordedAt" DESC)
IX_SystemMetrics_Source CREATE INDEX "IX_SystemMetrics_Source" ON public."SystemMetrics" USING btree ("Source")
SystemMetrics_pkey CREATE UNIQUE INDEX "SystemMetrics_pkey" ON public."SystemMetrics" USING btree ("Id")

public.SystemThresholds

  • Estimated rows: 3
  • Dead rows: 0
  • Comment: Umbrales de alerta para metricas del sistema

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 MetricName character varying(50) NO ``
3 WarningThreshold double precision(53,0) NO ``
4 CriticalThreshold double precision(53,0) NO ``
5 Enabled boolean NO true
6 NotificationChannel character varying(50) YES ``
7 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
8 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_17414_1_not_null ``
CHECK 17249_17414_2_not_null ``
CHECK 17249_17414_3_not_null ``
CHECK 17249_17414_4_not_null ``
CHECK 17249_17414_5_not_null ``
CHECK 17249_17414_7_not_null ``
CHECK 17249_17414_8_not_null ``
PRIMARY KEY SystemThresholds_pkey Id
UNIQUE SystemThresholds_MetricName_key MetricName

Foreign Keys

No foreign keys found.

Indexes

Name Definition
SystemThresholds_MetricName_key CREATE UNIQUE INDEX "SystemThresholds_MetricName_key" ON public."SystemThresholds" USING btree ("MetricName")
SystemThresholds_pkey CREATE UNIQUE INDEX "SystemThresholds_pkey" ON public."SystemThresholds" USING btree ("Id")

public.TaskCheckpoints

  • Estimated rows: 21
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 CopilotExecutionId uuid NO ``
3 CheckpointType character varying(50) NO 'step_complete'::character varying
4 StepIndex integer(32,0) NO 0
5 StepTitle character varying(500) YES ``
6 StateSnapshotJson text YES ``
7 Notes text YES ``
8 TokensUsedAtCheckpoint integer(32,0) NO 0
9 MessagesAtCheckpoint integer(32,0) NO 0
10 CreatedAt timestamp with time zone NO now()

Constraints

Type Name Columns
CHECK 17249_39115_10_not_null ``
CHECK 17249_39115_1_not_null ``
CHECK 17249_39115_2_not_null ``
CHECK 17249_39115_3_not_null ``
CHECK 17249_39115_4_not_null ``
CHECK 17249_39115_8_not_null ``
CHECK 17249_39115_9_not_null ``
FOREIGN KEY FK_TaskCheckpoints_CopilotExecutions CopilotExecutionId
PRIMARY KEY TaskCheckpoints_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_TaskCheckpoints_CopilotExecutions CopilotExecutionId public.CopilotExecutions(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_TaskCheckpoints_CopilotExecutionId CREATE INDEX "IX_TaskCheckpoints_CopilotExecutionId" ON public."TaskCheckpoints" USING btree ("CopilotExecutionId")
IX_TaskCheckpoints_CreatedAt CREATE INDEX "IX_TaskCheckpoints_CreatedAt" ON public."TaskCheckpoints" USING btree ("CreatedAt" DESC)
IX_TaskCheckpoints_Execution_Latest CREATE INDEX "IX_TaskCheckpoints_Execution_Latest" ON public."TaskCheckpoints" USING btree ("CopilotExecutionId", "StepIndex" DESC, "CreatedAt" DESC)
TaskCheckpoints_pkey CREATE UNIQUE INDEX "TaskCheckpoints_pkey" ON public."TaskCheckpoints" USING btree ("Id")

public.UpeAgentConfigs

  • Estimated rows: 6
  • Dead rows: 6

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 Slug character varying(50) NO ``
4 Name character varying(100) NO ``
5 Description text YES ``
6 SystemPrompt text NO ''::text
7 Model character varying(50) NO 'claude-haiku'::character varying
8 ChannelsJson text YES '["whatsapp","webchat"]'::text
9 MaxTokensPerMessage integer(32,0) YES 4096
10 MaxCostPerDayEur numeric(10,4) YES 5.0
11 UseKnowledgeBase boolean YES true
12 ExtractKnowledge boolean YES true
13 GenerateInsights boolean YES false
14 IsActive boolean YES true
15 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
16 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP
17 ParentAgentConfigId uuid YES ``
18 FallbackModel character varying(50) YES ``
19 AgentTier character varying(20) YES 'specialist'::character varying
20 WorkspacePath character varying(500) YES ``
21 RepositoryUrl character varying(500) YES ``
22 ProjectMetadataJson text YES ``

Constraints

Type Name Columns
CHECK 17249_57874_1_not_null ``
CHECK 17249_57874_2_not_null ``
CHECK 17249_57874_3_not_null ``
CHECK 17249_57874_4_not_null ``
CHECK 17249_57874_6_not_null ``
CHECK 17249_57874_7_not_null ``
FOREIGN KEY UpeAgentConfigs_OrganizationId_fkey OrganizationId
FOREIGN KEY UpeAgentConfigs_ParentAgentConfigId_fkey ParentAgentConfigId
PRIMARY KEY UpeAgentConfigs_pkey Id
UNIQUE UpeAgentConfigs_OrganizationId_Slug_key OrganizationId, Slug

Foreign Keys

Name Columns References On Update On Delete
UpeAgentConfigs_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE
UpeAgentConfigs_ParentAgentConfigId_fkey ParentAgentConfigId public.UpeAgentConfigs(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_UpeAgentConfigs_OrganizationId CREATE INDEX "IX_UpeAgentConfigs_OrganizationId" ON public."UpeAgentConfigs" USING btree ("OrganizationId")
IX_UpeAgentConfigs_ParentAgentConfigId CREATE INDEX "IX_UpeAgentConfigs_ParentAgentConfigId" ON public."UpeAgentConfigs" USING btree ("ParentAgentConfigId")
UpeAgentConfigs_OrganizationId_Slug_key CREATE UNIQUE INDEX "UpeAgentConfigs_OrganizationId_Slug_key" ON public."UpeAgentConfigs" USING btree ("OrganizationId", "Slug")
UpeAgentConfigs_pkey CREATE UNIQUE INDEX "UpeAgentConfigs_pkey" ON public."UpeAgentConfigs" USING btree ("Id")

public.UpeAgentMemorySections

  • Estimated rows: 22
  • Dead rows: 7

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 AgentConfigId uuid NO ``
3 SectionKey character varying(50) NO ``
4 Title character varying(200) NO ``
5 Content text NO ''::text
6 SortOrder integer(32,0) NO 100
7 InheritToChildren boolean NO false
8 IsActive boolean NO true
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
10 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_60114_10_not_null ``
CHECK 17249_60114_1_not_null ``
CHECK 17249_60114_2_not_null ``
CHECK 17249_60114_3_not_null ``
CHECK 17249_60114_4_not_null ``
CHECK 17249_60114_5_not_null ``
CHECK 17249_60114_6_not_null ``
CHECK 17249_60114_7_not_null ``
CHECK 17249_60114_8_not_null ``
CHECK 17249_60114_9_not_null ``
FOREIGN KEY UpeAgentMemorySections_AgentConfigId_fkey AgentConfigId
PRIMARY KEY UpeAgentMemorySections_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeAgentMemorySections_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeAgentMemSec_AgentConfigId CREATE INDEX "IX_UpeAgentMemSec_AgentConfigId" ON public."UpeAgentMemorySections" USING btree ("AgentConfigId")
IX_UpeAgentMemSec_Agent_Key CREATE UNIQUE INDEX "IX_UpeAgentMemSec_Agent_Key" ON public."UpeAgentMemorySections" USING btree ("AgentConfigId", "SectionKey")
UpeAgentMemorySections_pkey CREATE UNIQUE INDEX "UpeAgentMemorySections_pkey" ON public."UpeAgentMemorySections" USING btree ("Id")

public.UpeAgentSkills

  • Estimated rows: 75
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 AgentConfigId uuid NO ``
3 SkillDefinitionId uuid NO ``
4 SortOrder integer(32,0) NO 100
5 ConfigOverrides text YES ``
6 IsActive boolean NO true
7 CreatedAt timestamp with time zone NO now()
8 UpdatedAt timestamp with time zone NO now()

Constraints

Type Name Columns
CHECK 17249_61847_1_not_null ``
CHECK 17249_61847_2_not_null ``
CHECK 17249_61847_3_not_null ``
CHECK 17249_61847_4_not_null ``
CHECK 17249_61847_6_not_null ``
CHECK 17249_61847_7_not_null ``
CHECK 17249_61847_8_not_null ``
FOREIGN KEY UpeAgentSkills_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeAgentSkills_SkillDefinitionId_fkey SkillDefinitionId
PRIMARY KEY UpeAgentSkills_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeAgentSkills_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION CASCADE
UpeAgentSkills_SkillDefinitionId_fkey SkillDefinitionId public.UpeSkillDefinitions(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeAgentSkills_AgentConfigId CREATE INDEX "IX_UpeAgentSkills_AgentConfigId" ON public."UpeAgentSkills" USING btree ("AgentConfigId") WHERE ("IsActive" = true)
IX_UpeAgentSkills_Agent_Skill CREATE UNIQUE INDEX "IX_UpeAgentSkills_Agent_Skill" ON public."UpeAgentSkills" USING btree ("AgentConfigId", "SkillDefinitionId") WHERE ("IsActive" = true)
UpeAgentSkills_pkey CREATE UNIQUE INDEX "UpeAgentSkills_pkey" ON public."UpeAgentSkills" USING btree ("Id")

public.UpeAgentTools

  • Estimated rows: 132
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 AgentConfigId uuid NO ``
3 ToolDefinitionId uuid YES ``
4 ToolGroupId uuid YES ``
5 Policy character varying(10) NO 'allow'::character varying
6 ParameterOverrides jsonb YES ``
7 RateLimitPerDay integer(32,0) YES ``
8 IsActive boolean NO true
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
10 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58547_10_not_null ``
CHECK 17249_58547_1_not_null ``
CHECK 17249_58547_2_not_null ``
CHECK 17249_58547_5_not_null ``
CHECK 17249_58547_8_not_null ``
CHECK 17249_58547_9_not_null ``
CHECK CK_UpeAgentTools_Policy ``
CHECK CK_UpeAgentTools_ToolOrGroup ``
FOREIGN KEY UpeAgentTools_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeAgentTools_ToolDefinitionId_fkey ToolDefinitionId
FOREIGN KEY UpeAgentTools_ToolGroupId_fkey ToolGroupId
PRIMARY KEY UpeAgentTools_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeAgentTools_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION CASCADE
UpeAgentTools_ToolDefinitionId_fkey ToolDefinitionId public.UpeToolDefinitions(Id) NO ACTION CASCADE
UpeAgentTools_ToolGroupId_fkey ToolGroupId public.UpeToolGroups(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeAgentTools_AgentConfigId CREATE INDEX "IX_UpeAgentTools_AgentConfigId" ON public."UpeAgentTools" USING btree ("AgentConfigId")
IX_UpeAgentTools_ToolDefinitionId CREATE INDEX "IX_UpeAgentTools_ToolDefinitionId" ON public."UpeAgentTools" USING btree ("ToolDefinitionId")
IX_UpeAgentTools_ToolGroupId CREATE INDEX "IX_UpeAgentTools_ToolGroupId" ON public."UpeAgentTools" USING btree ("ToolGroupId")
UpeAgentTools_pkey CREATE UNIQUE INDEX "UpeAgentTools_pkey" ON public."UpeAgentTools" USING btree ("Id")

public.UpeAutonomousTasks

  • Estimated rows: 15
  • Dead rows: 29

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 Name character varying(200) NO ``
4 Description text YES ``
5 TaskType character varying(50) NO ``
6 Schedule character varying(100) YES ``
7 NextRunAt timestamp with time zone YES ``
8 LastRunAt timestamp with time zone YES ``
9 Status character varying(50) YES 'active'::character varying
10 LastResult text YES ``
11 LastError text YES ``
12 RunCount integer(32,0) YES 0
13 ErrorCount integer(32,0) YES 0
14 ConfigJson text YES '{}'::text
15 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
16 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP
17 RunningAt timestamp with time zone YES ``
18 ScheduleType character varying(50) NO 'none'::character varying
19 IntervalMs bigint(64,0) YES ``
20 StaggerMs integer(32,0) NO 0
21 AgentConfigId uuid YES ``

Constraints

Type Name Columns
CHECK 17249_58114_18_not_null ``
CHECK 17249_58114_1_not_null ``
CHECK 17249_58114_20_not_null ``
CHECK 17249_58114_2_not_null ``
CHECK 17249_58114_3_not_null ``
CHECK 17249_58114_5_not_null ``
FOREIGN KEY UpeAutonomousTasks_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeAutonomousTasks_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeAutonomousTasks_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeAutonomousTasks_NextRunAt CREATE INDEX "IX_UpeAutonomousTasks_NextRunAt" ON public."UpeAutonomousTasks" USING btree ("NextRunAt") WHERE (("Status")::text = 'active'::text)
IX_UpeAutonomousTasks_OrganizationId CREATE INDEX "IX_UpeAutonomousTasks_OrganizationId" ON public."UpeAutonomousTasks" USING btree ("OrganizationId")
IX_UpeAutonomousTasks_Running CREATE INDEX "IX_UpeAutonomousTasks_Running" ON public."UpeAutonomousTasks" USING btree ("RunningAt") WHERE ("RunningAt" IS NOT NULL)
IX_UpeAutonomousTasks_Scheduler CREATE INDEX "IX_UpeAutonomousTasks_Scheduler" ON public."UpeAutonomousTasks" USING btree ("Status", "RunningAt", "NextRunAt") WHERE ((("Status")::text = 'active'::text) AND ("RunningAt" IS NULL))
UpeAutonomousTasks_pkey CREATE UNIQUE INDEX "UpeAutonomousTasks_pkey" ON public."UpeAutonomousTasks" USING btree ("Id")

public.UpeChannelBindings

  • Estimated rows: 4
  • Dead rows: 1

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 AgentConfigId uuid NO ``
4 Channel character varying(50) NO ``
5 IdentifierPattern character varying(200) YES ``
6 Priority integer(32,0) NO 100
7 IsActive boolean NO true
8 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
9 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58616_1_not_null ``
CHECK 17249_58616_2_not_null ``
CHECK 17249_58616_3_not_null ``
CHECK 17249_58616_4_not_null ``
CHECK 17249_58616_6_not_null ``
CHECK 17249_58616_7_not_null ``
CHECK 17249_58616_8_not_null ``
CHECK 17249_58616_9_not_null ``
FOREIGN KEY UpeChannelBindings_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeChannelBindings_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeChannelBindings_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeChannelBindings_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION CASCADE
UpeChannelBindings_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeChannelBindings_AgentConfigId CREATE INDEX "IX_UpeChannelBindings_AgentConfigId" ON public."UpeChannelBindings" USING btree ("AgentConfigId")
IX_UpeChannelBindings_Channel CREATE INDEX "IX_UpeChannelBindings_Channel" ON public."UpeChannelBindings" USING btree ("Channel")
IX_UpeChannelBindings_OrgChannel CREATE INDEX "IX_UpeChannelBindings_OrgChannel" ON public."UpeChannelBindings" USING btree ("OrganizationId", "Channel", "IsActive")
IX_UpeChannelBindings_OrgId CREATE INDEX "IX_UpeChannelBindings_OrgId" ON public."UpeChannelBindings" USING btree ("OrganizationId")
UpeChannelBindings_pkey CREATE UNIQUE INDEX "UpeChannelBindings_pkey" ON public."UpeChannelBindings" USING btree ("Id")

public.UpeContacts

  • Estimated rows: 1183
  • Dead rows: 71

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 Name character varying(200) NO ``
4 Nickname character varying(100) YES ``
5 EmailsJson text YES '[]'::text
6 PhonesJson text YES '[]'::text
7 OrganizationsJson text YES '[]'::text
8 Role character varying(200) YES ``
9 Relationship character varying(50) YES 'unknown'::character varying
10 Importance integer(32,0) YES 50
11 Notes text YES ``
12 LastContactAt timestamp with time zone YES ``
13 ContactFrequency character varying(20) YES ``
14 Source character varying(50) YES ``
15 TagsJson text YES '[]'::text
16 IsActive boolean YES true
17 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
18 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP
24 ProfileJson text YES ``
25 ProfileGeneratedAt timestamp with time zone YES ``
26 CommunicationStyle text YES ``
27 PreferencesJson text YES ``
28 SummaryText text YES ``

Constraints

Type Name Columns
CHECK 17249_58135_1_not_null ``
CHECK 17249_58135_2_not_null ``
CHECK 17249_58135_3_not_null ``
CHECK UpeContacts_Importance_check ``
FOREIGN KEY UpeContacts_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeContacts_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeContacts_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeContacts_EmailsJson CREATE INDEX "IX_UpeContacts_EmailsJson" ON public."UpeContacts" USING gin ((("EmailsJson")::jsonb) jsonb_path_ops)
IX_UpeContacts_Importance CREATE INDEX "IX_UpeContacts_Importance" ON public."UpeContacts" USING btree ("Importance" DESC)
IX_UpeContacts_Name CREATE INDEX "IX_UpeContacts_Name" ON public."UpeContacts" USING btree ("Name")
IX_UpeContacts_OrganizationId CREATE INDEX "IX_UpeContacts_OrganizationId" ON public."UpeContacts" USING btree ("OrganizationId")
IX_UpeContacts_PhonesJson CREATE INDEX "IX_UpeContacts_PhonesJson" ON public."UpeContacts" USING gin ((("PhonesJson")::jsonb) jsonb_path_ops)
IX_UpeContacts_ProfileGeneratedAt CREATE INDEX "IX_UpeContacts_ProfileGeneratedAt" ON public."UpeContacts" USING btree ("ProfileGeneratedAt") WHERE ("IsActive" = true)
IX_UpeContacts_Relationship CREATE INDEX "IX_UpeContacts_Relationship" ON public."UpeContacts" USING btree ("Relationship")
UpeContacts_pkey CREATE UNIQUE INDEX "UpeContacts_pkey" ON public."UpeContacts" USING btree ("Id")

public.UpeConversationMessages

  • Estimated rows: 1112
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 ConversationId uuid NO ``
3 Role character varying(20) NO ``
4 Content text NO ``
5 TokensUsed integer(32,0) YES ``
6 Model character varying(50) YES ``
7 CostEur numeric(10,6) YES ``
8 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58069_1_not_null ``
CHECK 17249_58069_2_not_null ``
CHECK 17249_58069_3_not_null ``
CHECK 17249_58069_4_not_null ``
FOREIGN KEY UpeConversationMessages_ConversationId_fkey ConversationId
PRIMARY KEY UpeConversationMessages_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeConversationMessages_ConversationId_fkey ConversationId public.UpeConversations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeConversationMessages_ConversationId CREATE INDEX "IX_UpeConversationMessages_ConversationId" ON public."UpeConversationMessages" USING btree ("ConversationId")
IX_UpeConversationMessages_CreatedAt CREATE INDEX "IX_UpeConversationMessages_CreatedAt" ON public."UpeConversationMessages" USING btree ("CreatedAt" DESC)
UpeConversationMessages_pkey CREATE UNIQUE INDEX "UpeConversationMessages_pkey" ON public."UpeConversationMessages" USING btree ("Id")

public.UpeConversations

  • Estimated rows: 57
  • Dead rows: 39

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 AgentConfigId uuid YES ``
4 Channel character varying(50) NO 'chat'::character varying
5 SessionId character varying(200) YES ``
6 ContactIdentifier character varying(200) YES ``
7 Title character varying(500) YES ``
8 Status character varying(20) YES 'active'::character varying
9 TopicsJson text YES '[]'::text
10 ExtractedKnowledgeIdsJson text YES '[]'::text
11 WasHelpful boolean YES ``
12 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
13 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP
14 CompletedAt timestamp with time zone YES ``
15 DelegatedFromAgentId uuid YES ``
16 ContactId uuid YES ``

Constraints

Type Name Columns
CHECK 17249_58040_1_not_null ``
CHECK 17249_58040_2_not_null ``
CHECK 17249_58040_4_not_null ``
FOREIGN KEY UpeConversations_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeConversations_ContactId_fkey ContactId
FOREIGN KEY UpeConversations_DelegatedFromAgentId_fkey DelegatedFromAgentId
FOREIGN KEY UpeConversations_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeConversations_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeConversations_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION SET NULL
UpeConversations_ContactId_fkey ContactId public.UpeContacts(Id) NO ACTION SET NULL
UpeConversations_DelegatedFromAgentId_fkey DelegatedFromAgentId public.UpeAgentConfigs(Id) NO ACTION SET NULL
UpeConversations_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeConversations_AgentConfigId CREATE INDEX "IX_UpeConversations_AgentConfigId" ON public."UpeConversations" USING btree ("AgentConfigId")
IX_UpeConversations_Channel CREATE INDEX "IX_UpeConversations_Channel" ON public."UpeConversations" USING btree ("Channel")
IX_UpeConversations_ContactId CREATE INDEX "IX_UpeConversations_ContactId" ON public."UpeConversations" USING btree ("ContactId")
IX_UpeConversations_CreatedAt CREATE INDEX "IX_UpeConversations_CreatedAt" ON public."UpeConversations" USING btree ("CreatedAt" DESC)
IX_UpeConversations_OrganizationId CREATE INDEX "IX_UpeConversations_OrganizationId" ON public."UpeConversations" USING btree ("OrganizationId")
IX_UpeConversations_SessionId CREATE INDEX "IX_UpeConversations_SessionId" ON public."UpeConversations" USING btree ("SessionId")
UpeConversations_pkey CREATE UNIQUE INDEX "UpeConversations_pkey" ON public."UpeConversations" USING btree ("Id")

public.UpeDataSources

  • Estimated rows: 17
  • Dead rows: 37

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 Name character varying(100) NO ``
4 SourceType character varying(50) NO ``
5 ConfigJson text YES '{}'::text
6 LastSyncAt timestamp with time zone YES ``
7 SyncStatus character varying(20) YES 'pending'::character varying
8 SyncError text YES ``
9 SyncCursor text YES ``
10 SyncIntervalMinutes integer(32,0) YES 60
11 TotalItemsProcessed bigint(64,0) YES 0
12 TotalKnowledgeExtracted bigint(64,0) YES 0
13 IsActive boolean YES true
14 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
15 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_57901_1_not_null ``
CHECK 17249_57901_2_not_null ``
CHECK 17249_57901_3_not_null ``
CHECK 17249_57901_4_not_null ``
FOREIGN KEY UpeDataSources_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeDataSources_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeDataSources_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeDataSources_Name CREATE INDEX "IX_UpeDataSources_Name" ON public."UpeDataSources" USING btree ("Name")
IX_UpeDataSources_OrganizationId CREATE INDEX "IX_UpeDataSources_OrganizationId" ON public."UpeDataSources" USING btree ("OrganizationId")
IX_UpeDataSources_SyncStatus CREATE INDEX "IX_UpeDataSources_SyncStatus" ON public."UpeDataSources" USING btree ("SyncStatus")
UpeDataSources_pkey CREATE UNIQUE INDEX "UpeDataSources_pkey" ON public."UpeDataSources" USING btree ("Id")

public.UpeInsights

  • Estimated rows: 212
  • Dead rows: 1

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 InsightType character varying(50) NO ``
4 Severity character varying(20) YES 'info'::character varying
5 Title character varying(500) NO ``
6 Description text NO ``
7 EvidenceJson text YES '[]'::text
8 SuggestedAction text YES ``
9 ActionTaken boolean YES false
10 ActionResult text YES ``
11 Importance integer(32,0) YES 5
12 Urgency integer(32,0) YES 5
13 Confidence integer(32,0) YES 70
14 Status character varying(20) YES 'new'::character varying
15 IsSeen boolean YES false
16 IsUseful boolean YES ``
17 UserFeedback text YES ``
18 WasNotified boolean YES false
19 NotificationChannel character varying(50) YES ``
20 SeenAt timestamp with time zone YES ``
21 NotifiedAt timestamp with time zone YES ``
22 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
23 AgentConfigId uuid YES ``
24 RelatedConversationId uuid YES ``
25 ExpiresAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_58010_1_not_null ``
CHECK 17249_58010_2_not_null ``
CHECK 17249_58010_3_not_null ``
CHECK 17249_58010_5_not_null ``
CHECK 17249_58010_6_not_null ``
CHECK UpeInsights_Confidence_check ``
CHECK UpeInsights_Importance_check ``
CHECK UpeInsights_Urgency_check ``
FOREIGN KEY UpeInsights_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeInsights_OrganizationId_fkey OrganizationId
FOREIGN KEY UpeInsights_RelatedConversationId_fkey RelatedConversationId
PRIMARY KEY UpeInsights_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeInsights_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION SET NULL
UpeInsights_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE
UpeInsights_RelatedConversationId_fkey RelatedConversationId public.UpeConversations(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_UpeInsights_AgentConfigId CREATE INDEX "IX_UpeInsights_AgentConfigId" ON public."UpeInsights" USING btree ("AgentConfigId")
IX_UpeInsights_CreatedAt CREATE INDEX "IX_UpeInsights_CreatedAt" ON public."UpeInsights" USING btree ("CreatedAt" DESC)
IX_UpeInsights_ExpiresAt CREATE INDEX "IX_UpeInsights_ExpiresAt" ON public."UpeInsights" USING btree ("ExpiresAt") WHERE ("ExpiresAt" IS NOT NULL)
IX_UpeInsights_OrganizationId CREATE INDEX "IX_UpeInsights_OrganizationId" ON public."UpeInsights" USING btree ("OrganizationId")
IX_UpeInsights_RelatedConversationId CREATE INDEX "IX_UpeInsights_RelatedConversationId" ON public."UpeInsights" USING btree ("RelatedConversationId")
IX_UpeInsights_Status CREATE INDEX "IX_UpeInsights_Status" ON public."UpeInsights" USING btree ("Status") WHERE (("Status")::text = ANY ((ARRAY['new'::character varying, 'seen'::character varying])::text[]))
IX_UpeInsights_Status_Importance CREATE INDEX "IX_UpeInsights_Status_Importance" ON public."UpeInsights" USING btree ("Status", "Importance" DESC) WHERE (("Status")::text <> 'dismissed'::text)
IX_UpeInsights_Type CREATE INDEX "IX_UpeInsights_Type" ON public."UpeInsights" USING btree ("InsightType")
UpeInsights_pkey CREATE UNIQUE INDEX "UpeInsights_pkey" ON public."UpeInsights" USING btree ("Id")

public.UpeKnowledge

  • Estimated rows: 446
  • Dead rows: 109

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 Category character varying(50) NO ``
4 Subcategory character varying(50) YES ``
5 Title character varying(500) NO ''::character varying
6 Content text NO ``
7 Summary text YES ``
8 Embedding vector YES ``
9 DataSourceId uuid YES ``
10 SourceRef character varying(500) YES ``
11 Source character varying(50) YES 'unknown'::character varying
12 Confidence integer(32,0) YES 80
13 Importance integer(32,0) YES 50
14 ConfirmationCount integer(32,0) YES 1
15 ContradictionCount integer(32,0) YES 0
16 ValidFrom timestamp with time zone YES ``
17 ValidUntil timestamp with time zone YES ``
18 AccessCount integer(32,0) YES 0
19 LastAccessedAt timestamp with time zone YES ``
20 IsActive boolean YES true
21 IsSensitive boolean YES false
22 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
23 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP
24 NeedsReprocessing boolean YES false
25 AgentConfigId uuid YES ``
26 MemoryScope character varying(20) YES 'global'::character varying
27 ExpiresAt timestamp with time zone YES ``
28 SearchVector tsvector YES ``

Constraints

Type Name Columns
CHECK 17249_57925_1_not_null ``
CHECK 17249_57925_2_not_null ``
CHECK 17249_57925_3_not_null ``
CHECK 17249_57925_5_not_null ``
CHECK 17249_57925_6_not_null ``
CHECK UpeKnowledge_Confidence_check ``
CHECK UpeKnowledge_Importance_check ``
FOREIGN KEY UpeKnowledge_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeKnowledge_DataSourceId_fkey DataSourceId
FOREIGN KEY UpeKnowledge_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeKnowledge_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeKnowledge_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION SET NULL
UpeKnowledge_DataSourceId_fkey DataSourceId public.UpeDataSources(Id) NO ACTION SET NULL
UpeKnowledge_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeKnowledge_AgentConfigId CREATE INDEX "IX_UpeKnowledge_AgentConfigId" ON public."UpeKnowledge" USING btree ("AgentConfigId")
IX_UpeKnowledge_Category CREATE INDEX "IX_UpeKnowledge_Category" ON public."UpeKnowledge" USING btree ("Category")
IX_UpeKnowledge_CreatedAt CREATE INDEX "IX_UpeKnowledge_CreatedAt" ON public."UpeKnowledge" USING btree ("CreatedAt" DESC)
IX_UpeKnowledge_DataSourceId CREATE INDEX "IX_UpeKnowledge_DataSourceId" ON public."UpeKnowledge" USING btree ("DataSourceId")
IX_UpeKnowledge_Embedding CREATE INDEX "IX_UpeKnowledge_Embedding" ON public."UpeKnowledge" USING ivfflat ("Embedding" vector_cosine_ops) WITH (lists='100')
IX_UpeKnowledge_ExpiresAt CREATE INDEX "IX_UpeKnowledge_ExpiresAt" ON public."UpeKnowledge" USING btree ("ExpiresAt") WHERE ("ExpiresAt" IS NOT NULL)
IX_UpeKnowledge_Importance CREATE INDEX "IX_UpeKnowledge_Importance" ON public."UpeKnowledge" USING btree ("Importance" DESC) WHERE ("IsActive" = true)
IX_UpeKnowledge_MemoryScope CREATE INDEX "IX_UpeKnowledge_MemoryScope" ON public."UpeKnowledge" USING btree ("MemoryScope")
IX_UpeKnowledge_OrganizationId CREATE INDEX "IX_UpeKnowledge_OrganizationId" ON public."UpeKnowledge" USING btree ("OrganizationId")
IX_UpeKnowledge_Scope_Agent CREATE INDEX "IX_UpeKnowledge_Scope_Agent" ON public."UpeKnowledge" USING btree ("OrganizationId", "MemoryScope", "AgentConfigId") WHERE ("IsActive" = true)
IX_UpeKnowledge_SearchVector CREATE INDEX "IX_UpeKnowledge_SearchVector" ON public."UpeKnowledge" USING gin ("SearchVector")
IX_UpeKnowledge_SessionMemory CREATE INDEX "IX_UpeKnowledge_SessionMemory" ON public."UpeKnowledge" USING btree ("MemoryScope", "Category", "SourceRef") WHERE ((("MemoryScope")::text = 'session'::text) AND (("Category")::text = 'session-summary'::text) AND ("IsActive" = true))
UpeKnowledge_pkey CREATE UNIQUE INDEX "UpeKnowledge_pkey" ON public."UpeKnowledge" USING btree ("Id")

public.UpeKnowledgeRelations

  • Estimated rows: 71
  • Dead rows: 10

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 FromKnowledgeId uuid NO ``
4 ToKnowledgeId uuid NO ``
5 RelationType character varying(50) NO ``
6 Strength integer(32,0) YES 50
7 Context text YES ``
8 Source character varying(50) YES 'inferred'::character varying
9 IsActive boolean YES true
10 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
11 UpdatedAt timestamp with time zone YES CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_57961_1_not_null ``
CHECK 17249_57961_2_not_null ``
CHECK 17249_57961_3_not_null ``
CHECK 17249_57961_4_not_null ``
CHECK 17249_57961_5_not_null ``
CHECK UpeKnowledgeRelations_Strength_check ``
FOREIGN KEY UpeKnowledgeRelations_FromKnowledgeId_fkey FromKnowledgeId
FOREIGN KEY UpeKnowledgeRelations_OrganizationId_fkey OrganizationId
FOREIGN KEY UpeKnowledgeRelations_ToKnowledgeId_fkey ToKnowledgeId
PRIMARY KEY UpeKnowledgeRelations_pkey Id
UNIQUE UpeKnowledgeRelations_FromKnowledgeId_ToKnowledgeId_Relatio_key FromKnowledgeId, ToKnowledgeId, RelationType

Foreign Keys

Name Columns References On Update On Delete
UpeKnowledgeRelations_FromKnowledgeId_fkey FromKnowledgeId public.UpeKnowledge(Id) NO ACTION CASCADE
UpeKnowledgeRelations_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE
UpeKnowledgeRelations_ToKnowledgeId_fkey ToKnowledgeId public.UpeKnowledge(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeKnowledgeRelations_From CREATE INDEX "IX_UpeKnowledgeRelations_From" ON public."UpeKnowledgeRelations" USING btree ("FromKnowledgeId") WHERE ("IsActive" = true)
IX_UpeKnowledgeRelations_OrganizationId CREATE INDEX "IX_UpeKnowledgeRelations_OrganizationId" ON public."UpeKnowledgeRelations" USING btree ("OrganizationId")
IX_UpeKnowledgeRelations_To CREATE INDEX "IX_UpeKnowledgeRelations_To" ON public."UpeKnowledgeRelations" USING btree ("ToKnowledgeId") WHERE ("IsActive" = true)
IX_UpeKnowledgeRelations_Type CREATE INDEX "IX_UpeKnowledgeRelations_Type" ON public."UpeKnowledgeRelations" USING btree ("RelationType")
UpeKnowledgeRelations_FromKnowledgeId_ToKnowledgeId_Relatio_key CREATE UNIQUE INDEX "UpeKnowledgeRelations_FromKnowledgeId_ToKnowledgeId_Relatio_key" ON public."UpeKnowledgeRelations" USING btree ("FromKnowledgeId", "ToKnowledgeId", "RelationType")
UpeKnowledgeRelations_pkey CREATE UNIQUE INDEX "UpeKnowledgeRelations_pkey" ON public."UpeKnowledgeRelations" USING btree ("Id")

public.UpeKnowledgeTags

  • Estimated rows: 2
  • Dead rows: 3

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 KnowledgeId uuid NO ``
3 Tag character varying(100) NO ``
4 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_57996_1_not_null ``
CHECK 17249_57996_2_not_null ``
CHECK 17249_57996_3_not_null ``
FOREIGN KEY UpeKnowledgeTags_KnowledgeId_fkey KnowledgeId
PRIMARY KEY UpeKnowledgeTags_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeKnowledgeTags_KnowledgeId_fkey KnowledgeId public.UpeKnowledge(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeKnowledgeTags_KnowledgeId CREATE INDEX "IX_UpeKnowledgeTags_KnowledgeId" ON public."UpeKnowledgeTags" USING btree ("KnowledgeId")
IX_UpeKnowledgeTags_Tag CREATE INDEX "IX_UpeKnowledgeTags_Tag" ON public."UpeKnowledgeTags" USING btree ("Tag")
UpeKnowledgeTags_pkey CREATE UNIQUE INDEX "UpeKnowledgeTags_pkey" ON public."UpeKnowledgeTags" USING btree ("Id")

public.UpePlanningDecisions

  • Estimated rows: 2
  • Dead rows: 7

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 GoalId uuid NO ``
3 PlanId uuid YES ``
4 AffectedTaskId uuid YES ``
5 DecisionType character varying(50) NO ``
6 Reason text NO ``
7 PayloadJson jsonb YES ``
8 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_70117_1_not_null ``
CHECK 17249_70117_2_not_null ``
CHECK 17249_70117_5_not_null ``
CHECK 17249_70117_6_not_null ``
CHECK 17249_70117_8_not_null ``
FOREIGN KEY FK_UpePlanningDecisions_Goals GoalId
FOREIGN KEY FK_UpePlanningDecisions_Plans PlanId
PRIMARY KEY PK_UpePlanningDecisions Id

Foreign Keys

Name Columns References On Update On Delete
FK_UpePlanningDecisions_Goals GoalId public.UpePlanningGoals(Id) NO ACTION CASCADE
FK_UpePlanningDecisions_Plans PlanId public.UpePlanningPlans(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_UpePlanningDecisions_CreatedAt CREATE INDEX "IX_UpePlanningDecisions_CreatedAt" ON public."UpePlanningDecisions" USING btree ("CreatedAt" DESC)
IX_UpePlanningDecisions_DecisionType CREATE INDEX "IX_UpePlanningDecisions_DecisionType" ON public."UpePlanningDecisions" USING btree ("DecisionType")
IX_UpePlanningDecisions_GoalId CREATE INDEX "IX_UpePlanningDecisions_GoalId" ON public."UpePlanningDecisions" USING btree ("GoalId")
IX_UpePlanningDecisions_PlanId CREATE INDEX "IX_UpePlanningDecisions_PlanId" ON public."UpePlanningDecisions" USING btree ("PlanId")
PK_UpePlanningDecisions CREATE UNIQUE INDEX "PK_UpePlanningDecisions" ON public."UpePlanningDecisions" USING btree ("Id")

public.UpePlanningGoals

  • Estimated rows: 1
  • Dead rows: 26

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 RawUserInstruction text NO ``
4 Title character varying(500) NO ``
5 NormalizedIntent character varying(200) NO ``
6 ProjectId uuid YES ``
7 ProjectIdsJson jsonb YES ``
8 ConfidenceScore double precision(53,0) NO 0.0
9 Status character varying(30) NO 'planning'::character varying
10 SourceChannel character varying(50) YES ``
11 SourceConversationId uuid YES ``
12 AgentConfigId uuid YES ``
13 RequiresApproval boolean NO true
14 ErrorMessage text YES ``
15 CompletionSummary text YES ``
16 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
17 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_70027_13_not_null ``
CHECK 17249_70027_16_not_null ``
CHECK 17249_70027_17_not_null ``
CHECK 17249_70027_1_not_null ``
CHECK 17249_70027_2_not_null ``
CHECK 17249_70027_3_not_null ``
CHECK 17249_70027_4_not_null ``
CHECK 17249_70027_5_not_null ``
CHECK 17249_70027_8_not_null ``
CHECK 17249_70027_9_not_null ``
FOREIGN KEY FK_UpePlanningGoals_Organizations OrganizationId
FOREIGN KEY FK_UpePlanningGoals_Projects ProjectId
FOREIGN KEY FK_UpePlanningGoals_UpeAgentConfigs AgentConfigId
FOREIGN KEY FK_UpePlanningGoals_UpeConversations SourceConversationId
PRIMARY KEY PK_UpePlanningGoals Id

Foreign Keys

Name Columns References On Update On Delete
FK_UpePlanningGoals_Organizations OrganizationId public.Organizations(Id) NO ACTION CASCADE
FK_UpePlanningGoals_Projects ProjectId public.Projects(Id) NO ACTION SET NULL
FK_UpePlanningGoals_UpeAgentConfigs AgentConfigId public.UpeAgentConfigs(Id) NO ACTION SET NULL
FK_UpePlanningGoals_UpeConversations SourceConversationId public.UpeConversations(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_UpePlanningGoals_AgentConfigId CREATE INDEX "IX_UpePlanningGoals_AgentConfigId" ON public."UpePlanningGoals" USING btree ("AgentConfigId")
IX_UpePlanningGoals_CreatedAt CREATE INDEX "IX_UpePlanningGoals_CreatedAt" ON public."UpePlanningGoals" USING btree ("CreatedAt" DESC)
IX_UpePlanningGoals_OrgStatus CREATE INDEX "IX_UpePlanningGoals_OrgStatus" ON public."UpePlanningGoals" USING btree ("OrganizationId", "Status")
IX_UpePlanningGoals_OrganizationId CREATE INDEX "IX_UpePlanningGoals_OrganizationId" ON public."UpePlanningGoals" USING btree ("OrganizationId")
IX_UpePlanningGoals_ProjectId CREATE INDEX "IX_UpePlanningGoals_ProjectId" ON public."UpePlanningGoals" USING btree ("ProjectId")
IX_UpePlanningGoals_Status CREATE INDEX "IX_UpePlanningGoals_Status" ON public."UpePlanningGoals" USING btree ("Status")
PK_UpePlanningGoals CREATE UNIQUE INDEX "PK_UpePlanningGoals" ON public."UpePlanningGoals" USING btree ("Id")

public.UpePlanningPlans

  • Estimated rows: 1
  • Dead rows: 21

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 GoalId uuid NO ``
3 Version integer(32,0) NO 1
4 Summary text NO ``
5 Status character varying(30) NO 'draft'::character varying
6 ReplanReason text YES ``
7 EstimatedDurationMinutes integer(32,0) YES ``
8 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
9 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_70066_1_not_null ``
CHECK 17249_70066_2_not_null ``
CHECK 17249_70066_3_not_null ``
CHECK 17249_70066_4_not_null ``
CHECK 17249_70066_5_not_null ``
CHECK 17249_70066_8_not_null ``
CHECK 17249_70066_9_not_null ``
FOREIGN KEY FK_UpePlanningPlans_Goals GoalId
PRIMARY KEY PK_UpePlanningPlans Id

Foreign Keys

Name Columns References On Update On Delete
FK_UpePlanningPlans_Goals GoalId public.UpePlanningGoals(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpePlanningPlans_GoalId CREATE INDEX "IX_UpePlanningPlans_GoalId" ON public."UpePlanningPlans" USING btree ("GoalId")
IX_UpePlanningPlans_GoalVersion CREATE UNIQUE INDEX "IX_UpePlanningPlans_GoalVersion" ON public."UpePlanningPlans" USING btree ("GoalId", "Version")
IX_UpePlanningPlans_Status CREATE INDEX "IX_UpePlanningPlans_Status" ON public."UpePlanningPlans" USING btree ("Status")
PK_UpePlanningPlans CREATE UNIQUE INDEX "PK_UpePlanningPlans" ON public."UpePlanningPlans" USING btree ("Id")

public.UpePlanningReviews

  • Estimated rows: 0
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 PlanTaskId uuid NO ``
3 ReviewType character varying(30) NO ``
4 Outcome character varying(30) NO ``
5 RecommendedAction character varying(30) NO ``
6 ConfidenceScore double precision(53,0) NO 0.0
7 Observations text YES ``
8 ReviewDataJson jsonb YES ``
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_70176_1_not_null ``
CHECK 17249_70176_2_not_null ``
CHECK 17249_70176_3_not_null ``
CHECK 17249_70176_4_not_null ``
CHECK 17249_70176_5_not_null ``
CHECK 17249_70176_6_not_null ``
CHECK 17249_70176_9_not_null ``
FOREIGN KEY FK_UpePlanningReviews_Tasks PlanTaskId
PRIMARY KEY PK_UpePlanningReviews Id

Foreign Keys

Name Columns References On Update On Delete
FK_UpePlanningReviews_Tasks PlanTaskId public.UpePlanningTasks(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpePlanningReviews_Outcome CREATE INDEX "IX_UpePlanningReviews_Outcome" ON public."UpePlanningReviews" USING btree ("Outcome")
IX_UpePlanningReviews_PlanTaskId CREATE INDEX "IX_UpePlanningReviews_PlanTaskId" ON public."UpePlanningReviews" USING btree ("PlanTaskId")
PK_UpePlanningReviews CREATE UNIQUE INDEX "PK_UpePlanningReviews" ON public."UpePlanningReviews" USING btree ("Id")

public.UpePlanningTasks

  • Estimated rows: 10
  • Dead rows: 50

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 PlanId uuid NO ``
3 Title character varying(500) NO ``
4 Description text NO ``
5 TaskType character varying(50) NO ``
6 Priority character varying(20) NO 'medium'::character varying
7 ExecutionOrder integer(32,0) NO 0
8 Status character varying(30) NO 'pending'::character varying
9 DependsOnTaskIdsJson jsonb YES ``
10 ScheduledTaskId uuid YES ``
11 ExecutionId uuid YES ``
12 PromptSent text YES ``
13 ResultSummary text YES ``
14 RetryCount integer(32,0) NO 0
15 MaxRetries integer(32,0) NO 2
16 IsDuplicate boolean NO false
17 ConfigJson jsonb YES ``
18 StartedAt timestamp with time zone YES ``
19 CompletedAt timestamp with time zone YES ``
20 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
21 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_70140_14_not_null ``
CHECK 17249_70140_15_not_null ``
CHECK 17249_70140_16_not_null ``
CHECK 17249_70140_1_not_null ``
CHECK 17249_70140_20_not_null ``
CHECK 17249_70140_21_not_null ``
CHECK 17249_70140_2_not_null ``
CHECK 17249_70140_3_not_null ``
CHECK 17249_70140_4_not_null ``
CHECK 17249_70140_5_not_null ``
CHECK 17249_70140_6_not_null ``
CHECK 17249_70140_7_not_null ``
CHECK 17249_70140_8_not_null ``
FOREIGN KEY FK_UpePlanningTasks_Executions ExecutionId
FOREIGN KEY FK_UpePlanningTasks_Plans PlanId
FOREIGN KEY FK_UpePlanningTasks_ScheduledTasks ScheduledTaskId
PRIMARY KEY PK_UpePlanningTasks Id

Foreign Keys

Name Columns References On Update On Delete
FK_UpePlanningTasks_Executions ExecutionId public.Executions(Id) NO ACTION SET NULL
FK_UpePlanningTasks_Plans PlanId public.UpePlanningPlans(Id) NO ACTION CASCADE
FK_UpePlanningTasks_ScheduledTasks ScheduledTaskId public.ScheduledTask(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_UpePlanningTasks_ExecutionId CREATE INDEX "IX_UpePlanningTasks_ExecutionId" ON public."UpePlanningTasks" USING btree ("ExecutionId")
IX_UpePlanningTasks_PlanId CREATE INDEX "IX_UpePlanningTasks_PlanId" ON public."UpePlanningTasks" USING btree ("PlanId")
IX_UpePlanningTasks_PlanOrder CREATE INDEX "IX_UpePlanningTasks_PlanOrder" ON public."UpePlanningTasks" USING btree ("PlanId", "ExecutionOrder")
IX_UpePlanningTasks_ScheduledTaskId CREATE INDEX "IX_UpePlanningTasks_ScheduledTaskId" ON public."UpePlanningTasks" USING btree ("ScheduledTaskId")
IX_UpePlanningTasks_Status CREATE INDEX "IX_UpePlanningTasks_Status" ON public."UpePlanningTasks" USING btree ("Status")
PK_UpePlanningTasks CREATE UNIQUE INDEX "PK_UpePlanningTasks" ON public."UpePlanningTasks" USING btree ("Id")

public.UpeProactiveTriggers

  • Estimated rows: 0
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 AgentConfigId uuid NO ``
4 Name character varying(200) NO ``
5 TriggerType character varying(50) NO ``
6 ConditionJson jsonb NO '{}'::jsonb
7 ActionJson jsonb NO '{}'::jsonb
8 Channel character varying(50) YES ``
9 Recipient character varying(200) YES ``
10 CooldownMinutes integer(32,0) NO 60
11 MaxFirings integer(32,0) NO 0
12 FiringCount integer(32,0) NO 0
13 LastFiredAt timestamp with time zone YES ``
14 Status character varying(20) NO 'active'::character varying
15 CreatedByMessage text YES ``
16 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
17 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_62404_10_not_null ``
CHECK 17249_62404_11_not_null ``
CHECK 17249_62404_12_not_null ``
CHECK 17249_62404_14_not_null ``
CHECK 17249_62404_16_not_null ``
CHECK 17249_62404_17_not_null ``
CHECK 17249_62404_1_not_null ``
CHECK 17249_62404_2_not_null ``
CHECK 17249_62404_3_not_null ``
CHECK 17249_62404_4_not_null ``
CHECK 17249_62404_5_not_null ``
CHECK 17249_62404_6_not_null ``
CHECK 17249_62404_7_not_null ``
FOREIGN KEY UpeProactiveTriggers_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeProactiveTriggers_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeProactiveTriggers_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeProactiveTriggers_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION CASCADE
UpeProactiveTriggers_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeProactiveTriggers_AgentConfigId CREATE INDEX "IX_UpeProactiveTriggers_AgentConfigId" ON public."UpeProactiveTriggers" USING btree ("AgentConfigId")
IX_UpeProactiveTriggers_OrganizationId CREATE INDEX "IX_UpeProactiveTriggers_OrganizationId" ON public."UpeProactiveTriggers" USING btree ("OrganizationId")
IX_UpeProactiveTriggers_Status CREATE INDEX "IX_UpeProactiveTriggers_Status" ON public."UpeProactiveTriggers" USING btree ("Status")
IX_UpeProactiveTriggers_TriggerType_Status CREATE INDEX "IX_UpeProactiveTriggers_TriggerType_Status" ON public."UpeProactiveTriggers" USING btree ("TriggerType", "Status") WHERE (("Status")::text = 'active'::text)
UpeProactiveTriggers_pkey CREATE UNIQUE INDEX "UpeProactiveTriggers_pkey" ON public."UpeProactiveTriggers" USING btree ("Id")

public.UpeSkillDefinitions

  • Estimated rows: 15
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 Name text NO ``
4 Slug text NO ``
5 Description text NO ''::text
6 PromptTemplate text NO ''::text
7 RequiredTools text YES ``
8 RequiredConfig text YES ``
9 Source text NO 'custom'::text
10 IsSystem boolean NO false
11 IsActive boolean NO true
12 Version integer(32,0) NO 1
13 CreatedAt timestamp with time zone NO now()
14 UpdatedAt timestamp with time zone NO now()
15 Tags character varying(500) YES ``
16 AlwaysInclude boolean NO false
17 DependsOn text YES ``

Constraints

Type Name Columns
CHECK 17249_61829_10_not_null ``
CHECK 17249_61829_11_not_null ``
CHECK 17249_61829_12_not_null ``
CHECK 17249_61829_13_not_null ``
CHECK 17249_61829_14_not_null ``
CHECK 17249_61829_16_not_null ``
CHECK 17249_61829_1_not_null ``
CHECK 17249_61829_2_not_null ``
CHECK 17249_61829_3_not_null ``
CHECK 17249_61829_4_not_null ``
CHECK 17249_61829_5_not_null ``
CHECK 17249_61829_6_not_null ``
CHECK 17249_61829_9_not_null ``
PRIMARY KEY UpeSkillDefinitions_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_UpeSkillDefinitions_OrgId_Active CREATE INDEX "IX_UpeSkillDefinitions_OrgId_Active" ON public."UpeSkillDefinitions" USING btree ("OrganizationId") WHERE ("IsActive" = true)
IX_UpeSkillDefinitions_OrgId_Slug CREATE UNIQUE INDEX "IX_UpeSkillDefinitions_OrgId_Slug" ON public."UpeSkillDefinitions" USING btree ("OrganizationId", "Slug")
UpeSkillDefinitions_pkey CREATE UNIQUE INDEX "UpeSkillDefinitions_pkey" ON public."UpeSkillDefinitions" USING btree ("Id")

public.UpeSourceItems

  • Estimated rows: 0
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 DataSourceId uuid NO ``
4 ExternalId character varying(500) NO ``
5 ItemType character varying(50) NO ``
6 Content text YES ``
7 MetadataJson text YES ``
8 ItemDate timestamp with time zone NO ``
9 IsProcessed boolean YES false
10 ExtractedKnowledgeIdsJson text YES '[]'::text
11 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP
12 ProcessedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_58162_1_not_null ``
CHECK 17249_58162_2_not_null ``
CHECK 17249_58162_3_not_null ``
CHECK 17249_58162_4_not_null ``
CHECK 17249_58162_5_not_null ``
CHECK 17249_58162_8_not_null ``
FOREIGN KEY UpeSourceItems_DataSourceId_fkey DataSourceId
FOREIGN KEY UpeSourceItems_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeSourceItems_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeSourceItems_DataSourceId_fkey DataSourceId public.UpeDataSources(Id) NO ACTION CASCADE
UpeSourceItems_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeSourceItems_DataSourceId CREATE INDEX "IX_UpeSourceItems_DataSourceId" ON public."UpeSourceItems" USING btree ("DataSourceId")
IX_UpeSourceItems_ExternalId CREATE INDEX "IX_UpeSourceItems_ExternalId" ON public."UpeSourceItems" USING btree ("ExternalId")
IX_UpeSourceItems_IsProcessed CREATE INDEX "IX_UpeSourceItems_IsProcessed" ON public."UpeSourceItems" USING btree ("IsProcessed") WHERE ("IsProcessed" = false)
IX_UpeSourceItems_OrganizationId CREATE INDEX "IX_UpeSourceItems_OrganizationId" ON public."UpeSourceItems" USING btree ("OrganizationId")
UpeSourceItems_pkey CREATE UNIQUE INDEX "UpeSourceItems_pkey" ON public."UpeSourceItems" USING btree ("Id")

public.UpeTimelineEvents

  • Estimated rows: 1173
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO uuid_generate_v4()
2 OrganizationId uuid NO ``
3 EventType character varying(50) NO ``
4 Title character varying(500) NO ``
5 Description text YES ``
6 KnowledgeIdsJson text YES '{}'::text
7 DataSourceId uuid YES ``
8 SourceRef character varying(500) YES ``
9 OccurredAt timestamp with time zone NO ``
10 EndDate timestamp with time zone YES ``
11 DurationMinutes integer(32,0) YES ``
12 Impact integer(32,0) YES 0
13 EmotionsJson text YES '[]'::text
14 PeopleJson text YES '[]'::text
15 MetadataJson text YES '{}'::text
16 Source character varying(50) YES 'manual'::character varying
17 CreatedAt timestamp with time zone YES CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58085_1_not_null ``
CHECK 17249_58085_2_not_null ``
CHECK 17249_58085_3_not_null ``
CHECK 17249_58085_4_not_null ``
CHECK 17249_58085_9_not_null ``
FOREIGN KEY UpeTimelineEvents_DataSourceId_fkey DataSourceId
FOREIGN KEY UpeTimelineEvents_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeTimelineEvents_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeTimelineEvents_DataSourceId_fkey DataSourceId public.UpeDataSources(Id) NO ACTION SET NULL
UpeTimelineEvents_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeTimelineEvents_DataSourceId CREATE INDEX "IX_UpeTimelineEvents_DataSourceId" ON public."UpeTimelineEvents" USING btree ("DataSourceId")
IX_UpeTimelineEvents_EventType CREATE INDEX "IX_UpeTimelineEvents_EventType" ON public."UpeTimelineEvents" USING btree ("EventType")
IX_UpeTimelineEvents_OccurredAt CREATE INDEX "IX_UpeTimelineEvents_OccurredAt" ON public."UpeTimelineEvents" USING btree ("OccurredAt" DESC)
IX_UpeTimelineEvents_OrganizationId CREATE INDEX "IX_UpeTimelineEvents_OrganizationId" ON public."UpeTimelineEvents" USING btree ("OrganizationId")
UpeTimelineEvents_pkey CREATE UNIQUE INDEX "UpeTimelineEvents_pkey" ON public."UpeTimelineEvents" USING btree ("Id")

public.UpeToolDefinitions

  • Estimated rows: 116
  • Dead rows: 13

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 Name character varying(100) NO ``
4 Slug character varying(50) NO ``
5 Description text YES ``
6 HandlerType character varying(30) NO 'InternalFunction'::character varying
7 ParametersSchema jsonb NO '{}'::jsonb
8 HandlerConfig jsonb NO '{}'::jsonb
9 IsSystem boolean NO false
10 IsActive boolean NO true
11 Version integer(32,0) NO 1
12 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
13 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58486_10_not_null ``
CHECK 17249_58486_11_not_null ``
CHECK 17249_58486_12_not_null ``
CHECK 17249_58486_13_not_null ``
CHECK 17249_58486_1_not_null ``
CHECK 17249_58486_2_not_null ``
CHECK 17249_58486_3_not_null ``
CHECK 17249_58486_4_not_null ``
CHECK 17249_58486_6_not_null ``
CHECK 17249_58486_7_not_null ``
CHECK 17249_58486_8_not_null ``
CHECK 17249_58486_9_not_null ``
FOREIGN KEY UpeToolDefinitions_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeToolDefinitions_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeToolDefinitions_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeToolDefinitions_HandlerType CREATE INDEX "IX_UpeToolDefinitions_HandlerType" ON public."UpeToolDefinitions" USING btree ("HandlerType")
IX_UpeToolDefinitions_OrgId CREATE INDEX "IX_UpeToolDefinitions_OrgId" ON public."UpeToolDefinitions" USING btree ("OrganizationId")
IX_UpeToolDefinitions_OrgId_Slug CREATE UNIQUE INDEX "IX_UpeToolDefinitions_OrgId_Slug" ON public."UpeToolDefinitions" USING btree ("OrganizationId", "Slug")
UpeToolDefinitions_pkey CREATE UNIQUE INDEX "UpeToolDefinitions_pkey" ON public."UpeToolDefinitions" USING btree ("Id")

public.UpeToolExecutions

  • Estimated rows: 553
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 AgentConfigId uuid NO ``
4 ConversationId uuid YES ``
5 ToolDefinitionId uuid YES ``
6 ToolName character varying(100) NO ``
7 InputJson jsonb NO '{}'::jsonb
8 OutputJson jsonb YES ``
9 DurationMs integer(32,0) YES ``
10 Success boolean NO true
11 ErrorMessage text YES ``
12 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58579_10_not_null ``
CHECK 17249_58579_12_not_null ``
CHECK 17249_58579_1_not_null ``
CHECK 17249_58579_2_not_null ``
CHECK 17249_58579_3_not_null ``
CHECK 17249_58579_6_not_null ``
CHECK 17249_58579_7_not_null ``
FOREIGN KEY UpeToolExecutions_AgentConfigId_fkey AgentConfigId
FOREIGN KEY UpeToolExecutions_ConversationId_fkey ConversationId
FOREIGN KEY UpeToolExecutions_OrganizationId_fkey OrganizationId
FOREIGN KEY UpeToolExecutions_ToolDefinitionId_fkey ToolDefinitionId
PRIMARY KEY UpeToolExecutions_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeToolExecutions_AgentConfigId_fkey AgentConfigId public.UpeAgentConfigs(Id) NO ACTION CASCADE
UpeToolExecutions_ConversationId_fkey ConversationId public.UpeConversations(Id) NO ACTION SET NULL
UpeToolExecutions_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE
UpeToolExecutions_ToolDefinitionId_fkey ToolDefinitionId public.UpeToolDefinitions(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_UpeToolExecutions_AgentConfigId CREATE INDEX "IX_UpeToolExecutions_AgentConfigId" ON public."UpeToolExecutions" USING btree ("AgentConfigId")
IX_UpeToolExecutions_ConversationId CREATE INDEX "IX_UpeToolExecutions_ConversationId" ON public."UpeToolExecutions" USING btree ("ConversationId")
IX_UpeToolExecutions_CreatedAt CREATE INDEX "IX_UpeToolExecutions_CreatedAt" ON public."UpeToolExecutions" USING btree ("CreatedAt" DESC)
IX_UpeToolExecutions_OrgId CREATE INDEX "IX_UpeToolExecutions_OrgId" ON public."UpeToolExecutions" USING btree ("OrganizationId")
IX_UpeToolExecutions_ToolName CREATE INDEX "IX_UpeToolExecutions_ToolName" ON public."UpeToolExecutions" USING btree ("ToolName")
UpeToolExecutions_pkey CREATE UNIQUE INDEX "UpeToolExecutions_pkey" ON public."UpeToolExecutions" USING btree ("Id")

public.UpeToolGroupMemberships

  • Estimated rows: 20
  • Dead rows: 5

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ToolDefinitionId uuid NO ``
3 ToolGroupId uuid NO ``
4 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58528_1_not_null ``
CHECK 17249_58528_2_not_null ``
CHECK 17249_58528_3_not_null ``
CHECK 17249_58528_4_not_null ``
FOREIGN KEY UpeToolGroupMemberships_ToolDefinitionId_fkey ToolDefinitionId
FOREIGN KEY UpeToolGroupMemberships_ToolGroupId_fkey ToolGroupId
PRIMARY KEY UpeToolGroupMemberships_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeToolGroupMemberships_ToolDefinitionId_fkey ToolDefinitionId public.UpeToolDefinitions(Id) NO ACTION CASCADE
UpeToolGroupMemberships_ToolGroupId_fkey ToolGroupId public.UpeToolGroups(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeToolGroupMemberships_GroupId CREATE INDEX "IX_UpeToolGroupMemberships_GroupId" ON public."UpeToolGroupMemberships" USING btree ("ToolGroupId")
IX_UpeToolGroupMemberships_ToolId_GroupId CREATE UNIQUE INDEX "IX_UpeToolGroupMemberships_ToolId_GroupId" ON public."UpeToolGroupMemberships" USING btree ("ToolDefinitionId", "ToolGroupId")
UpeToolGroupMemberships_pkey CREATE UNIQUE INDEX "UpeToolGroupMemberships_pkey" ON public."UpeToolGroupMemberships" USING btree ("Id")

public.UpeToolGroups

  • Estimated rows: 4
  • Dead rows: 1

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 OrganizationId uuid NO ``
3 Name character varying(100) NO ``
4 Slug character varying(50) NO ``
5 Description text YES ``
6 IsActive boolean NO true
7 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
8 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_58510_1_not_null ``
CHECK 17249_58510_2_not_null ``
CHECK 17249_58510_3_not_null ``
CHECK 17249_58510_4_not_null ``
CHECK 17249_58510_6_not_null ``
CHECK 17249_58510_7_not_null ``
CHECK 17249_58510_8_not_null ``
FOREIGN KEY UpeToolGroups_OrganizationId_fkey OrganizationId
PRIMARY KEY UpeToolGroups_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UpeToolGroups_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UpeToolGroups_OrgId CREATE INDEX "IX_UpeToolGroups_OrgId" ON public."UpeToolGroups" USING btree ("OrganizationId")
IX_UpeToolGroups_OrgId_Slug CREATE UNIQUE INDEX "IX_UpeToolGroups_OrgId_Slug" ON public."UpeToolGroups" USING btree ("OrganizationId", "Slug")
UpeToolGroups_pkey CREATE UNIQUE INDEX "UpeToolGroups_pkey" ON public."UpeToolGroups" USING btree ("Id")

public.UserGitHubIntegrations

  • Estimated rows: 2
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 GitHubUsername character varying(100) NO ``
4 EncryptedToken text NO ``
5 Scopes character varying(500) YES ``
6 LastValidatedAt timestamp with time zone YES ``
7 IsActive boolean NO true
8 CreatedAt timestamp with time zone NO now()
9 UpdatedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_50049_1_not_null ``
CHECK 17249_50049_2_not_null ``
CHECK 17249_50049_3_not_null ``
CHECK 17249_50049_4_not_null ``
CHECK 17249_50049_7_not_null ``
CHECK 17249_50049_8_not_null ``
FOREIGN KEY FK_UserGitHubIntegrations_Users UserId
PRIMARY KEY UserGitHubIntegrations_pkey Id

Foreign Keys

Name Columns References On Update On Delete
FK_UserGitHubIntegrations_Users UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UserGitHubIntegrations_UserId CREATE UNIQUE INDEX "IX_UserGitHubIntegrations_UserId" ON public."UserGitHubIntegrations" USING btree ("UserId") WHERE ("IsActive" = true)
IX_UserGitHubIntegrations_UserId_Active CREATE UNIQUE INDEX "IX_UserGitHubIntegrations_UserId_Active" ON public."UserGitHubIntegrations" USING btree ("UserId") WHERE ("IsActive" = true)
UserGitHubIntegrations_pkey CREATE UNIQUE INDEX "UserGitHubIntegrations_pkey" ON public."UserGitHubIntegrations" USING btree ("Id")

public.UserMemories

  • Estimated rows: 5
  • Dead rows: 29

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 ProjectId uuid YES ``
4 Category character varying(50) NO 'preference'::character varying
5 Content text NO ``
6 Source character varying(20) NO 'auto'::character varying
7 Confidence integer(32,0) NO 80
8 UseCount integer(32,0) NO 0
9 IsActive boolean NO true
10 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
11 LastUsedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_21023_10_not_null ``
CHECK 17249_21023_1_not_null ``
CHECK 17249_21023_2_not_null ``
CHECK 17249_21023_4_not_null ``
CHECK 17249_21023_5_not_null ``
CHECK 17249_21023_6_not_null ``
CHECK 17249_21023_7_not_null ``
CHECK 17249_21023_8_not_null ``
CHECK 17249_21023_9_not_null ``
FOREIGN KEY UserMemories_ProjectId_fkey ProjectId
FOREIGN KEY UserMemories_UserId_fkey UserId
PRIMARY KEY UserMemories_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UserMemories_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION SET NULL
UserMemories_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UserMemories_IsActive CREATE INDEX "IX_UserMemories_IsActive" ON public."UserMemories" USING btree ("IsActive") WHERE ("IsActive" = true)
IX_UserMemories_ProjectId CREATE INDEX "IX_UserMemories_ProjectId" ON public."UserMemories" USING btree ("ProjectId")
IX_UserMemories_UserId CREATE INDEX "IX_UserMemories_UserId" ON public."UserMemories" USING btree ("UserId")
IX_UserMemories_UserId_Category CREATE INDEX "IX_UserMemories_UserId_Category" ON public."UserMemories" USING btree ("UserId", "Category")
UserMemories_pkey CREATE UNIQUE INDEX "UserMemories_pkey" ON public."UserMemories" USING btree ("Id")

public.UserOrganizations

  • Estimated rows: 4
  • Dead rows: 20

Columns

# Column Type Nullable Default
1 UserId uuid NO ``
2 OrganizationId uuid NO ``
3 Role character varying(50) NO 'Member'::character varying
4 JoinedAt timestamp with time zone NO CURRENT_TIMESTAMP
5 IsDefault boolean NO false
6 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_18136_1_not_null ``
CHECK 17249_18136_2_not_null ``
CHECK 17249_18136_3_not_null ``
CHECK 17249_18136_4_not_null ``
CHECK 17249_18136_5_not_null ``
CHECK 17249_18136_6_not_null ``
FOREIGN KEY UserOrganizations_OrganizationId_fkey OrganizationId
FOREIGN KEY UserOrganizations_UserId_fkey UserId
PRIMARY KEY UserOrganizations_pkey UserId, OrganizationId

Foreign Keys

Name Columns References On Update On Delete
UserOrganizations_OrganizationId_fkey OrganizationId public.Organizations(Id) NO ACTION CASCADE
UserOrganizations_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
UserOrganizations_pkey CREATE UNIQUE INDEX "UserOrganizations_pkey" ON public."UserOrganizations" USING btree ("UserId", "OrganizationId")

public.UserWellnessSettings

  • Estimated rows: 2
  • Dead rows: 4
  • Comment: Configuración de bienestar laboral por usuario

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 WellnessEnabled boolean NO true
4 ShowWellnessWidget boolean NO true
5 EnableBreakReminders boolean NO true
6 EnableSoundNotifications boolean NO false
7 WorkIntervalMinutes integer(32,0) NO 50
8 ShortBreakMinutes integer(32,0) NO 5
9 LongBreakMinutes integer(32,0) NO 15
10 LongBreakAfterSessions integer(32,0) NO 4
11 MaxContinuousWorkMinutes integer(32,0) NO 90
12 ActivityGapThresholdMinutes integer(32,0) NO 10
13 MinimumSessionMinutes integer(32,0) NO 2
14 ReminderIntensity character varying(20) NO 'gentle'::character varying
15 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
16 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_20562_10_not_null ``
CHECK 17249_20562_11_not_null ``
CHECK 17249_20562_12_not_null ``
CHECK 17249_20562_13_not_null ``
CHECK 17249_20562_14_not_null ``
CHECK 17249_20562_15_not_null ``
CHECK 17249_20562_16_not_null ``
CHECK 17249_20562_1_not_null ``
CHECK 17249_20562_2_not_null ``
CHECK 17249_20562_3_not_null ``
CHECK 17249_20562_4_not_null ``
CHECK 17249_20562_5_not_null ``
CHECK 17249_20562_6_not_null ``
CHECK 17249_20562_7_not_null ``
CHECK 17249_20562_8_not_null ``
CHECK 17249_20562_9_not_null ``
FOREIGN KEY UserWellnessSettings_UserId_fkey UserId
PRIMARY KEY UserWellnessSettings_pkey Id

Foreign Keys

Name Columns References On Update On Delete
UserWellnessSettings_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_UserWellnessSettings_UserId CREATE UNIQUE INDEX "IX_UserWellnessSettings_UserId" ON public."UserWellnessSettings" USING btree ("UserId")
UserWellnessSettings_pkey CREATE UNIQUE INDEX "UserWellnessSettings_pkey" ON public."UserWellnessSettings" USING btree ("Id")

public.Users

  • Estimated rows: 3
  • Dead rows: 40

Columns

# Column Type Nullable Default
1 Id uuid NO ``
2 Email character varying(200) NO ``
3 PasswordHash character varying(500) NO ``
4 Name character varying(100) NO ``
5 Role character varying(20) NO ``
6 IsActive boolean NO true
7 CreatedAt timestamp with time zone NO now()
8 LastLoginAt timestamp with time zone YES ``
9 SelectedProjectId uuid YES ``
10 SelectedOrganizationId uuid YES ``
11 EmailVerificationSentAt timestamp with time zone YES ``
12 EmailVerificationToken character varying(100) YES ``
13 EmailVerified boolean NO false
14 WorkspaceState jsonb YES ``

Constraints

Type Name Columns
CHECK 17249_18105_13_not_null ``
CHECK 17249_18105_1_not_null ``
CHECK 17249_18105_2_not_null ``
CHECK 17249_18105_3_not_null ``
CHECK 17249_18105_4_not_null ``
CHECK 17249_18105_5_not_null ``
CHECK 17249_18105_6_not_null ``
CHECK 17249_18105_7_not_null ``
PRIMARY KEY Users_pkey Id
UNIQUE Users_Email_key Email

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_Users_SelectedProjectId CREATE INDEX "IX_Users_SelectedProjectId" ON public."Users" USING btree ("SelectedProjectId")
Users_Email_key CREATE UNIQUE INDEX "Users_Email_key" ON public."Users" USING btree ("Email")
Users_pkey CREATE UNIQUE INDEX "Users_pkey" ON public."Users" USING btree ("Id")

public.WebhookTriggerLogs

  • Estimated rows: 201
  • Dead rows: 0
  • Comment: Log de ejecuciones de triggers

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 TriggerId uuid NO ``
3 TriggeredAt timestamp with time zone NO CURRENT_TIMESTAMP
4 WebhookPayloadJson text YES ``
5 ActionTaken character varying(500) YES ``
6 ExecutionId uuid YES ``
7 BacklogItemId uuid YES ``
8 Success boolean NO true
9 ErrorMessage text YES ``

Constraints

Type Name Columns
CHECK 17249_17421_1_not_null ``
CHECK 17249_17421_2_not_null ``
CHECK 17249_17421_3_not_null ``
CHECK 17249_17421_8_not_null ``
FOREIGN KEY WebhookTriggerLogs_BacklogItemId_fkey BacklogItemId
FOREIGN KEY WebhookTriggerLogs_ExecutionId_fkey ExecutionId
FOREIGN KEY WebhookTriggerLogs_TriggerId_fkey TriggerId
PRIMARY KEY WebhookTriggerLogs_pkey Id

Foreign Keys

Name Columns References On Update On Delete
WebhookTriggerLogs_BacklogItemId_fkey BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
WebhookTriggerLogs_ExecutionId_fkey ExecutionId public.Executions(Id) NO ACTION SET NULL
WebhookTriggerLogs_TriggerId_fkey TriggerId public.WebhookTriggers(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_WebhookTriggerLogs_TriggerId CREATE INDEX "IX_WebhookTriggerLogs_TriggerId" ON public."WebhookTriggerLogs" USING btree ("TriggerId")
IX_WebhookTriggerLogs_TriggeredAt CREATE INDEX "IX_WebhookTriggerLogs_TriggeredAt" ON public."WebhookTriggerLogs" USING btree ("TriggeredAt" DESC)
WebhookTriggerLogs_pkey CREATE UNIQUE INDEX "WebhookTriggerLogs_pkey" ON public."WebhookTriggerLogs" USING btree ("Id")

public.WebhookTriggers

  • Estimated rows: 1
  • Dead rows: 0
  • Comment: Triggers basados en webhooks externos (Sentry, GitHub)

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 Name character varying(100) NO ``
3 Description text YES ``
4 Source character varying(50) NO ``
5 EventType character varying(50) NO ``
6 FilterConditions text YES ``
7 ActionType character varying(50) NO 'execute_task'::character varying
8 TaskId uuid YES ``
9 ProcedureId character varying(100) YES ``
10 ProjectId uuid YES ``
11 PromptTemplate text YES ``
12 PassPayloadAsContext boolean NO true
13 DelayMinutes integer(32,0) YES ``
14 CooldownMinutes integer(32,0) NO 0
15 LastTriggeredAt timestamp with time zone YES ``
16 TriggerCount integer(32,0) NO 0
17 Enabled boolean NO true
18 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
19 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_17429_12_not_null ``
CHECK 17249_17429_14_not_null ``
CHECK 17249_17429_16_not_null ``
CHECK 17249_17429_17_not_null ``
CHECK 17249_17429_18_not_null ``
CHECK 17249_17429_19_not_null ``
CHECK 17249_17429_1_not_null ``
CHECK 17249_17429_2_not_null ``
CHECK 17249_17429_4_not_null ``
CHECK 17249_17429_5_not_null ``
CHECK 17249_17429_7_not_null ``
FOREIGN KEY WebhookTriggers_ProcedureId_fkey ProcedureId
FOREIGN KEY WebhookTriggers_ProjectId_fkey ProjectId
FOREIGN KEY WebhookTriggers_TaskId_fkey TaskId
PRIMARY KEY WebhookTriggers_pkey Id

Foreign Keys

Name Columns References On Update On Delete
WebhookTriggers_ProcedureId_fkey ProcedureId public.Procedures(Id) NO ACTION SET NULL
WebhookTriggers_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION SET NULL
WebhookTriggers_TaskId_fkey TaskId public.ScheduledTask(Id) NO ACTION SET NULL

Indexes

Name Definition
IX_WebhookTriggers_Enabled CREATE INDEX "IX_WebhookTriggers_Enabled" ON public."WebhookTriggers" USING btree ("Enabled")
IX_WebhookTriggers_SourceEvent CREATE INDEX "IX_WebhookTriggers_SourceEvent" ON public."WebhookTriggers" USING btree ("Source", "EventType")
WebhookTriggers_pkey CREATE UNIQUE INDEX "WebhookTriggers_pkey" ON public."WebhookTriggers" USING btree ("Id")

public.WellnessRecords

  • Estimated rows: 62
  • Dead rows: 33
  • Comment: Registros diarios de bienestar del desarrollador (tiempo trabajo, pausas, mood)

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 UserId uuid NO ``
3 RecordDate date NO ``
4 TotalWorkMinutes integer(32,0) NO 0
5 TotalBreakMinutes integer(32,0) NO 0
6 BreaksTaken integer(32,0) NO 0
7 BreakRemindersShown integer(32,0) NO 0
8 BreakRemindersIgnored integer(32,0) NO 0
9 LongestSessionWithoutBreak integer(32,0) NO 0
10 FirstWorkStartTime time without time zone YES ``
11 LastWorkEndTime time without time zone YES ``
12 WellnessScore integer(32,0) NO 0
13 UserNotes character varying(500) YES ``
14 MoodRating integer(32,0) NO 0
15 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
16 UpdatedAt timestamp with time zone NO CURRENT_TIMESTAMP

Constraints

Type Name Columns
CHECK 17249_20175_12_not_null ``
CHECK 17249_20175_14_not_null ``
CHECK 17249_20175_15_not_null ``
CHECK 17249_20175_16_not_null ``
CHECK 17249_20175_1_not_null ``
CHECK 17249_20175_2_not_null ``
CHECK 17249_20175_3_not_null ``
CHECK 17249_20175_4_not_null ``
CHECK 17249_20175_5_not_null ``
CHECK 17249_20175_6_not_null ``
CHECK 17249_20175_7_not_null ``
CHECK 17249_20175_8_not_null ``
CHECK 17249_20175_9_not_null ``
FOREIGN KEY FK_WellnessRecords_Users UserId
PRIMARY KEY WellnessRecords_pkey Id
UNIQUE UQ_WellnessRecords_UserId_Date UserId, RecordDate
UNIQUE UQ_WellnessRecords_UserId_RecordDate UserId, RecordDate

Foreign Keys

Name Columns References On Update On Delete
FK_WellnessRecords_Users UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
UQ_WellnessRecords_UserId_Date CREATE UNIQUE INDEX "UQ_WellnessRecords_UserId_Date" ON public."WellnessRecords" USING btree ("UserId", "RecordDate")
UQ_WellnessRecords_UserId_RecordDate CREATE UNIQUE INDEX "UQ_WellnessRecords_UserId_RecordDate" ON public."WellnessRecords" USING btree ("UserId", "RecordDate")
WellnessRecords_pkey CREATE UNIQUE INDEX "WellnessRecords_pkey" ON public."WellnessRecords" USING btree ("Id")

public.WhatsappGroupConfigs

  • Estimated rows: 6
  • Dead rows: 5
  • Comment: Configuración personalizada por grupo de WhatsApp

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 GroupJid character varying(200) NO ``
3 GroupName character varying(300) NO ``
4 IsActive boolean NO true
5 TranscribeAudio boolean NO true
6 OnlyRespondToAdmins boolean NO false
7 BlacklistedWords character varying(2000) YES ``
8 WhitelistedWords character varying(2000) YES ``
9 CreatedAt timestamp with time zone NO CURRENT_TIMESTAMP
10 UpdatedAt timestamp with time zone YES ``

Constraints

Type Name Columns
CHECK 17249_27886_1_not_null ``
CHECK 17249_27886_2_not_null ``
CHECK 17249_27886_3_not_null ``
CHECK 17249_27886_4_not_null ``
CHECK 17249_27886_5_not_null ``
CHECK 17249_27886_6_not_null ``
CHECK 17249_27886_9_not_null ``
PRIMARY KEY WhatsappGroupConfigs_pkey Id
UNIQUE WhatsappGroupConfigs_GroupJid_key GroupJid

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_WhatsappGroupConfigs_GroupJid CREATE UNIQUE INDEX "IX_WhatsappGroupConfigs_GroupJid" ON public."WhatsappGroupConfigs" USING btree ("GroupJid")
WhatsappGroupConfigs_GroupJid_key CREATE UNIQUE INDEX "WhatsappGroupConfigs_GroupJid_key" ON public."WhatsappGroupConfigs" USING btree ("GroupJid")
WhatsappGroupConfigs_pkey CREATE UNIQUE INDEX "WhatsappGroupConfigs_pkey" ON public."WhatsappGroupConfigs" USING btree ("Id")
idx_whatsapp_group_configs_group_jid CREATE INDEX idx_whatsapp_group_configs_group_jid ON public."WhatsappGroupConfigs" USING btree ("GroupJid")
idx_whatsapp_group_configs_is_active CREATE INDEX idx_whatsapp_group_configs_is_active ON public."WhatsappGroupConfigs" USING btree ("IsActive")

public.WhatsappMessageLogs

  • Estimated rows: 923
  • Dead rows: 0

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 ReceivedAt timestamp with time zone NO now()
3 FromNumber character varying(50) NO ``
4 FromName character varying(200) YES ``
5 ToNumber character varying(50) YES ``
6 MessageType character varying(50) YES 'text'::character varying
7 MessageBody text YES ``
8 ExternalMessageId character varying(200) YES ``
9 Status character varying(20) YES 'processed'::character varying
10 DiscardReason character varying(500) YES ``
11 RawPayloadJson jsonb YES ``
12 MessageTimestamp timestamp with time zone YES ``
13 MediaUrl text YES ``
14 Caption text YES ``
15 Mimetype character varying(100) YES ``
16 TranscribedText text YES ``
17 AudioDuration double precision(53,0) YES ``
18 DetectedLanguage character varying(10) YES ``
19 Direction character varying(20) NO 'incoming'::character varying
20 Channel character varying(20) NO 'whatsapp'::character varying

Constraints

Type Name Columns
CHECK 17249_18624_19_not_null ``
CHECK 17249_18624_1_not_null ``
CHECK 17249_18624_20_not_null ``
CHECK 17249_18624_2_not_null ``
CHECK 17249_18624_3_not_null ``
PRIMARY KEY WhatsappMessageLogs_pkey Id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
IX_WhatsappMessageLogs_Channel CREATE INDEX "IX_WhatsappMessageLogs_Channel" ON public."WhatsappMessageLogs" USING btree ("Channel")
IX_WhatsappMessageLogs_Direction CREATE INDEX "IX_WhatsappMessageLogs_Direction" ON public."WhatsappMessageLogs" USING btree ("Direction")
IX_WhatsappMessageLogs_FromNumber CREATE INDEX "IX_WhatsappMessageLogs_FromNumber" ON public."WhatsappMessageLogs" USING btree ("FromNumber")
IX_WhatsappMessageLogs_MediaUrl CREATE INDEX "IX_WhatsappMessageLogs_MediaUrl" ON public."WhatsappMessageLogs" USING btree ("MediaUrl") WHERE ("MediaUrl" IS NOT NULL)
IX_WhatsappMessageLogs_MessageType CREATE INDEX "IX_WhatsappMessageLogs_MessageType" ON public."WhatsappMessageLogs" USING btree ("MessageType")
IX_WhatsappMessageLogs_ReceivedAt CREATE INDEX "IX_WhatsappMessageLogs_ReceivedAt" ON public."WhatsappMessageLogs" USING btree ("ReceivedAt")
IX_WhatsappMessageLogs_ReceivedAt_Status CREATE INDEX "IX_WhatsappMessageLogs_ReceivedAt_Status" ON public."WhatsappMessageLogs" USING btree ("ReceivedAt", "Status")
IX_WhatsappMessageLogs_Status CREATE INDEX "IX_WhatsappMessageLogs_Status" ON public."WhatsappMessageLogs" USING btree ("Status")
IX_WhatsappMessageLogs_TranscribedText_FullText CREATE INDEX "IX_WhatsappMessageLogs_TranscribedText_FullText" ON public."WhatsappMessageLogs" USING gin (to_tsvector('spanish'::regconfig, COALESCE("TranscribedText", ''::text))) WHERE ("TranscribedText" IS NOT NULL)
IX_WhatsappMessageLogs_Type_ReceivedAt CREATE INDEX "IX_WhatsappMessageLogs_Type_ReceivedAt" ON public."WhatsappMessageLogs" USING btree ("MessageType", "ReceivedAt" DESC)
WhatsappMessageLogs_pkey CREATE UNIQUE INDEX "WhatsappMessageLogs_pkey" ON public."WhatsappMessageLogs" USING btree ("Id")

public.WorkSessions

  • Estimated rows: 180
  • Dead rows: 26

Columns

# Column Type Nullable Default
1 Id uuid NO gen_random_uuid()
2 DevSessionId uuid NO ``
3 UserId uuid NO ``
4 ProjectId uuid YES ``
5 BacklogItemId uuid YES ``
6 StartedAt timestamp with time zone NO CURRENT_TIMESTAMP
7 EndedAt timestamp with time zone YES ``
8 LastActivityAt timestamp with time zone NO CURRENT_TIMESTAMP
9 ActiveMinutes integer(32,0) NO 0
10 IdleMinutes integer(32,0) NO 0
11 MessagesCount integer(32,0) NO 0
12 TokensUsed integer(32,0) NO 0
13 InputTokens integer(32,0) NO 0
14 OutputTokens integer(32,0) NO 0
15 CommitsCount integer(32,0) NO 0
16 FilesModifiedCount integer(32,0) NO 0
17 LinesAdded integer(32,0) NO 0
18 LinesRemoved integer(32,0) NO 0
19 CommitMessagesJson jsonb YES ``
20 FilesModifiedJson jsonb YES ``
21 ToolsUsedJson jsonb YES ``
22 Status character varying(20) NO 'active'::character varying
23 Notes text YES ``
24 ActiveSecondsRemainder integer(32,0) NO 0
25 IdleSecondsRemainder integer(32,0) NO 0

Constraints

Type Name Columns
CHECK 17249_20027_10_not_null ``
CHECK 17249_20027_11_not_null ``
CHECK 17249_20027_12_not_null ``
CHECK 17249_20027_13_not_null ``
CHECK 17249_20027_14_not_null ``
CHECK 17249_20027_15_not_null ``
CHECK 17249_20027_16_not_null ``
CHECK 17249_20027_17_not_null ``
CHECK 17249_20027_18_not_null ``
CHECK 17249_20027_1_not_null ``
CHECK 17249_20027_22_not_null ``
CHECK 17249_20027_24_not_null ``
CHECK 17249_20027_25_not_null ``
CHECK 17249_20027_2_not_null ``
CHECK 17249_20027_3_not_null ``
CHECK 17249_20027_6_not_null ``
CHECK 17249_20027_8_not_null ``
CHECK 17249_20027_9_not_null ``
FOREIGN KEY WorkSessions_BacklogItemId_fkey BacklogItemId
FOREIGN KEY WorkSessions_DevSessionId_fkey DevSessionId
FOREIGN KEY WorkSessions_ProjectId_fkey ProjectId
FOREIGN KEY WorkSessions_UserId_fkey UserId
PRIMARY KEY WorkSessions_pkey Id

Foreign Keys

Name Columns References On Update On Delete
WorkSessions_BacklogItemId_fkey BacklogItemId public.BacklogItems(Id) NO ACTION SET NULL
WorkSessions_DevSessionId_fkey DevSessionId public.DevSessions(Id) NO ACTION CASCADE
WorkSessions_ProjectId_fkey ProjectId public.Projects(Id) NO ACTION SET NULL
WorkSessions_UserId_fkey UserId public.Users(Id) NO ACTION CASCADE

Indexes

Name Definition
IX_WorkSessions_BacklogItemId CREATE INDEX "IX_WorkSessions_BacklogItemId" ON public."WorkSessions" USING btree ("BacklogItemId")
IX_WorkSessions_DevSessionId CREATE INDEX "IX_WorkSessions_DevSessionId" ON public."WorkSessions" USING btree ("DevSessionId")
IX_WorkSessions_ProjectId CREATE INDEX "IX_WorkSessions_ProjectId" ON public."WorkSessions" USING btree ("ProjectId")
IX_WorkSessions_Status CREATE INDEX "IX_WorkSessions_Status" ON public."WorkSessions" USING btree ("Status")
IX_WorkSessions_UserId_StartedAt CREATE INDEX "IX_WorkSessions_UserId_StartedAt" ON public."WorkSessions" USING btree ("UserId", "StartedAt" DESC)
WorkSessions_pkey CREATE UNIQUE INDEX "WorkSessions_pkey" ON public."WorkSessions" USING btree ("Id")

public.__EFMigrationsHistory

  • Estimated rows: 35
  • Dead rows: 1

Columns

# Column Type Nullable Default
1 MigrationId character varying(150) NO ``
2 ProductVersion character varying(32) NO ``

Constraints

Type Name Columns
CHECK 17249_17442_1_not_null ``
CHECK 17249_17442_2_not_null ``
PRIMARY KEY PK___EFMigrationsHistory MigrationId

Foreign Keys

No foreign keys found.

Indexes

Name Definition
PK___EFMigrationsHistory CREATE UNIQUE INDEX "PK___EFMigrationsHistory" ON public."__EFMigrationsHistory" USING btree ("MigrationId")

public.system_logs

  • Estimated rows: 227499
  • Dead rows: 0
  • Comment: Tabla centralizada de logs del sistema

Columns

# Column Type Nullable Default
1 id bigint(64,0) NO nextval('system_logs_id_seq'::regclass)
2 timestamp timestamp with time zone NO now()
3 level character varying(20) NO 'Information'::character varying
4 message text NO ``
5 message_template character varying(1000) YES ``
6 exception text YES ``
7 properties jsonb YES ``
8 service_name character varying(100) NO 'unknown'::character varying
9 correlation_id character varying(50) YES ``
10 user_id character varying(50) YES ``
11 session_id character varying(50) YES ``
12 execution_id character varying(50) YES ``
13 batch_id character varying(50) YES ``
14 source_context character varying(200) YES ``
15 request_method character varying(10) YES ``
16 request_path character varying(500) YES ``
17 status_code integer(32,0) YES ``
18 duration_ms bigint(64,0) YES ``
19 machine_name character varying(100) YES ``
20 thread_id integer(32,0) YES ``
21 category character varying(50) YES ``

Constraints

Type Name Columns
CHECK 17249_21291_1_not_null ``
CHECK 17249_21291_2_not_null ``
CHECK 17249_21291_3_not_null ``
CHECK 17249_21291_4_not_null ``
CHECK 17249_21291_8_not_null ``
PRIMARY KEY system_logs_pkey id

Foreign Keys

No foreign keys found.

Indexes

Name Definition
ix_system_logs_category CREATE INDEX ix_system_logs_category ON public.system_logs USING btree (category) WHERE (category IS NOT NULL)
ix_system_logs_correlation_id CREATE INDEX ix_system_logs_correlation_id ON public.system_logs USING btree (correlation_id) WHERE (correlation_id IS NOT NULL)
ix_system_logs_execution_id CREATE INDEX ix_system_logs_execution_id ON public.system_logs USING btree (execution_id) WHERE (execution_id IS NOT NULL)
ix_system_logs_level CREATE INDEX ix_system_logs_level ON public.system_logs USING btree (level)
ix_system_logs_properties CREATE INDEX ix_system_logs_properties ON public.system_logs USING gin (properties)
ix_system_logs_service_name CREATE INDEX ix_system_logs_service_name ON public.system_logs USING btree (service_name)
ix_system_logs_session_id CREATE INDEX ix_system_logs_session_id ON public.system_logs USING btree (session_id) WHERE (session_id IS NOT NULL)
ix_system_logs_timestamp CREATE INDEX ix_system_logs_timestamp ON public.system_logs USING btree ("timestamp" DESC)
ix_system_logs_timestamp_level CREATE INDEX ix_system_logs_timestamp_level ON public.system_logs USING btree ("timestamp" DESC, level)
system_logs_pkey CREATE UNIQUE INDEX system_logs_pkey ON public.system_logs USING btree (id)