🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
⚡️ perf(database): index stale-run scan and per-member message counts (#23435)
YuTengjingba533d78c993
diff --git a/apps/server/src/services/agentRuntime/StaleOperationReaper.ts b/apps/server/src/services/agentRuntime/StaleOperationReaper.tsindex 93cb9029d98..d72618602a0 100644--- a/apps/server/src/services/agentRuntime/StaleOperationReaper.ts+++ b/apps/server/src/services/agentRuntime/StaleOperationReaper.ts@@ -48,6 +48,21 @@ const DEFAULT_LIMIT = 50;*/const DEFAULT_LOOKBACK_MS = 24 * 60 * 60_000;+/**+ * Oldest `created_at` a candidate may have, applied to both `running` scans.+ *+ * It is what lets them use the partial index+ * `agent_operations_running_created_at_idx`: without it they read every+ * `running` row through `agent_operations_status_idx` and discard all but a+ * few dozen, and the dead rows described above made each sweep read ~75k+ * blocks (8.8s mean in production). An index on `updated_at` would avoid the+ * bound, but every write bumps `updated_at` through `$onUpdate`, so it would+ * turn the table's HOT updates (62% of all updates) into full index rewrites;+ * `created_at` never changes. A week is far past any real run: over three days+ * of production rows the longest-lived `running` operation was ~5h.+ */+const DEFAULT_MAX_RUN_AGE_MS = 7 * 24 * 60 * 60_000;+const isHeterogeneousProvider = (provider: string | null | undefined): boolean =>!!provider &&(isLocalHeterogeneousType(provider) ||@@ -64,6 +79,8 @@ export interface ReapStaleOperationsParams {/** Ignore rows whose lease froze longer ago than this. */lookbackMs?: number;maxRedriveAttempts?: number;+ /** Ignore rows created longer ago than this — see `DEFAULT_MAX_RUN_AGE_MS`. */+ maxRunAgeMs?: number;staleAfterMs?: number;}@@ -147,8 +164,9 @@ export class StaleOperationReaper {const staleBefore = new Date(now - staleAfterMs);const heteroStaleBefore = new Date(now - (params?.heteroSilenceMs ?? HETERO_SILENCE_MS));const notBefore = new Date(now - (params?.lookbackMs ?? DEFAULT_LOOKBACK_MS));+ const createdAfter = new Date(now - (params?.maxRunAgeMs ?? DEFAULT_MAX_RUN_AGE_MS));- const candidates = await this.listStaleRunning(staleBefore, notBefore, limit);+ const candidates = await this.listStaleRunning({ createdAfter, limit, notBefore, staleBefore });const result: ReapStaleOperationsResult = {abandoned: 0,alive: 0,@@ -176,8 +194,10 @@ export class StaleOperationReaper {}try {- result.concurrentForegroundTopics =- await this.reportConcurrentForegroundRuns(heteroStaleBefore);+ result.concurrentForegroundTopics = await this.reportConcurrentForegroundRuns(+ heteroStaleBefore,+ createdAfter,+ );} catch (e) {log('concurrent foreground patrol failed: %O', e);}@@ -198,7 +218,10 @@ export class StaleOperationReaper {* made up the bulk of production warn logs. Every live run refreshes its* lease well inside this window (90s heartbeat, or a hetero ingest batch).*/- private async reportConcurrentForegroundRuns(liveSince: Date): Promise<number> {+ private async reportConcurrentForegroundRuns(+ liveSince: Date,+ createdAfter: Date,+ ): Promise<number> {const rows = await this.db.select({operationIds: sql<@@ -214,6 +237,8 @@ export class StaleOperationReaper {isNull(agentOperations.threadId),isNull(agentOperations.parentOperationId),gte(agentOperations.updatedAt, liveSince),+ // Index bound only — see DEFAULT_MAX_RUN_AGE_MS.+ gte(agentOperations.createdAt, createdAfter),or(isNull(agentOperations.trigger),notInArray(agentOperations.trigger, [...BACKGROUND_OPERATION_TRIGGERS]),@@ -251,7 +276,17 @@ export class StaleOperationReaper {* model with the row's own owner so ownership is still enforced where it* matters.*/- private async listStaleRunning(staleBefore: Date, notBefore: Date, limit: number) {+ private async listStaleRunning({+ createdAfter,+ limit,+ notBefore,+ staleBefore,+ }: {+ createdAfter: Date;+ limit: number;+ notBefore: Date;+ staleBefore: Date;+ }) {return (this.db// Only what recovery needs: everything else about the run is read from@@ -271,6 +306,8 @@ export class StaleOperationReaper {// See DEFAULT_LOOKBACK_MS: without this floor the oldest-first// window is permanently filled by long-dead rows.gte(agentOperations.updatedAt, notBefore),+ // Index bound only — see DEFAULT_MAX_RUN_AGE_MS.+ gte(agentOperations.createdAt, createdAfter),// A never-heartbeated row is only meaningful once it is older than// the window too; `startedAt` is the lease's initial value.or(isNull(agentOperations.startedAt), lt(agentOperations.startedAt, staleBefore)),diff --git a/apps/server/src/services/agentRuntime/__tests__/StaleOperationReaper.test.ts b/apps/server/src/services/agentRuntime/__tests__/StaleOperationReaper.test.tsindex 8349ee443dd..8a5af7fe6e0 100644--- a/apps/server/src/services/agentRuntime/__tests__/StaleOperationReaper.test.ts+++ b/apps/server/src/services/agentRuntime/__tests__/StaleOperationReaper.test.ts@@ -203,6 +203,27 @@ describe('StaleOperationReaper', () => {);});+ it('bounds both running scans by creation time so they can use the partial index', async () => {+ // Without a `created_at` floor both scans walked every `running` row+ // through `agent_operations_status_idx` (8.8s mean in production);+ // `agent_operations_running_created_at_idx` only helps when it is bounded.+ const before = Date.now();+ await buildReaper([], runningState()).sweep();++ expect(whereConditions).toHaveLength(2);+ for (const condition of whereConditions) {+ const { params, sql } = new PgDialect().sqlToQuery(condition);+ expect(sql).toMatch(/"created_at" >= \$\d+/);+ const floor = params.find(+ (p) => typeof p === 'string' && new Date(p).getTime() <= before - 6 * 24 * 60 * 60_000,+ );+ expect(floor).toBeDefined();+ expect(new Date(floor as string).getTime()).toBeGreaterThanOrEqual(+ before - 7 * 24 * 60 * 60_000 - 1000,+ );+ }+ });+it('abandons a stateless heterogeneous run silent past the hetero window', async () => {// 2026-10-12: a device-dispatched Codex run went silent when its desktop// dropped off, the gateway inactivity watchdog never fired for it, and itdiff --git a/docs/development/database-schema.dbml b/docs/development/database-schema.dbmlindex f9475d91554..643c5400013 100644--- a/docs/development/database-schema.dbml+++ b/docs/development/database-schema.dbml@@ -902,6 +902,7 @@ table agent_operations {chat_group_id [name: 'agent_operations_chat_group_id_idx']parent_operation_id [name: 'agent_operations_parent_operation_id_idx']status [name: 'agent_operations_status_idx']+ created_at [name: 'agent_operations_running_created_at_idx'](user_id, created_at) [name: 'agent_operations_user_id_created_at_idx'](workspace_id, created_at) [name: 'agent_operations_workspace_id_created_at_idx']metadata [name: 'agent_operations_metadata_idx']@@ -3395,6 +3396,7 @@ table messages {parent_id [name: 'messages_parent_id_idx']quota_id [name: 'messages_quota_id_idx']user_id [name: 'messages_user_id_idx']+ (user_id, topic_id) [name: 'messages_user_id_topic_id_idx']session_id [name: 'messages_session_id_idx']thread_id [name: 'messages_thread_id_idx']agent_id [name: 'messages_agent_id_idx']diff --git a/packages/database/migrations/0223_running_operations_and_message_author_indexes.sql b/packages/database/migrations/0223_running_operations_and_message_author_indexes.sqlnew file mode 100644index 00000000000..b390e533a64--- /dev/null+++ b/packages/database/migrations/0223_running_operations_and_message_author_indexes.sql@@ -0,0 +1,11 @@+-- Indexes for two slow production scans on large tables:+-- - agent_operations_running_created_at_idx: StaleOperationReaper's `running` scans, which+-- otherwise read every `running` row through agent_operations_status_idx.+-- - messages_user_id_topic_id_idx: per-member message counts joined to topics (workspace usage+-- stats), which otherwise fetch every message the member ever wrote from the heap.+-- Create them on production with CREATE INDEX CONCURRENTLY before this migration ships, so this+-- no-ops there: drizzle runs a migration inside a transaction, where CONCURRENTLY is not allowed+-- and a plain CREATE INDEX would block writes to these tables for the whole build. Small databases+-- (self-hosted, preview, tests) just build them here.+CREATE INDEX IF NOT EXISTS "agent_operations_running_created_at_idx" ON "agent_operations" USING btree ("created_at") WHERE "agent_operations"."status" = 'running';--> statement-breakpoint+CREATE INDEX IF NOT EXISTS "messages_user_id_topic_id_idx" ON "messages" USING btree ("user_id","topic_id");\ No newline at end of filediff --git a/packages/database/migrations/meta/0213_snapshot.json b/packages/database/migrations/meta/0223_snapshot.jsonsimilarity index 87%rename from packages/database/migrations/meta/0213_snapshot.jsonrename to packages/database/migrations/meta/0223_snapshot.jsonindex a0572c93cad..c1d487fa1f4 100644--- a/packages/database/migrations/meta/0213_snapshot.json+++ b/packages/database/migrations/meta/0223_snapshot.json@@ -1,28 +1,8 @@{- "_meta": {- "columns": {},- "schemas": {},- "tables": {}- },+ "id": "e4b7cfb6-736f-455b-a78e-7a6383945adc",+ "prevId": "367a1cd7-ebf2-48db-9e9c-ec804563b475",+ "version": "7","dialect": "postgresql",- "enums": {},- "id": "46e3c4ea-97e4-4a8e-87d2-d89b786c7131",- "policies": {},- "prevId": "839a7f65-d033-45df-8b5e-1f80a983f758",- "roles": {},- "schemas": {},- "sequences": {- "public.fts_search_sync_revision_seq": {- "name": "fts_search_sync_revision_seq",- "schema": "public",- "increment": "1",- "startWith": "1",- "minValue": "1",- "maxValue": "9223372036854775807",- "cache": "1",- "cycle": false- }- },"tables": {"public.acceptance_comments": {"name": "acceptance_comments",@@ -328,8 +308,12 @@"name": "acceptance_comments_acceptance_id_acceptances_id_fk","tableFrom": "acceptance_comments","tableTo": "acceptances",- "columnsFrom": ["acceptance_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "acceptance_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -337,8 +321,12 @@"name": "acceptance_comments_author_user_id_users_id_fk","tableFrom": "acceptance_comments","tableTo": "users",- "columnsFrom": ["author_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "author_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -346,8 +334,12 @@"name": "acceptance_comments_author_agent_id_agents_id_fk","tableFrom": "acceptance_comments","tableTo": "agents",- "columnsFrom": ["author_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "author_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -355,8 +347,12 @@"name": "acceptance_comments_workspace_id_workspaces_id_fk","tableFrom": "acceptance_comments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -364,8 +360,12 @@"name": "acceptance_comments_parent_comment_id_acceptance_comments_id_fk","tableFrom": "acceptance_comments","tableTo": "acceptance_comments",- "columnsFrom": ["parent_comment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_comment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"},@@ -373,8 +373,12 @@"name": "acceptance_comments_context_run_id_verify_runs_id_fk","tableFrom": "acceptance_comments","tableTo": "verify_runs",- "columnsFrom": ["context_run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "context_run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -382,8 +386,12 @@"name": "acceptance_comments_evidence_id_verify_evidence_id_fk","tableFrom": "acceptance_comments","tableTo": "verify_evidence",- "columnsFrom": ["evidence_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "evidence_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -391,8 +399,12 @@"name": "acceptance_comments_review_mark_id_acceptance_review_marks_id_fk","tableFrom": "acceptance_comments","tableTo": "acceptance_review_marks",- "columnsFrom": ["review_mark_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "review_mark_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -400,8 +412,12 @@"name": "acceptance_comments_resolved_by_user_id_users_id_fk","tableFrom": "acceptance_comments","tableTo": "users",- "columnsFrom": ["resolved_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "resolved_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -510,8 +526,12 @@"name": "acceptance_flow_edges_flow_id_acceptance_flows_id_fk","tableFrom": "acceptance_flow_edges","tableTo": "acceptance_flows",- "columnsFrom": ["flow_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "flow_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -519,8 +539,14 @@"name": "acceptance_flow_edges_flow_id_source_node_id_acceptance_flow_nodes_flow_id_id_fk","tableFrom": "acceptance_flow_edges","tableTo": "acceptance_flow_nodes",- "columnsFrom": ["flow_id", "source_node_id"],- "columnsTo": ["flow_id", "id"],+ "columnsFrom": [+ "flow_id",+ "source_node_id"+ ],+ "columnsTo": [+ "flow_id",+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -528,8 +554,14 @@"name": "acceptance_flow_edges_flow_id_target_node_id_acceptance_flow_nodes_flow_id_id_fk","tableFrom": "acceptance_flow_edges","tableTo": "acceptance_flow_nodes",- "columnsFrom": ["flow_id", "target_node_id"],- "columnsTo": ["flow_id", "id"],+ "columnsFrom": [+ "flow_id",+ "target_node_id"+ ],+ "columnsTo": [+ "flow_id",+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -657,8 +689,12 @@"name": "acceptance_flow_nodes_flow_id_acceptance_flows_id_fk","tableFrom": "acceptance_flow_nodes","tableTo": "acceptance_flows",- "columnsFrom": ["flow_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "flow_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -666,8 +702,12 @@"name": "acceptance_flow_nodes_criterion_id_verify_criteria_id_fk","tableFrom": "acceptance_flow_nodes","tableTo": "verify_criteria",- "columnsFrom": ["criterion_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "criterion_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"},@@ -675,8 +715,12 @@"name": "acceptance_flow_nodes_sub_flow_id_acceptance_flows_id_fk","tableFrom": "acceptance_flow_nodes","tableTo": "acceptance_flows",- "columnsFrom": ["sub_flow_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "sub_flow_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"}@@ -759,8 +803,12 @@"name": "acceptance_flows_acceptance_id_acceptances_id_fk","tableFrom": "acceptance_flows","tableTo": "acceptances",- "columnsFrom": ["acceptance_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "acceptance_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -975,8 +1023,12 @@"name": "acceptance_review_marks_review_id_acceptance_reviews_id_fk","tableFrom": "acceptance_review_marks","tableTo": "acceptance_reviews",- "columnsFrom": ["review_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "review_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -984,8 +1036,12 @@"name": "acceptance_review_marks_screenshot_file_id_files_id_fk","tableFrom": "acceptance_review_marks","tableTo": "files",- "columnsFrom": ["screenshot_file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "screenshot_file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -1167,8 +1223,12 @@"name": "acceptance_reviews_site_id_project_sites_id_fk","tableFrom": "acceptance_reviews","tableTo": "project_sites",- "columnsFrom": ["site_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "site_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1176,8 +1236,12 @@"name": "acceptance_reviews_user_id_users_id_fk","tableFrom": "acceptance_reviews","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -1185,8 +1249,12 @@"name": "acceptance_reviews_workspace_id_workspaces_id_fk","tableFrom": "acceptance_reviews","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1194,8 +1262,12 @@"name": "acceptance_reviews_project_id_projects_id_fk","tableFrom": "acceptance_reviews","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -1203,8 +1275,12 @@"name": "acceptance_reviews_task_id_tasks_id_fk","tableFrom": "acceptance_reviews","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -1633,8 +1709,12 @@"name": "agents_user_id_users_id_fk","tableFrom": "agents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1642,8 +1722,12 @@"name": "agents_workspace_id_workspaces_id_fk","tableFrom": "agents","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1651,8 +1735,12 @@"name": "agents_session_group_id_session_groups_id_fk","tableFrom": "agents","tableTo": "session_groups",- "columnsFrom": ["session_group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "session_group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -1787,8 +1875,12 @@"name": "agents_files_file_id_files_id_fk","tableFrom": "agents_files","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1796,8 +1888,12 @@"name": "agents_files_agent_id_agents_id_fk","tableFrom": "agents_files","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1805,8 +1901,12 @@"name": "agents_files_user_id_users_id_fk","tableFrom": "agents_files","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1814,8 +1914,12 @@"name": "agents_files_workspace_id_workspaces_id_fk","tableFrom": "agents_files","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -1823,7 +1927,11 @@"compositePrimaryKeys": {"agents_files_file_id_agent_id_user_id_pk": {"name": "agents_files_file_id_agent_id_user_id_pk",- "columns": ["file_id", "agent_id", "user_id"]+ "columns": [+ "file_id",+ "agent_id",+ "user_id"+ ]}},"uniqueConstraints": {},@@ -1955,8 +2063,12 @@"name": "agents_knowledge_bases_agent_id_agents_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1964,8 +2076,12 @@"name": "agents_knowledge_bases_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "knowledge_bases",- "columnsFrom": ["knowledge_base_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "knowledge_base_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1973,8 +2089,12 @@"name": "agents_knowledge_bases_user_id_users_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -1982,8 +2102,12 @@"name": "agents_knowledge_bases_workspace_id_workspaces_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -1991,7 +2115,10 @@"compositePrimaryKeys": {"agents_knowledge_bases_agent_id_knowledge_base_id_pk": {"name": "agents_knowledge_bases_agent_id_knowledge_base_id_pk",- "columns": ["agent_id", "knowledge_base_id"]+ "columns": [+ "agent_id",+ "knowledge_base_id"+ ]}},"uniqueConstraints": {},@@ -2227,8 +2354,12 @@"name": "agent_accounts_agent_id_agents_id_fk","tableFrom": "agent_accounts","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2236,8 +2367,12 @@"name": "agent_accounts_user_id_users_id_fk","tableFrom": "agent_accounts","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2245,8 +2380,12 @@"name": "agent_accounts_workspace_id_workspaces_id_fk","tableFrom": "agent_accounts","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -2428,8 +2567,12 @@"name": "agent_bot_providers_agent_id_agents_id_fk","tableFrom": "agent_bot_providers","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2437,8 +2580,12 @@"name": "agent_bot_providers_user_id_users_id_fk","tableFrom": "agent_bot_providers","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2446,8 +2593,12 @@"name": "agent_bot_providers_workspace_id_workspaces_id_fk","tableFrom": "agent_bot_providers","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -2713,8 +2864,12 @@"name": "agent_cron_jobs_agent_id_agents_id_fk","tableFrom": "agent_cron_jobs","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2722,8 +2877,12 @@"name": "agent_cron_jobs_group_id_chat_groups_id_fk","tableFrom": "agent_cron_jobs","tableTo": "chat_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2731,8 +2890,12 @@"name": "agent_cron_jobs_user_id_users_id_fk","tableFrom": "agent_cron_jobs","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -2740,8 +2903,12 @@"name": "agent_cron_jobs_workspace_id_workspaces_id_fk","tableFrom": "agent_cron_jobs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -3179,8 +3346,12 @@"name": "agent_documents_user_id_users_id_fk","tableFrom": "agent_documents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3188,8 +3359,12 @@"name": "agent_documents_workspace_id_workspaces_id_fk","tableFrom": "agent_documents","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3197,8 +3372,12 @@"name": "agent_documents_agent_id_agents_id_fk","tableFrom": "agent_documents","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3206,8 +3385,12 @@"name": "agent_documents_document_id_documents_id_fk","tableFrom": "agent_documents","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3215,8 +3398,12 @@"name": "agent_documents_deleted_by_user_id_users_id_fk","tableFrom": "agent_documents","tableTo": "users",- "columnsFrom": ["deleted_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "deleted_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -3224,8 +3411,12 @@"name": "agent_documents_deleted_by_agent_id_agents_id_fk","tableFrom": "agent_documents","tableTo": "agents",- "columnsFrom": ["deleted_by_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "deleted_by_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -3486,8 +3677,12 @@"name": "agent_eval_memories_user_id_users_id_fk","tableFrom": "agent_eval_memories","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3495,8 +3690,12 @@"name": "agent_eval_memories_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_memories","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3504,8 +3703,12 @@"name": "agent_eval_memories_run_id_agent_eval_runs_id_fk","tableFrom": "agent_eval_memories","tableTo": "agent_eval_runs",- "columnsFrom": ["run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3513,8 +3716,12 @@"name": "agent_eval_memories_topic_id_topics_id_fk","tableFrom": "agent_eval_memories","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -3522,8 +3729,12 @@"name": "agent_eval_memories_thread_id_threads_id_fk","tableFrom": "agent_eval_memories","tableTo": "threads",- "columnsFrom": ["thread_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "thread_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -3717,8 +3928,12 @@"name": "agent_eval_benchmarks_user_id_users_id_fk","tableFrom": "agent_eval_benchmarks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3726,8 +3941,12 @@"name": "agent_eval_benchmarks_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_benchmarks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -3941,8 +4160,12 @@"name": "agent_eval_datasets_benchmark_id_agent_eval_benchmarks_id_fk","tableFrom": "agent_eval_datasets","tableTo": "agent_eval_benchmarks",- "columnsFrom": ["benchmark_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "benchmark_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3950,8 +4173,12 @@"name": "agent_eval_datasets_source_experiment_id_agent_eval_experiments_id_fk","tableFrom": "agent_eval_datasets","tableTo": "agent_eval_experiments",- "columnsFrom": ["source_experiment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_experiment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -3959,8 +4186,12 @@"name": "agent_eval_datasets_user_id_users_id_fk","tableFrom": "agent_eval_datasets","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -3968,8 +4199,12 @@"name": "agent_eval_datasets_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_datasets","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -4136,8 +4371,12 @@"name": "agent_eval_environments_user_id_users_id_fk","tableFrom": "agent_eval_environments","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4145,8 +4384,12 @@"name": "agent_eval_environments_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_environments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -4245,8 +4488,12 @@"name": "agent_eval_experiment_benchmarks_experiment_id_agent_eval_experiments_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "agent_eval_experiments",- "columnsFrom": ["experiment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "experiment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4254,8 +4501,12 @@"name": "agent_eval_experiment_benchmarks_benchmark_id_agent_eval_benchmarks_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "agent_eval_benchmarks",- "columnsFrom": ["benchmark_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "benchmark_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4263,8 +4514,12 @@"name": "agent_eval_experiment_benchmarks_user_id_users_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4272,8 +4527,12 @@"name": "agent_eval_experiment_benchmarks_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -4281,7 +4540,10 @@"compositePrimaryKeys": {"agent_eval_experiment_benchmarks_experiment_id_benchmark_id_pk": {"name": "agent_eval_experiment_benchmarks_experiment_id_benchmark_id_pk",- "columns": ["experiment_id", "benchmark_id"]+ "columns": [+ "experiment_id",+ "benchmark_id"+ ]}},"uniqueConstraints": {},@@ -4388,8 +4650,12 @@"name": "agent_eval_experiments_user_id_users_id_fk","tableFrom": "agent_eval_experiments","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4397,8 +4663,12 @@"name": "agent_eval_experiments_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_experiments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -4542,8 +4812,12 @@"name": "agent_eval_run_topics_user_id_users_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4551,8 +4825,12 @@"name": "agent_eval_run_topics_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4560,8 +4838,12 @@"name": "agent_eval_run_topics_run_id_agent_eval_runs_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "agent_eval_runs",- "columnsFrom": ["run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4569,8 +4851,12 @@"name": "agent_eval_run_topics_topic_id_topics_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4578,8 +4864,12 @@"name": "agent_eval_run_topics_test_case_id_agent_eval_test_cases_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "agent_eval_test_cases",- "columnsFrom": ["test_case_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "test_case_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -4587,7 +4877,10 @@"compositePrimaryKeys": {"agent_eval_run_topics_run_id_topic_id_pk": {"name": "agent_eval_run_topics_run_id_topic_id_pk",- "columns": ["run_id", "topic_id"]+ "columns": [+ "run_id",+ "topic_id"+ ]}},"uniqueConstraints": {},@@ -4806,8 +5099,12 @@"name": "agent_eval_runs_dataset_id_agent_eval_datasets_id_fk","tableFrom": "agent_eval_runs","tableTo": "agent_eval_datasets",- "columnsFrom": ["dataset_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dataset_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4815,8 +5112,12 @@"name": "agent_eval_runs_experiment_id_agent_eval_experiments_id_fk","tableFrom": "agent_eval_runs","tableTo": "agent_eval_experiments",- "columnsFrom": ["experiment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "experiment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"},@@ -4824,8 +5125,12 @@"name": "agent_eval_runs_target_agent_id_agents_id_fk","tableFrom": "agent_eval_runs","tableTo": "agents",- "columnsFrom": ["target_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "target_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4833,8 +5138,12 @@"name": "agent_eval_runs_user_id_users_id_fk","tableFrom": "agent_eval_runs","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4842,8 +5151,12 @@"name": "agent_eval_runs_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_runs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -4851,8 +5164,12 @@"name": "agent_eval_runs_parent_run_id_agent_eval_runs_id_fk","tableFrom": "agent_eval_runs","tableTo": "agent_eval_runs",- "columnsFrom": ["parent_run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"}@@ -5031,8 +5348,12 @@"name": "agent_eval_test_cases_user_id_users_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5040,8 +5361,12 @@"name": "agent_eval_test_cases_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5049,8 +5374,12 @@"name": "agent_eval_test_cases_dataset_id_agent_eval_datasets_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "agent_eval_datasets",- "columnsFrom": ["dataset_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dataset_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5058,8 +5387,12 @@"name": "agent_eval_test_cases_environment_id_agent_eval_environments_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "agent_eval_environments",- "columnsFrom": ["environment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "environment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -5137,8 +5470,12 @@"name": "agent_history_job_agents_job_id_agent_history_jobs_id_fk","tableFrom": "agent_history_job_agents","tableTo": "agent_history_jobs",- "columnsFrom": ["job_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "job_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5146,8 +5483,12 @@"name": "agent_history_job_agents_agent_id_agents_id_fk","tableFrom": "agent_history_job_agents","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -5225,8 +5566,12 @@"name": "agent_history_job_groups_job_id_agent_history_jobs_id_fk","tableFrom": "agent_history_job_groups","tableTo": "agent_history_jobs",- "columnsFrom": ["job_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "job_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5234,8 +5579,12 @@"name": "agent_history_job_groups_group_id_chat_groups_id_fk","tableFrom": "agent_history_job_groups","tableTo": "chat_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -5359,8 +5708,12 @@"name": "agent_history_job_topics_job_id_agent_history_jobs_id_fk","tableFrom": "agent_history_job_topics","tableTo": "agent_history_jobs",- "columnsFrom": ["job_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "job_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5368,8 +5721,12 @@"name": "agent_history_job_topics_topic_id_topics_id_fk","tableFrom": "agent_history_job_topics","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -5871,8 +6228,12 @@"name": "agent_inbox_messages_agent_id_agents_id_fk","tableFrom": "agent_inbox_messages","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5880,8 +6241,12 @@"name": "agent_inbox_messages_user_id_users_id_fk","tableFrom": "agent_inbox_messages","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5889,8 +6254,12 @@"name": "agent_inbox_messages_workspace_id_workspaces_id_fk","tableFrom": "agent_inbox_messages","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5898,8 +6267,12 @@"name": "agent_inbox_messages_account_id_agent_accounts_id_fk","tableFrom": "agent_inbox_messages","tableTo": "agent_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -5907,8 +6280,12 @@"name": "agent_inbox_messages_topic_id_topics_id_fk","tableFrom": "agent_inbox_messages","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -6222,8 +6599,12 @@"name": "agent_intervention_resolutions_operation_id_agent_operations_id_fk","tableFrom": "agent_intervention_resolutions","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6231,8 +6612,12 @@"name": "agent_intervention_resolutions_user_id_users_id_fk","tableFrom": "agent_intervention_resolutions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6240,8 +6625,12 @@"name": "agent_intervention_resolutions_workspace_id_workspaces_id_fk","tableFrom": "agent_intervention_resolutions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -6705,8 +7094,12 @@"name": "agent_interventions_operation_id_agent_operations_id_fk","tableFrom": "agent_interventions","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6714,8 +7107,12 @@"name": "agent_interventions_user_id_users_id_fk","tableFrom": "agent_interventions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6723,8 +7120,12 @@"name": "agent_interventions_workspace_id_workspaces_id_fk","tableFrom": "agent_interventions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6732,8 +7133,12 @@"name": "agent_interventions_resolution_id_agent_intervention_resolutions_id_fk","tableFrom": "agent_interventions","tableTo": "agent_intervention_resolutions",- "columnsFrom": ["resolution_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "resolution_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -6895,8 +7300,12 @@"name": "agent_label_assignments_label_id_agent_labels_id_fk","tableFrom": "agent_label_assignments","tableTo": "agent_labels",- "columnsFrom": ["label_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "label_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6904,8 +7313,12 @@"name": "agent_label_assignments_agent_id_agents_id_fk","tableFrom": "agent_label_assignments","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6913,8 +7326,12 @@"name": "agent_label_assignments_user_id_users_id_fk","tableFrom": "agent_label_assignments","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -6922,8 +7339,12 @@"name": "agent_label_assignments_workspace_id_workspaces_id_fk","tableFrom": "agent_label_assignments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -7085,8 +7506,12 @@"name": "agent_labels_user_id_users_id_fk","tableFrom": "agent_labels","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -7094,8 +7519,12 @@"name": "agent_labels_workspace_id_workspaces_id_fk","tableFrom": "agent_labels","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -7378,8 +7807,12 @@"name": "agent_mails_agent_id_agents_id_fk","tableFrom": "agent_mails","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -7387,8 +7820,12 @@"name": "agent_mails_user_id_users_id_fk","tableFrom": "agent_mails","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -7396,8 +7833,12 @@"name": "agent_mails_workspace_id_workspaces_id_fk","tableFrom": "agent_mails","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -7405,8 +7846,12 @@"name": "agent_mails_account_id_agent_accounts_id_fk","tableFrom": "agent_mails","tableTo": "agent_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -7414,8 +7859,12 @@"name": "agent_mails_signal_id_signals_id_fk","tableFrom": "agent_mails","tableTo": "signals",- "columnsFrom": ["signal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "signal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -7836,6 +8285,22 @@"method": "btree","with": {}},+ "agent_operations_running_created_at_idx": {+ "name": "agent_operations_running_created_at_idx",+ "columns": [+ {+ "expression": "created_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"agent_operations\".\"status\" = 'running'",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },"agent_operations_user_id_created_at_idx": {"name": "agent_operations_user_id_created_at_idx","columns": [@@ -7899,8 +8364,12 @@"name": "agent_operations_workspace_id_workspaces_id_fk","tableFrom": "agent_operations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -7908,8 +8377,12 @@"name": "agent_operations_agent_id_agents_id_fk","tableFrom": "agent_operations","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -7917,8 +8390,12 @@"name": "agent_operations_topic_id_topics_id_fk","tableFrom": "agent_operations","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -7926,8 +8403,12 @@"name": "agent_operations_thread_id_threads_id_fk","tableFrom": "agent_operations","tableTo": "threads",- "columnsFrom": ["thread_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "thread_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -7935,8 +8416,12 @@"name": "agent_operations_task_id_tasks_id_fk","tableFrom": "agent_operations","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -7944,8 +8429,12 @@"name": "agent_operations_chat_group_id_chat_groups_id_fk","tableFrom": "agent_operations","tableTo": "chat_groups",- "columnsFrom": ["chat_group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chat_group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -8145,8 +8634,12 @@"name": "agent_account_bindings_agent_id_agents_id_fk","tableFrom": "agent_account_bindings","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8154,8 +8647,12 @@"name": "agent_account_bindings_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_account_bindings","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8163,8 +8660,12 @@"name": "agent_account_bindings_user_id_users_id_fk","tableFrom": "agent_account_bindings","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8172,8 +8673,12 @@"name": "agent_account_bindings_workspace_id_workspaces_id_fk","tableFrom": "agent_account_bindings","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -8341,8 +8846,12 @@"name": "agent_device_account_bindings_agent_id_agents_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8350,8 +8859,12 @@"name": "agent_device_account_bindings_user_id_users_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8359,8 +8872,12 @@"name": "agent_device_account_bindings_workspace_id_workspaces_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8368,8 +8885,12 @@"name": "agent_device_account_bindings_device_id_devices_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "devices",- "columnsFrom": ["device_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "device_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8377,8 +8898,12 @@"name": "agent_device_account_bindings_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8386,8 +8911,14 @@"name": "agent_device_account_bindings_login_fk","tableFrom": "agent_device_account_bindings","tableTo": "agent_provider_account_logins",- "columnsFrom": ["account_id", "device_id"],- "columnsTo": ["account_id", "device_id"],+ "columnsFrom": [+ "account_id",+ "device_id"+ ],+ "columnsTo": [+ "account_id",+ "device_id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -8521,8 +9052,12 @@"name": "agent_provider_account_logins_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8530,8 +9065,12 @@"name": "agent_provider_account_logins_device_id_devices_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "devices",- "columnsFrom": ["device_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "device_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8539,8 +9078,12 @@"name": "agent_provider_account_logins_user_id_users_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8548,8 +9091,12 @@"name": "agent_provider_account_logins_workspace_id_workspaces_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -8559,7 +9106,10 @@"agent_provider_account_logins_account_device_unique": {"name": "agent_provider_account_logins_account_device_unique","nullsNotDistinct": false,- "columns": ["account_id", "device_id"]+ "columns": [+ "account_id",+ "device_id"+ ]}},"policies": {},@@ -8852,8 +9402,12 @@"name": "agent_provider_accounts_user_id_users_id_fk","tableFrom": "agent_provider_accounts","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -8861,8 +9415,12 @@"name": "agent_provider_accounts_workspace_id_workspaces_id_fk","tableFrom": "agent_provider_accounts","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -9048,8 +9606,12 @@"name": "agent_quota_calibrations_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_calibrations","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9057,8 +9619,12 @@"name": "agent_quota_calibrations_user_id_users_id_fk","tableFrom": "agent_quota_calibrations","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9066,8 +9632,12 @@"name": "agent_quota_calibrations_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_calibrations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -9277,8 +9847,12 @@"name": "agent_quota_snapshots_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9286,8 +9860,12 @@"name": "agent_quota_snapshots_user_id_users_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9295,8 +9873,12 @@"name": "agent_quota_snapshots_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9304,8 +9886,12 @@"name": "agent_quota_snapshots_device_id_devices_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "devices",- "columnsFrom": ["device_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "device_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -9580,8 +10166,12 @@"name": "agent_quota_usage_ledger_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -9589,8 +10179,12 @@"name": "agent_quota_usage_ledger_user_id_users_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9598,8 +10192,12 @@"name": "agent_quota_usage_ledger_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9607,8 +10205,12 @@"name": "agent_quota_usage_ledger_message_id_messages_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -9616,8 +10218,12 @@"name": "agent_quota_usage_ledger_operation_id_agent_operations_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -9625,8 +10231,12 @@"name": "agent_quota_usage_ledger_topic_id_topics_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -9634,8 +10244,12 @@"name": "agent_quota_usage_ledger_agent_id_agents_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -9875,8 +10489,12 @@"name": "agent_quota_windows_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_windows","tableTo": "agent_provider_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9884,8 +10502,12 @@"name": "agent_quota_windows_user_id_users_id_fk","tableFrom": "agent_quota_windows","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -9893,8 +10515,12 @@"name": "agent_quota_windows_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_windows","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -10001,8 +10627,12 @@"name": "agent_shares_agent_id_agents_id_fk","tableFrom": "agent_shares","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -10047,6 +10677,12 @@"primaryKey": false,"notNull": true},+ "upstream": {+ "name": "upstream",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },"manifest": {"name": "manifest","type": "jsonb",@@ -10251,8 +10887,12 @@"name": "agent_skills_zip_file_hash_global_files_hash_id_fk","tableFrom": "agent_skills","tableTo": "global_files",- "columnsFrom": ["zip_file_hash"],- "columnsTo": ["hash_id"],+ "columnsFrom": [+ "zip_file_hash"+ ],+ "columnsTo": [+ "hash_id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -10260,8 +10900,12 @@"name": "agent_skills_user_id_users_id_fk","tableFrom": "agent_skills","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -10269,8 +10913,12 @@"name": "agent_skills_workspace_id_workspaces_id_fk","tableFrom": "agent_skills","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -10525,8 +11173,12 @@"name": "ai_models_user_id_users_id_fk","tableFrom": "ai_models","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -10534,8 +11186,12 @@"name": "ai_models_workspace_id_workspaces_id_fk","tableFrom": "ai_models","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -10750,8 +11406,12 @@"name": "ai_providers_user_id_users_id_fk","tableFrom": "ai_providers","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -10759,8 +11419,12 @@"name": "ai_providers_workspace_id_workspaces_id_fk","tableFrom": "ai_providers","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -10895,8 +11559,12 @@"name": "api_keys_user_id_users_id_fk","tableFrom": "api_keys","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -10904,8 +11572,12 @@"name": "api_keys_workspace_id_workspaces_id_fk","tableFrom": "api_keys","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -10915,20 +11587,24 @@"api_keys_key_unique": {"name": "api_keys_key_unique","nullsNotDistinct": false,- "columns": ["key"]+ "columns": [+ "key"+ ]},"api_keys_key_hash_unique": {"name": "api_keys_key_hash_unique","nullsNotDistinct": false,- "columns": ["key_hash"]+ "columns": [+ "key_hash"+ ]}},"policies": {},"checkConstraints": {},"isRLSEnabled": false},- "public.async_tasks": {- "name": "async_tasks",+ "public.artboard_boards": {+ "name": "artboard_boards","schema": "","columns": {"id": {@@ -10938,26 +11614,438 @@"notNull": true,"default": "gen_random_uuid()"},+ "artboard_id": {+ "name": "artboard_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "page_id": {+ "name": "page_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "group_id": {+ "name": "group_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "round_id": {+ "name": "round_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "acceptance_flow_node_id": {+ "name": "acceptance_flow_node_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },"type": {"name": "type","type": "text","primaryKey": false,+ "notNull": true+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,"notNull": false},- "status": {- "name": "status",+ "expected": {+ "name": "expected","type": "text","primaryKey": false,"notNull": false},- "error": {- "name": "error",+ "rect": {+ "name": "rect","type": "jsonb","primaryKey": false,+ "notNull": true+ },+ "source_work_version_id": {+ "name": "source_work_version_id",+ "type": "uuid",+ "primaryKey": false,"notNull": false},- "inference_id": {- "name": "inference_id",+ "source_path": {+ "name": "source_path",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "source_file_id": {+ "name": "source_file_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "artboard_boards_artboard_id_idx": {+ "name": "artboard_boards_artboard_id_idx",+ "columns": [+ {+ "expression": "artboard_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_page_id_idx": {+ "name": "artboard_boards_page_id_idx",+ "columns": [+ {+ "expression": "page_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_group_id_idx": {+ "name": "artboard_boards_group_id_idx",+ "columns": [+ {+ "expression": "group_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_boards\".\"group_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_round_id_idx": {+ "name": "artboard_boards_round_id_idx",+ "columns": [+ {+ "expression": "round_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_boards\".\"round_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_project_id_idx": {+ "name": "artboard_boards_project_id_idx",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_boards\".\"project_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_acceptance_flow_node_id_unique": {+ "name": "artboard_boards_acceptance_flow_node_id_unique",+ "columns": [+ {+ "expression": "acceptance_flow_node_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"artboard_boards\".\"acceptance_flow_node_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_source_work_version_id_idx": {+ "name": "artboard_boards_source_work_version_id_idx",+ "columns": [+ {+ "expression": "source_work_version_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_boards\".\"source_work_version_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_user_id_idx": {+ "name": "artboard_boards_user_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_boards_workspace_id_idx": {+ "name": "artboard_boards_workspace_id_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_boards\".\"workspace_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "artboard_boards_artboard_id_artboards_id_fk": {+ "name": "artboard_boards_artboard_id_artboards_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "artboards",+ "columnsFrom": [+ "artboard_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_boards_page_id_artboard_pages_id_fk": {+ "name": "artboard_boards_page_id_artboard_pages_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "artboard_pages",+ "columnsFrom": [+ "page_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "artboard_boards_group_id_artboard_groups_id_fk": {+ "name": "artboard_boards_group_id_artboard_groups_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "artboard_groups",+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "artboard_boards_round_id_artboard_rounds_id_fk": {+ "name": "artboard_boards_round_id_artboard_rounds_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "artboard_rounds",+ "columnsFrom": [+ "round_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_boards_user_id_users_id_fk": {+ "name": "artboard_boards_user_id_users_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_boards_workspace_id_workspaces_id_fk": {+ "name": "artboard_boards_workspace_id_workspaces_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_boards_project_id_projects_id_fk": {+ "name": "artboard_boards_project_id_projects_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "projects",+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_boards_source_work_version_id_work_versions_id_fk": {+ "name": "artboard_boards_source_work_version_id_work_versions_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "work_versions",+ "columnsFrom": [+ "source_work_version_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_boards_source_file_id_files_id_fk": {+ "name": "artboard_boards_source_file_id_files_id_fk",+ "tableFrom": "artboard_boards",+ "tableTo": "files",+ "columnsFrom": [+ "source_file_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {+ "artboard_boards_single_source_check": {+ "name": "artboard_boards_single_source_check",+ "value": "num_nonnulls(\"artboard_boards\".\"source_work_version_id\", \"artboard_boards\".\"source_file_id\") <= 1"+ },+ "artboard_boards_decision_no_source_check": {+ "name": "artboard_boards_decision_no_source_check",+ "value": "\"artboard_boards\".\"type\" <> 'decision' OR num_nonnulls(\"artboard_boards\".\"source_work_version_id\", \"artboard_boards\".\"source_file_id\", \"artboard_boards\".\"source_path\") = 0"+ }+ },+ "isRLSEnabled": false+ },+ "public.artboard_comments": {+ "name": "artboard_comments",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "artboard_id": {+ "name": "artboard_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "parent_comment_id": {+ "name": "parent_comment_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "author_user_id": {+ "name": "author_user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "author_agent_id": {+ "name": "author_agent_id","type": "text","primaryKey": false,"notNull": false@@ -10974,24 +12062,65 @@"primaryKey": false,"notNull": false},- "duration": {- "name": "duration",- "type": "integer",+ "page_id": {+ "name": "page_id",+ "type": "text","primaryKey": false,"notNull": false},- "parent_id": {- "name": "parent_id",+ "group_id": {+ "name": "group_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "board_id": {+ "name": "board_id","type": "uuid","primaryKey": false,"notNull": false},+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "client_id": {+ "name": "client_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "anchor": {+ "name": "anchor",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "delivered_at": {+ "name": "delivered_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "resolved_at": {+ "name": "resolved_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "resolved_by_user_id": {+ "name": "resolved_by_user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },"metadata": {"name": "metadata","type": "jsonb","primaryKey": false,- "notNull": true,- "default": "'{}'"+ "notNull": false},"accessed_at": {"name": "accessed_at",@@ -11016,11 +12145,44 @@}},"indexes": {- "async_tasks_user_id_idx": {- "name": "async_tasks_user_id_idx",+ "artboard_comments_artboard_id_author_user_id_client_id_unique": {+ "name": "artboard_comments_artboard_id_author_user_id_client_id_unique","columns": [{- "expression": "user_id",+ "expression": "artboard_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "author_user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "client_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_comments_artboard_id_created_at_idx": {+ "name": "artboard_comments_artboard_id_created_at_idx",+ "columns": [+ {+ "expression": "artboard_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "created_at","isExpression": false,"asc": true,"nulls": "last"@@ -11031,11 +12193,11 @@"method": "btree","with": {}},- "async_tasks_parent_id_idx": {- "name": "async_tasks_parent_id_idx",+ "artboard_comments_parent_comment_id_idx": {+ "name": "artboard_comments_parent_comment_id_idx","columns": [{- "expression": "parent_id",+ "expression": "parent_comment_id","isExpression": false,"asc": true,"nulls": "last"@@ -11046,17 +12208,26 @@"method": "btree","with": {}},- "async_tasks_type_status_idx": {- "name": "async_tasks_type_status_idx",+ "artboard_comments_board_id_idx": {+ "name": "artboard_comments_board_id_idx","columns": [{- "expression": "type",+ "expression": "board_id","isExpression": false,"asc": true,"nulls": "last"- },+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_comments_user_id_idx": {+ "name": "artboard_comments_user_id_idx",+ "columns": [{- "expression": "status",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"@@ -11067,26 +12238,27 @@"method": "btree","with": {}},- "async_tasks_inference_id_idx": {- "name": "async_tasks_inference_id_idx",+ "artboard_comments_workspace_id_idx": {+ "name": "artboard_comments_workspace_id_idx","columns": [{- "expression": "inference_id",+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,+ "where": "\"artboard_comments\".\"workspace_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "async_tasks_metadata_idx": {- "name": "async_tasks_metadata_idx",+ "artboard_comments_page_id_idx": {+ "name": "artboard_comments_page_id_idx","columns": [{- "expression": "metadata",+ "expression": "page_id","isExpression": false,"asc": true,"nulls": "last"@@ -11094,43 +12266,156 @@],"isUnique": false,"concurrently": false,- "method": "gin",+ "method": "btree","with": {}},- "async_tasks_workspace_id_idx": {- "name": "async_tasks_workspace_id_idx",+ "artboard_comments_group_id_idx": {+ "name": "artboard_comments_group_id_idx","columns": [{- "expression": "workspace_id",+ "expression": "group_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,+ "where": "\"artboard_comments\".\"group_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}}},"foreignKeys": {- "async_tasks_user_id_users_id_fk": {- "name": "async_tasks_user_id_users_id_fk",- "tableFrom": "async_tasks",+ "artboard_comments_artboard_id_artboards_id_fk": {+ "name": "artboard_comments_artboard_id_artboards_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "artboards",+ "columnsFrom": [+ "artboard_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_comments_parent_comment_id_artboard_comments_id_fk": {+ "name": "artboard_comments_parent_comment_id_artboard_comments_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "artboard_comments",+ "columnsFrom": [+ "parent_comment_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_comments_author_user_id_users_id_fk": {+ "name": "artboard_comments_author_user_id_users_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "users",+ "columnsFrom": [+ "author_user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_comments_author_agent_id_agents_id_fk": {+ "name": "artboard_comments_author_agent_id_agents_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "agents",+ "columnsFrom": [+ "author_agent_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_comments_user_id_users_id_fk": {+ "name": "artboard_comments_user_id_users_id_fk",+ "tableFrom": "artboard_comments","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "async_tasks_workspace_id_workspaces_id_fk": {- "name": "async_tasks_workspace_id_workspaces_id_fk",- "tableFrom": "async_tasks",+ "artboard_comments_workspace_id_workspaces_id_fk": {+ "name": "artboard_comments_workspace_id_workspaces_id_fk",+ "tableFrom": "artboard_comments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"+ },+ "artboard_comments_page_id_artboard_pages_id_fk": {+ "name": "artboard_comments_page_id_artboard_pages_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "artboard_pages",+ "columnsFrom": [+ "page_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "artboard_comments_group_id_artboard_groups_id_fk": {+ "name": "artboard_comments_group_id_artboard_groups_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "artboard_groups",+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_comments_board_id_artboard_boards_id_fk": {+ "name": "artboard_comments_board_id_artboard_boards_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "artboard_boards",+ "columnsFrom": [+ "board_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_comments_resolved_by_user_id_users_id_fk": {+ "name": "artboard_comments_resolved_by_user_id_users_id_fk",+ "tableFrom": "artboard_comments",+ "tableTo": "users",+ "columnsFrom": [+ "resolved_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"}},"compositePrimaryKeys": {},@@ -11139,93 +12424,188 @@"checkConstraints": {},"isRLSEnabled": false},- "public.accounts": {- "name": "accounts",+ "public.artboard_edges": {+ "name": "artboard_edges","schema": "","columns": {- "access_token": {- "name": "access_token",- "type": "text",- "primaryKey": false,- "notNull": false+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"},- "access_token_expires_at": {- "name": "access_token_expires_at",- "type": "timestamp",+ "artboard_id": {+ "name": "artboard_id",+ "type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "account_id": {- "name": "account_id",- "type": "text",+ "source_board_id": {+ "name": "source_board_id",+ "type": "uuid","primaryKey": false,"notNull": true},- "created_at": {- "name": "created_at",- "type": "timestamp",+ "target_board_id": {+ "name": "target_board_id",+ "type": "uuid","primaryKey": false,- "notNull": true,- "default": "now()"+ "notNull": true},- "id": {- "name": "id",+ "user_id": {+ "name": "user_id","type": "text",- "primaryKey": true,+ "primaryKey": false,"notNull": true},- "id_token": {- "name": "id_token",+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,"notNull": false},- "password": {- "name": "password",- "type": "text",+ "acceptance_flow_edge_id": {+ "name": "acceptance_flow_edge_id",+ "type": "uuid","primaryKey": false,"notNull": false},- "provider_id": {- "name": "provider_id",+ "label": {+ "name": "label","type": "text","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "''"},- "refresh_token": {- "name": "refresh_token",+ "condition": {+ "name": "condition","type": "text","primaryKey": false,"notNull": false},- "refresh_token_expires_at": {- "name": "refresh_token_expires_at",- "type": "timestamp",+ "is_default": {+ "name": "is_default",+ "type": "boolean","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": false},- "scope": {- "name": "scope",- "type": "text",+ "sort_order": {+ "name": "sort_order",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "default": 0+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb","primaryKey": false,"notNull": false},- "updated_at": {- "name": "updated_at",- "type": "timestamp",+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "now()"},- "user_id": {- "name": "user_id",- "type": "text",+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "account_userId_idx": {- "name": "account_userId_idx",+ "artboard_edges_artboard_id_idx": {+ "name": "artboard_edges_artboard_id_idx",+ "columns": [+ {+ "expression": "artboard_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_edges_source_board_id_idx": {+ "name": "artboard_edges_source_board_id_idx",+ "columns": [+ {+ "expression": "source_board_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_edges_source_board_id_default_unique": {+ "name": "artboard_edges_source_board_id_default_unique",+ "columns": [+ {+ "expression": "source_board_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"artboard_edges\".\"is_default\" = true",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_edges_target_board_id_idx": {+ "name": "artboard_edges_target_board_id_idx",+ "columns": [+ {+ "expression": "target_board_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_edges_acceptance_flow_edge_id_unique": {+ "name": "artboard_edges_acceptance_flow_edge_id_unique",+ "columns": [+ {+ "expression": "acceptance_flow_edge_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"artboard_edges\".\"acceptance_flow_edge_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_edges_user_id_idx": {+ "name": "artboard_edges_user_id_idx","columns": [{"expression": "user_id",@@ -11238,15 +12618,87 @@"concurrently": false,"method": "btree","with": {}+ },+ "artboard_edges_workspace_id_idx": {+ "name": "artboard_edges_workspace_id_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_edges\".\"workspace_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}}},"foreignKeys": {- "accounts_user_id_users_id_fk": {- "name": "accounts_user_id_users_id_fk",- "tableFrom": "accounts",+ "artboard_edges_artboard_id_artboards_id_fk": {+ "name": "artboard_edges_artboard_id_artboards_id_fk",+ "tableFrom": "artboard_edges",+ "tableTo": "artboards",+ "columnsFrom": [+ "artboard_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_edges_source_board_id_artboard_boards_id_fk": {+ "name": "artboard_edges_source_board_id_artboard_boards_id_fk",+ "tableFrom": "artboard_edges",+ "tableTo": "artboard_boards",+ "columnsFrom": [+ "source_board_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_edges_target_board_id_artboard_boards_id_fk": {+ "name": "artboard_edges_target_board_id_artboard_boards_id_fk",+ "tableFrom": "artboard_edges",+ "tableTo": "artboard_boards",+ "columnsFrom": [+ "target_board_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_edges_user_id_users_id_fk": {+ "name": "artboard_edges_user_id_users_id_fk",+ "tableFrom": "artboard_edges","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_edges_workspace_id_workspaces_id_fk": {+ "name": "artboard_edges_workspace_id_workspaces_id_fk",+ "tableFrom": "artboard_edges",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -11257,117 +12709,205 @@"checkConstraints": {},"isRLSEnabled": false},- "public.passkey": {- "name": "passkey",+ "public.artboard_groups": {+ "name": "artboard_groups","schema": "","columns": {- "aaguid": {- "name": "aaguid",+ "id": {+ "name": "id","type": "text",- "primaryKey": false,- "notNull": false- },- "backedUp": {- "name": "backedUp",- "type": "boolean",- "primaryKey": false,- "notNull": false+ "primaryKey": true,+ "notNull": true},- "counter": {- "name": "counter",- "type": "integer",+ "artboard_id": {+ "name": "artboard_id",+ "type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "createdAt": {- "name": "createdAt",- "type": "timestamp",+ "page_id": {+ "name": "page_id",+ "type": "text","primaryKey": false,- "notNull": false,- "default": "now()"+ "notNull": true},- "credentialID": {- "name": "credentialID",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,"notNull": true},- "deviceType": {- "name": "deviceType",+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,"notNull": false},- "id": {- "name": "id",+ "kind": {+ "name": "kind","type": "text",- "primaryKey": true,+ "primaryKey": false,"notNull": true},- "name": {- "name": "name",+ "title": {+ "name": "title","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "publicKey": {- "name": "publicKey",+ "description": {+ "name": "description","type": "text","primaryKey": false,+ "notNull": false+ },+ "rect": {+ "name": "rect",+ "type": "jsonb",+ "primaryKey": false,"notNull": true},- "transports": {- "name": "transports",- "type": "text",+ "metadata": {+ "name": "metadata",+ "type": "jsonb","primaryKey": false,"notNull": false},- "userId": {- "name": "userId",- "type": "text",+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "passkey_credential_id_unique": {- "name": "passkey_credential_id_unique",+ "artboard_groups_artboard_id_idx": {+ "name": "artboard_groups_artboard_id_idx","columns": [{- "expression": "credentialID",+ "expression": "artboard_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": true,+ "isUnique": false,"concurrently": false,"method": "btree","with": {}},- "passkey_user_id_idx": {- "name": "passkey_user_id_idx",+ "artboard_groups_page_id_idx": {+ "name": "artboard_groups_page_id_idx","columns": [{- "expression": "userId",+ "expression": "page_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_groups_user_id_idx": {+ "name": "artboard_groups_user_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_groups_workspace_id_idx": {+ "name": "artboard_groups_workspace_id_idx",+ "columns": [+ {+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,+ "where": "\"artboard_groups\".\"workspace_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}}},"foreignKeys": {- "passkey_userId_users_id_fk": {- "name": "passkey_userId_users_id_fk",- "tableFrom": "passkey",+ "artboard_groups_artboard_id_artboards_id_fk": {+ "name": "artboard_groups_artboard_id_artboards_id_fk",+ "tableFrom": "artboard_groups",+ "tableTo": "artboards",+ "columnsFrom": [+ "artboard_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_groups_page_id_artboard_pages_id_fk": {+ "name": "artboard_groups_page_id_artboard_pages_id_fk",+ "tableFrom": "artboard_groups",+ "tableTo": "artboard_pages",+ "columnsFrom": [+ "page_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "artboard_groups_user_id_users_id_fk": {+ "name": "artboard_groups_user_id_users_id_fk",+ "tableFrom": "artboard_groups","tableTo": "users",- "columnsFrom": ["userId"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_groups_workspace_id_workspaces_id_fk": {+ "name": "artboard_groups_workspace_id_workspaces_id_fk",+ "tableFrom": "artboard_groups",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -11378,69 +12918,93 @@"checkConstraints": {},"isRLSEnabled": false},- "public.auth_sessions": {- "name": "auth_sessions",+ "public.artboard_pages": {+ "name": "artboard_pages","schema": "","columns": {- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- },- "expires_at": {- "name": "expires_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true- },"id": {"name": "id","type": "text","primaryKey": true,"notNull": true},- "impersonated_by": {- "name": "impersonated_by",+ "artboard_id": {+ "name": "artboard_id","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "ip_address": {- "name": "ip_address",+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,"notNull": false},- "token": {- "name": "token",+ "name": {+ "name": "name","type": "text","primaryKey": false,"notNull": true},- "updated_at": {- "name": "updated_at",- "type": "timestamp",+ "sort_order": {+ "name": "sort_order",+ "type": "integer","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": 0},- "user_agent": {- "name": "user_agent",- "type": "text",+ "metadata": {+ "name": "metadata",+ "type": "jsonb","primaryKey": false,"notNull": false},- "user_id": {- "name": "user_id",- "type": "text",+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "auth_session_userId_idx": {- "name": "auth_session_userId_idx",+ "artboard_pages_artboard_id_idx": {+ "name": "artboard_pages_artboard_id_idx",+ "columns": [+ {+ "expression": "artboard_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_pages_user_id_idx": {+ "name": "artboard_pages_user_id_idx","columns": [{"expression": "user_id",@@ -11453,49 +13017,90 @@"concurrently": false,"method": "btree","with": {}+ },+ "artboard_pages_workspace_id_idx": {+ "name": "artboard_pages_workspace_id_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_pages\".\"workspace_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}}},"foreignKeys": {- "auth_sessions_user_id_users_id_fk": {- "name": "auth_sessions_user_id_users_id_fk",- "tableFrom": "auth_sessions",+ "artboard_pages_artboard_id_artboards_id_fk": {+ "name": "artboard_pages_artboard_id_artboards_id_fk",+ "tableFrom": "artboard_pages",+ "tableTo": "artboards",+ "columnsFrom": [+ "artboard_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_pages_user_id_users_id_fk": {+ "name": "artboard_pages_user_id_users_id_fk",+ "tableFrom": "artboard_pages","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_pages_workspace_id_workspaces_id_fk": {+ "name": "artboard_pages_workspace_id_workspaces_id_fk",+ "tableFrom": "artboard_pages",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}},"compositePrimaryKeys": {},- "uniqueConstraints": {- "auth_sessions_token_unique": {- "name": "auth_sessions_token_unique",- "nullsNotDistinct": false,- "columns": ["token"]- }- },+ "uniqueConstraints": {},"policies": {},"checkConstraints": {},"isRLSEnabled": false},- "public.two_factor": {- "name": "two_factor",+ "public.artboard_rounds": {+ "name": "artboard_rounds","schema": "","columns": {- "backup_codes": {- "name": "backup_codes",- "type": "text",- "primaryKey": false,- "notNull": true- },"id": {"name": "id",- "type": "text",+ "type": "uuid","primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "artboard_id": {+ "name": "artboard_id",+ "type": "text",+ "primaryKey": false,"notNull": true},- "secret": {- "name": "secret",+ "page_id": {+ "name": "page_id","type": "text","primaryKey": false,"notNull": true@@ -11505,14 +13110,84 @@"type": "text","primaryKey": false,"notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'open'"+ },+ "recommended_board_id": {+ "name": "recommended_board_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "chosen_board_id": {+ "name": "chosen_board_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "selected_by": {+ "name": "selected_by",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "selected_at": {+ "name": "selected_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "two_factor_secret_idx": {- "name": "two_factor_secret_idx",+ "artboard_rounds_artboard_id_idx": {+ "name": "artboard_rounds_artboard_id_idx","columns": [{- "expression": "secret",+ "expression": "artboard_id","isExpression": false,"asc": true,"nulls": "last"@@ -11523,8 +13198,23 @@"method": "btree","with": {}},- "two_factor_user_id_idx": {- "name": "two_factor_user_id_idx",+ "artboard_rounds_page_id_idx": {+ "name": "artboard_rounds_page_id_idx",+ "columns": [+ {+ "expression": "page_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_rounds_user_id_idx": {+ "name": "artboard_rounds_user_id_idx","columns": [{"expression": "user_id",@@ -11537,17 +13227,147 @@"concurrently": false,"method": "btree","with": {}+ },+ "artboard_rounds_workspace_id_idx": {+ "name": "artboard_rounds_workspace_id_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_rounds\".\"workspace_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_rounds_recommended_board_id_idx": {+ "name": "artboard_rounds_recommended_board_id_idx",+ "columns": [+ {+ "expression": "recommended_board_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_rounds\".\"recommended_board_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboard_rounds_chosen_board_id_idx": {+ "name": "artboard_rounds_chosen_board_id_idx",+ "columns": [+ {+ "expression": "chosen_board_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"artboard_rounds\".\"chosen_board_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}}},"foreignKeys": {- "two_factor_user_id_users_id_fk": {- "name": "two_factor_user_id_users_id_fk",- "tableFrom": "two_factor",+ "artboard_rounds_artboard_id_artboards_id_fk": {+ "name": "artboard_rounds_artboard_id_artboards_id_fk",+ "tableFrom": "artboard_rounds",+ "tableTo": "artboards",+ "columnsFrom": [+ "artboard_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_rounds_page_id_artboard_pages_id_fk": {+ "name": "artboard_rounds_page_id_artboard_pages_id_fk",+ "tableFrom": "artboard_rounds",+ "tableTo": "artboard_pages",+ "columnsFrom": [+ "page_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "artboard_rounds_user_id_users_id_fk": {+ "name": "artboard_rounds_user_id_users_id_fk",+ "tableFrom": "artboard_rounds","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboard_rounds_workspace_id_workspaces_id_fk": {+ "name": "artboard_rounds_workspace_id_workspaces_id_fk",+ "tableFrom": "artboard_rounds",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"+ },+ "artboard_rounds_recommended_board_id_artboard_boards_id_fk": {+ "name": "artboard_rounds_recommended_board_id_artboard_boards_id_fk",+ "tableFrom": "artboard_rounds",+ "tableTo": "artboard_boards",+ "columnsFrom": [+ "recommended_board_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_rounds_chosen_board_id_artboard_boards_id_fk": {+ "name": "artboard_rounds_chosen_board_id_artboard_boards_id_fk",+ "tableFrom": "artboard_rounds",+ "tableTo": "artboard_boards",+ "columnsFrom": [+ "chosen_board_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboard_rounds_selected_by_users_id_fk": {+ "name": "artboard_rounds_selected_by_users_id_fk",+ "tableFrom": "artboard_rounds",+ "tableTo": "users",+ "columnsFrom": [+ "selected_by"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"}},"compositePrimaryKeys": {},@@ -11556,108 +13376,96 @@"checkConstraints": {},"isRLSEnabled": false},- "public.verifications": {- "name": "verifications",+ "public.artboards": {+ "name": "artboards","schema": "","columns": {- "created_at": {- "name": "created_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true,- "default": "now()"- },- "expires_at": {- "name": "expires_at",- "type": "timestamp",- "primaryKey": false,- "notNull": true- },"id": {"name": "id","type": "text","primaryKey": true,"notNull": true},- "identifier": {- "name": "identifier",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,"notNull": true},- "updated_at": {- "name": "updated_at",- "type": "timestamp",+ "workspace_id": {+ "name": "workspace_id",+ "type": "text","primaryKey": false,- "notNull": true,- "default": "now()"+ "notNull": false},- "value": {- "name": "value",+ "topic_id": {+ "name": "topic_id","type": "text","primaryKey": false,- "notNull": true- }- },- "indexes": {- "verification_identifier_idx": {- "name": "verification_identifier_idx",- "columns": [- {- "expression": "identifier",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- }- },- "foreignKeys": {},- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {},- "isRLSEnabled": false- },- "public.channel_audit": {- "name": "channel_audit",- "schema": "",- "columns": {- "id": {- "name": "id",+ "notNull": false+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "acceptance_id": {+ "name": "acceptance_id","type": "uuid",- "primaryKey": true,- "notNull": true,- "default": "gen_random_uuid()"+ "primaryKey": false,+ "notNull": false},- "channel_id": {- "name": "channel_id",+ "title": {+ "name": "title","type": "text","primaryKey": false,"notNull": true},- "event": {- "name": "event",+ "description": {+ "name": "description","type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "target_id": {- "name": "target_id",+ "content": {+ "name": "content","type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "details": {- "name": "details",+ "phase": {+ "name": "phase",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'discuss'"+ },+ "revision": {+ "name": "revision",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "default": 1+ },+ "metadata": {+ "name": "metadata","type": "jsonb","primaryKey": false,+ "notNull": false+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,"notNull": true,- "default": "'{}'::jsonb"+ "default": "now()"},"created_at": {"name": "created_at",@@ -11665,51 +13473,112 @@"primaryKey": false,"notNull": true,"default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "channel_audit_channel_event_idx": {- "name": "channel_audit_channel_event_idx",+ "artboards_user_id_idx": {+ "name": "artboards_user_id_idx","columns": [{- "expression": "channel_id",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"- },+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboards_workspace_id_idx": {+ "name": "artboards_workspace_id_idx",+ "columns": [{- "expression": "event",+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"- },+ }+ ],+ "isUnique": false,+ "where": "\"artboards\".\"workspace_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboards_topic_id_idx": {+ "name": "artboards_topic_id_idx",+ "columns": [{- "expression": "created_at",+ "expression": "topic_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,+ "where": "\"artboards\".\"topic_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "channel_audit_target_event_idx": {- "name": "channel_audit_target_event_idx",+ "artboards_task_id_idx": {+ "name": "artboards_task_id_idx","columns": [{- "expression": "target_id",+ "expression": "task_id","isExpression": false,"asc": true,"nulls": "last"- },+ }+ ],+ "isUnique": false,+ "where": "\"artboards\".\"task_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboards_project_id_idx": {+ "name": "artboards_project_id_idx",+ "columns": [{- "expression": "event",+ "expression": "project_id","isExpression": false,"asc": true,"nulls": "last"- },+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboards_phase_idx": {+ "name": "artboards_phase_idx",+ "columns": [+ {+ "expression": "phase",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "artboards_created_at_idx": {+ "name": "artboards_created_at_idx",+ "columns": [{"expression": "created_at","isExpression": false,@@ -11721,17 +13590,101 @@"concurrently": false,"method": "btree","with": {}+ },+ "artboards_updated_at_idx": {+ "name": "artboards_updated_at_idx",+ "columns": [+ {+ "expression": "updated_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}}},"foreignKeys": {- "channel_audit_channel_id_channels_id_fk": {- "name": "channel_audit_channel_id_channels_id_fk",- "tableFrom": "channel_audit",- "tableTo": "channels",- "columnsFrom": ["channel_id"],- "columnsTo": ["id"],+ "artboards_user_id_users_id_fk": {+ "name": "artboards_user_id_users_id_fk",+ "tableFrom": "artboards",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "artboards_workspace_id_workspaces_id_fk": {+ "name": "artboards_workspace_id_workspaces_id_fk",+ "tableFrom": "artboards",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"+ },+ "artboards_topic_id_topics_id_fk": {+ "name": "artboards_topic_id_topics_id_fk",+ "tableFrom": "artboards",+ "tableTo": "topics",+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboards_task_id_tasks_id_fk": {+ "name": "artboards_task_id_tasks_id_fk",+ "tableFrom": "artboards",+ "tableTo": "tasks",+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboards_project_id_projects_id_fk": {+ "name": "artboards_project_id_projects_id_fk",+ "tableFrom": "artboards",+ "tableTo": "projects",+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "artboards_acceptance_id_acceptances_id_fk": {+ "name": "artboards_acceptance_id_acceptances_id_fk",+ "tableFrom": "artboards",+ "tableTo": "acceptances",+ "columnsFrom": [+ "acceptance_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"}},"compositePrimaryKeys": {},@@ -11740,8 +13693,8 @@"checkConstraints": {},"isRLSEnabled": false},- "public.channel_jobs": {- "name": "channel_jobs",+ "public.async_tasks": {+ "name": "async_tasks","schema": "","columns": {"id": {@@ -11751,33 +13704,1341 @@"notNull": true,"default": "gen_random_uuid()"},- "channel_id": {- "name": "channel_id",+ "type": {+ "name": "type","type": "text","primaryKey": false,- "notNull": true- },- "member_id": {- "name": "member_id",- "type": "uuid",- "primaryKey": false,- "notNull": true- },- "message_id": {- "name": "message_id",- "type": "uuid",- "primaryKey": false,- "notNull": true+ "notNull": false},- "thread_id": {- "name": "thread_id",+ "status": {+ "name": "status","type": "text","primaryKey": false,"notNull": false},- "requester_member_id": {- "name": "requester_member_id",- "type": "uuid",+ "error": {+ "name": "error",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "inference_id": {+ "name": "inference_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "duration": {+ "name": "duration",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "parent_id": {+ "name": "parent_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": true,+ "default": "'{}'"+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "async_tasks_user_id_idx": {+ "name": "async_tasks_user_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "async_tasks_parent_id_idx": {+ "name": "async_tasks_parent_id_idx",+ "columns": [+ {+ "expression": "parent_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "async_tasks_type_status_idx": {+ "name": "async_tasks_type_status_idx",+ "columns": [+ {+ "expression": "type",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "status",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "async_tasks_inference_id_idx": {+ "name": "async_tasks_inference_id_idx",+ "columns": [+ {+ "expression": "inference_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "async_tasks_metadata_idx": {+ "name": "async_tasks_metadata_idx",+ "columns": [+ {+ "expression": "metadata",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "gin",+ "with": {}+ },+ "async_tasks_workspace_id_idx": {+ "name": "async_tasks_workspace_id_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "async_tasks_user_id_users_id_fk": {+ "name": "async_tasks_user_id_users_id_fk",+ "tableFrom": "async_tasks",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "async_tasks_workspace_id_workspaces_id_fk": {+ "name": "async_tasks_workspace_id_workspaces_id_fk",+ "tableFrom": "async_tasks",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.accounts": {+ "name": "accounts",+ "schema": "",+ "columns": {+ "access_token": {+ "name": "access_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "access_token_expires_at": {+ "name": "access_token_expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "account_id": {+ "name": "account_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "id_token": {+ "name": "id_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "password": {+ "name": "password",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "provider_id": {+ "name": "provider_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "refresh_token": {+ "name": "refresh_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "refresh_token_expires_at": {+ "name": "refresh_token_expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false+ },+ "scope": {+ "name": "scope",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "account_userId_idx": {+ "name": "account_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "accounts_user_id_users_id_fk": {+ "name": "accounts_user_id_users_id_fk",+ "tableFrom": "accounts",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.passkey": {+ "name": "passkey",+ "schema": "",+ "columns": {+ "aaguid": {+ "name": "aaguid",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "backedUp": {+ "name": "backedUp",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false+ },+ "counter": {+ "name": "counter",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "default": "now()"+ },+ "credentialID": {+ "name": "credentialID",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "deviceType": {+ "name": "deviceType",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "publicKey": {+ "name": "publicKey",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "transports": {+ "name": "transports",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "userId": {+ "name": "userId",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "passkey_credential_id_unique": {+ "name": "passkey_credential_id_unique",+ "columns": [+ {+ "expression": "credentialID",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "passkey_user_id_idx": {+ "name": "passkey_user_id_idx",+ "columns": [+ {+ "expression": "userId",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "passkey_userId_users_id_fk": {+ "name": "passkey_userId_users_id_fk",+ "tableFrom": "passkey",+ "tableTo": "users",+ "columnsFrom": [+ "userId"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.auth_sessions": {+ "name": "auth_sessions",+ "schema": "",+ "columns": {+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "expires_at": {+ "name": "expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "impersonated_by": {+ "name": "impersonated_by",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "ip_address": {+ "name": "ip_address",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "token": {+ "name": "token",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "user_agent": {+ "name": "user_agent",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "auth_session_userId_idx": {+ "name": "auth_session_userId_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "auth_sessions_user_id_users_id_fk": {+ "name": "auth_sessions_user_id_users_id_fk",+ "tableFrom": "auth_sessions",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "auth_sessions_token_unique": {+ "name": "auth_sessions_token_unique",+ "nullsNotDistinct": false,+ "columns": [+ "token"+ ]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.two_factor": {+ "name": "two_factor",+ "schema": "",+ "columns": {+ "backup_codes": {+ "name": "backup_codes",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "secret": {+ "name": "secret",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "two_factor_secret_idx": {+ "name": "two_factor_secret_idx",+ "columns": [+ {+ "expression": "secret",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "two_factor_user_id_idx": {+ "name": "two_factor_user_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "two_factor_user_id_users_id_fk": {+ "name": "two_factor_user_id_users_id_fk",+ "tableFrom": "two_factor",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.verifications": {+ "name": "verifications",+ "schema": "",+ "columns": {+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "expires_at": {+ "name": "expires_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true+ },+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true+ },+ "identifier": {+ "name": "identifier",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "value": {+ "name": "value",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "verification_identifier_idx": {+ "name": "verification_identifier_idx",+ "columns": [+ {+ "expression": "identifier",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.channel_audit": {+ "name": "channel_audit",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "channel_id": {+ "name": "channel_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "event": {+ "name": "event",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "target_id": {+ "name": "target_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "details": {+ "name": "details",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": true,+ "default": "'{}'::jsonb"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "channel_audit_channel_event_idx": {+ "name": "channel_audit_channel_event_idx",+ "columns": [+ {+ "expression": "channel_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "event",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "created_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_audit_target_event_idx": {+ "name": "channel_audit_target_event_idx",+ "columns": [+ {+ "expression": "target_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "event",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "created_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "channel_audit_channel_id_channels_id_fk": {+ "name": "channel_audit_channel_id_channels_id_fk",+ "tableFrom": "channel_audit",+ "tableTo": "channels",+ "columnsFrom": [+ "channel_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.channel_jobs": {+ "name": "channel_jobs",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "channel_id": {+ "name": "channel_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "member_id": {+ "name": "member_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": true+ },+ "message_id": {+ "name": "message_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": true+ },+ "thread_id": {+ "name": "thread_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "requester_member_id": {+ "name": "requester_member_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": true+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'queued'"+ },+ "blocked_reason": {+ "name": "blocked_reason",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "blocked_code": {+ "name": "blocked_code",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "claimed_at": {+ "name": "claimed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "topic_id": {+ "name": "topic_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "operation_id": {+ "name": "operation_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "wake": {+ "name": "wake",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "manifest": {+ "name": "manifest",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "execution_config": {+ "name": "execution_config",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "device_id": {+ "name": "device_id",+ "type": "varchar(64)",+ "primaryKey": false,+ "notNull": false+ },+ "working_directory": {+ "name": "working_directory",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "accepted_at": {+ "name": "accepted_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "lease_owner": {+ "name": "lease_owner",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "lease_expires_at": {+ "name": "lease_expires_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "writer_held": {+ "name": "writer_held",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "isolated_at": {+ "name": "isolated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "draft": {+ "name": "draft",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "publication_revoked": {+ "name": "publication_revoked",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "published_message_id": {+ "name": "published_message_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "channel_jobs_delivery_unique": {+ "name": "channel_jobs_delivery_unique",+ "columns": [+ {+ "expression": "message_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "member_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_jobs_channel_status_idx": {+ "name": "channel_jobs_channel_status_idx",+ "columns": [+ {+ "expression": "channel_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "status",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_jobs_continuation_idx": {+ "name": "channel_jobs_continuation_idx",+ "columns": [+ {+ "expression": "member_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "requester_member_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "thread_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "claimed_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_jobs_topic_idx": {+ "name": "channel_jobs_topic_idx",+ "columns": [+ {+ "expression": "topic_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "published_message_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_jobs_member_queue_idx": {+ "name": "channel_jobs_member_queue_idx",+ "columns": [+ {+ "expression": "member_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "status",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "created_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_jobs_lease_expires_idx": {+ "name": "channel_jobs_lease_expires_idx",+ "columns": [+ {+ "expression": "lease_expires_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"channel_jobs\".\"writer_held\" AND \"channel_jobs\".\"isolated_at\" IS NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_jobs_active_directory_idx": {+ "name": "channel_jobs_active_directory_idx",+ "columns": [+ {+ "expression": "device_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "working_directory",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"channel_jobs\".\"writer_held\"",+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "channel_jobs_channel_id_channels_id_fk": {+ "name": "channel_jobs_channel_id_channels_id_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "channels",+ "columnsFrom": [+ "channel_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channel_jobs_topic_id_topics_id_fk": {+ "name": "channel_jobs_topic_id_topics_id_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "topics",+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "channel_jobs_operation_id_agent_operations_id_fk": {+ "name": "channel_jobs_operation_id_agent_operations_id_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "agent_operations",+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "channel_jobs_member_fk": {+ "name": "channel_jobs_member_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "channel_members",+ "columnsFrom": [+ "channel_id",+ "member_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "channel_jobs_requester_fk": {+ "name": "channel_jobs_requester_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "channel_members",+ "columnsFrom": [+ "channel_id",+ "requester_member_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "channel_jobs_message_fk": {+ "name": "channel_jobs_message_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "channel_messages",+ "columnsFrom": [+ "channel_id",+ "message_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "channel_jobs_thread_fk": {+ "name": "channel_jobs_thread_fk",+ "tableFrom": "channel_jobs",+ "tableTo": "channel_threads",+ "columnsFrom": [+ "channel_id",+ "thread_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "channel_jobs_operation_id_unique": {+ "name": "channel_jobs_operation_id_unique",+ "nullsNotDistinct": false,+ "columns": [+ "operation_id"+ ]+ },+ "channel_jobs_scope_unique": {+ "name": "channel_jobs_scope_unique",+ "nullsNotDistinct": false,+ "columns": [+ "channel_id",+ "id"+ ]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.channel_member_grants": {+ "name": "channel_member_grants",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "channel_id": {+ "name": "channel_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "member_id": {+ "name": "member_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": true+ },+ "device_owner_id": {+ "name": "device_owner_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "device_id": {+ "name": "device_id",+ "type": "varchar(64)",+ "primaryKey": false,+ "notNull": true+ },+ "working_directory": {+ "name": "working_directory",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "requested_by_member_id": {+ "name": "requested_by_member_id",+ "type": "uuid","primaryKey": false,"notNull": true},@@ -11786,117 +15047,637 @@"type": "text","primaryKey": false,"notNull": true,- "default": "'queued'"+ "default": "'pending'"},- "blocked_reason": {- "name": "blocked_reason",+ "decided_at": {+ "name": "decided_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "revoked_at": {+ "name": "revoked_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "revoke_reason": {+ "name": "revoke_reason",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false,+ "default": "'{}'::jsonb"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "channel_member_grants_member_unique": {+ "name": "channel_member_grants_member_unique",+ "columns": [+ {+ "expression": "member_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_member_grants_owner_status_idx": {+ "name": "channel_member_grants_owner_status_idx",+ "columns": [+ {+ "expression": "device_owner_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "status",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "channel_member_grants_channel_id_channels_id_fk": {+ "name": "channel_member_grants_channel_id_channels_id_fk",+ "tableFrom": "channel_member_grants",+ "tableTo": "channels",+ "columnsFrom": [+ "channel_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channel_member_grants_device_owner_id_users_id_fk": {+ "name": "channel_member_grants_device_owner_id_users_id_fk",+ "tableFrom": "channel_member_grants",+ "tableTo": "users",+ "columnsFrom": [+ "device_owner_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channel_member_grants_member_fk": {+ "name": "channel_member_grants_member_fk",+ "tableFrom": "channel_member_grants",+ "tableTo": "channel_members",+ "columnsFrom": [+ "channel_id",+ "member_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ },+ "channel_member_grants_requester_fk": {+ "name": "channel_member_grants_requester_fk",+ "tableFrom": "channel_member_grants",+ "tableTo": "channel_members",+ "columnsFrom": [+ "channel_id",+ "requested_by_member_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],+ "onDelete": "no action",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.channel_members": {+ "name": "channel_members",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "channel_id": {+ "name": "channel_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "actor_type": {+ "name": "actor_type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "role": {+ "name": "role",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "last_read_sequence": {+ "name": "last_read_sequence",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "section_id": {+ "name": "section_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "pinned": {+ "name": "pinned",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "hidden": {+ "name": "hidden",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "pinned_at": {+ "name": "pinned_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "agent_id": {+ "name": "agent_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "''"+ },+ "config": {+ "name": "config",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false,+ "default": "'{}'::jsonb"+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'active'"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "channel_members_channel_user_unique": {+ "name": "channel_members_channel_user_unique",+ "columns": [+ {+ "expression": "channel_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"channel_members\".\"user_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_members_user_id_idx": {+ "name": "channel_members_user_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_members_section_id_idx": {+ "name": "channel_members_section_id_idx",+ "columns": [+ {+ "expression": "section_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"channel_members\".\"section_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channel_members_agent_id_idx": {+ "name": "channel_members_agent_id_idx",+ "columns": [+ {+ "expression": "agent_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "channel_members_channel_id_channels_id_fk": {+ "name": "channel_members_channel_id_channels_id_fk",+ "tableFrom": "channel_members",+ "tableTo": "channels",+ "columnsFrom": [+ "channel_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channel_members_user_id_users_id_fk": {+ "name": "channel_members_user_id_users_id_fk",+ "tableFrom": "channel_members",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "channel_members_section_id_channel_sections_id_fk": {+ "name": "channel_members_section_id_channel_sections_id_fk",+ "tableFrom": "channel_members",+ "tableTo": "channel_sections",+ "columnsFrom": [+ "section_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "channel_members_agent_id_agents_id_fk": {+ "name": "channel_members_agent_id_agents_id_fk",+ "tableFrom": "channel_members",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "channel_members_scope_unique": {+ "name": "channel_members_scope_unique",+ "nullsNotDistinct": false,+ "columns": [+ "channel_id",+ "id"+ ]+ }+ },+ "policies": {},+ "checkConstraints": {+ "channel_members_actor_type_check": {+ "name": "channel_members_actor_type_check",+ "value": "\"channel_members\".\"actor_type\" IN ('user', 'agent')"+ },+ "channel_members_user_shape_check": {+ "name": "channel_members_user_shape_check",+ "value": "\"channel_members\".\"actor_type\" <> 'user' OR \"channel_members\".\"role\" IS NOT NULL"+ },+ "channel_members_agent_shape_check": {+ "name": "channel_members_agent_shape_check",+ "value": "\"channel_members\".\"actor_type\" <> 'agent' OR (\"channel_members\".\"name\" IS NOT NULL AND \"channel_members\".\"config\" IS NOT NULL)"+ },+ "channel_members_user_id_owner_check": {+ "name": "channel_members_user_id_owner_check",+ "value": "\"channel_members\".\"user_id\" IS NULL OR \"channel_members\".\"actor_type\" = 'user'"+ },+ "channel_members_role_owner_check": {+ "name": "channel_members_role_owner_check",+ "value": "\"channel_members\".\"role\" IS NULL OR \"channel_members\".\"actor_type\" = 'user'"+ },+ "channel_members_agent_id_owner_check": {+ "name": "channel_members_agent_id_owner_check",+ "value": "\"channel_members\".\"agent_id\" IS NULL OR \"channel_members\".\"actor_type\" = 'agent'"+ },+ "channel_members_section_id_owner_check": {+ "name": "channel_members_section_id_owner_check",+ "value": "\"channel_members\".\"section_id\" IS NULL OR \"channel_members\".\"actor_type\" = 'user'"+ },+ "channel_members_config_owner_check": {+ "name": "channel_members_config_owner_check",+ "value": "\"channel_members\".\"config\" IS NULL OR \"channel_members\".\"actor_type\" <> 'user'"+ }+ },+ "isRLSEnabled": false+ },+ "public.channel_message_files": {+ "name": "channel_message_files",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "message_id": {+ "name": "message_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": true+ },+ "file_id": {+ "name": "file_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "sort_order": {+ "name": "sort_order",+ "type": "integer",+ "primaryKey": false,+ "notNull": true+ }+ },+ "indexes": {+ "channel_message_files_file_idx": {+ "name": "channel_message_files_file_idx",+ "columns": [+ {+ "expression": "file_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "channel_message_files_message_id_channel_messages_id_fk": {+ "name": "channel_message_files_message_id_channel_messages_id_fk",+ "tableFrom": "channel_message_files",+ "tableTo": "channel_messages",+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channel_message_files_file_id_files_id_fk": {+ "name": "channel_message_files_file_id_files_id_fk",+ "tableFrom": "channel_message_files",+ "tableTo": "files",+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "channel_message_files_message_file_unique": {+ "name": "channel_message_files_message_file_unique",+ "nullsNotDistinct": false,+ "columns": [+ "message_id",+ "file_id"+ ]+ }+ },+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.channel_messages": {+ "name": "channel_messages",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "channel_id": {+ "name": "channel_id","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "blocked_code": {- "name": "blocked_code",+ "thread_id": {+ "name": "thread_id","type": "text","primaryKey": false,"notNull": false},- "claimed_at": {- "name": "claimed_at",- "type": "timestamp with time zone",+ "sequence": {+ "name": "sequence",+ "type": "integer","primaryKey": false,- "notNull": false+ "notNull": true},- "topic_id": {- "name": "topic_id",+ "content": {+ "name": "content","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "operation_id": {- "name": "operation_id",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,"notNull": false},- "wake": {- "name": "wake",- "type": "jsonb",+ "agent_id": {+ "name": "agent_id",+ "type": "text","primaryKey": false,"notNull": false},- "manifest": {- "name": "manifest",+ "mentions": {+ "name": "mentions","type": "jsonb","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": "'[]'::jsonb"},- "execution_config": {- "name": "execution_config",- "type": "jsonb",+ "request_key": {+ "name": "request_key",+ "type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "device_id": {- "name": "device_id",- "type": "varchar(64)",+ "reply_to_id": {+ "name": "reply_to_id",+ "type": "uuid","primaryKey": false,"notNull": false},- "working_directory": {- "name": "working_directory",+ "routing_status": {+ "name": "routing_status","type": "text","primaryKey": false,- "notNull": false- },- "accepted_at": {- "name": "accepted_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": false+ "notNull": true},- "lease_owner": {- "name": "lease_owner",+ "routing_source": {+ "name": "routing_source","type": "text","primaryKey": false,"notNull": false},- "lease_expires_at": {- "name": "lease_expires_at",- "type": "timestamp with time zone",+ "routing_reason": {+ "name": "routing_reason",+ "type": "text","primaryKey": false,"notNull": false},- "writer_held": {- "name": "writer_held",- "type": "boolean",+ "routing_attempt": {+ "name": "routing_attempt",+ "type": "integer","primaryKey": false,"notNull": true,- "default": false- },- "isolated_at": {- "name": "isolated_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": false- },- "draft": {- "name": "draft",- "type": "text",- "primaryKey": false,- "notNull": false+ "default": 0},- "publication_revoked": {- "name": "publication_revoked",- "type": "boolean",+ "recipient_member_ids": {+ "name": "recipient_member_ids",+ "type": "jsonb","primaryKey": false,"notNull": true,- "default": false+ "default": "'[]'::jsonb"},- "published_message_id": {- "name": "published_message_id",- "type": "uuid",+ "metadata": {+ "name": "metadata",+ "type": "jsonb","primaryKey": false,- "notNull": false+ "notNull": false,+ "default": "'{}'::jsonb"},"created_at": {"name": "created_at",@@ -11904,27 +15685,20 @@"primaryKey": false,"notNull": true,"default": "now()"- },- "updated_at": {- "name": "updated_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": true,- "default": "now()"}},"indexes": {- "channel_jobs_delivery_unique": {- "name": "channel_jobs_delivery_unique",+ "channel_messages_sequence_unique": {+ "name": "channel_messages_sequence_unique","columns": [{- "expression": "message_id",+ "expression": "channel_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "member_id",+ "expression": "sequence","isExpression": false,"asc": true,"nulls": "last"@@ -11935,8 +15709,8 @@"method": "btree","with": {}},- "channel_jobs_channel_status_idx": {- "name": "channel_jobs_channel_status_idx",+ "channel_messages_request_key_unique": {+ "name": "channel_messages_request_key_unique","columns": [{"expression": "channel_id",@@ -11945,28 +15719,22 @@"nulls": "last"},{- "expression": "status",+ "expression": "request_key","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,+ "isUnique": true,"concurrently": false,"method": "btree","with": {}},- "channel_jobs_continuation_idx": {- "name": "channel_jobs_continuation_idx",+ "channel_messages_thread_sequence_idx": {+ "name": "channel_messages_thread_sequence_idx","columns": [{- "expression": "member_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "requester_member_id",+ "expression": "channel_id","isExpression": false,"asc": true,"nulls": "last"@@ -11978,28 +15746,7 @@"nulls": "last"},{- "expression": "claimed_at",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "channel_jobs_topic_idx": {- "name": "channel_jobs_topic_idx",- "columns": [- {- "expression": "topic_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "published_message_id",+ "expression": "sequence","isExpression": false,"asc": true,"nulls": "last"@@ -12010,172 +15757,139 @@"method": "btree","with": {}},- "channel_jobs_member_queue_idx": {- "name": "channel_jobs_member_queue_idx",+ "channel_messages_request_sequence_idx": {+ "name": "channel_messages_request_sequence_idx","columns": [{- "expression": "member_id",+ "expression": "channel_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "status",+ "expression": "thread_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "created_at",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "channel_jobs_lease_expires_idx": {- "name": "channel_jobs_lease_expires_idx",- "columns": [- {- "expression": "lease_expires_at",+ "expression": "sequence","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,- "where": "\"channel_jobs\".\"writer_held\" AND \"channel_jobs\".\"isolated_at\" IS NULL",- "concurrently": false,- "method": "btree",- "with": {}- },- "channel_jobs_active_member_unique": {- "name": "channel_jobs_active_member_unique",- "columns": [- {- "expression": "member_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": true,- "where": "\"channel_jobs\".\"writer_held\" AND \"channel_jobs\".\"isolated_at\" IS NULL",+ "where": "\"channel_messages\".\"routing_status\" <> 'reply'","concurrently": false,"method": "btree","with": {}},- "channel_jobs_active_directory_unique": {- "name": "channel_jobs_active_directory_unique",+ "channel_messages_routing_pending_idx": {+ "name": "channel_messages_routing_pending_idx","columns": [{- "expression": "device_id",+ "expression": "channel_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "working_directory",+ "expression": "id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": true,- "where": "\"channel_jobs\".\"device_id\" IS NOT NULL AND \"channel_jobs\".\"working_directory\" IS NOT NULL AND \"channel_jobs\".\"writer_held\"",+ "isUnique": false,+ "where": "\"channel_messages\".\"routing_status\" = 'pending'","concurrently": false,"method": "btree","with": {}}},"foreignKeys": {- "channel_jobs_channel_id_channels_id_fk": {- "name": "channel_jobs_channel_id_channels_id_fk",- "tableFrom": "channel_jobs",+ "channel_messages_channel_id_channels_id_fk": {+ "name": "channel_messages_channel_id_channels_id_fk",+ "tableFrom": "channel_messages","tableTo": "channels",- "columnsFrom": ["channel_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "channel_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "channel_jobs_topic_id_topics_id_fk": {- "name": "channel_jobs_topic_id_topics_id_fk",- "tableFrom": "channel_jobs",- "tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "channel_messages_user_id_users_id_fk": {+ "name": "channel_messages_user_id_users_id_fk",+ "tableFrom": "channel_messages",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},- "channel_jobs_operation_id_agent_operations_id_fk": {- "name": "channel_jobs_operation_id_agent_operations_id_fk",- "tableFrom": "channel_jobs",- "tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "channel_messages_agent_id_agents_id_fk": {+ "name": "channel_messages_agent_id_agents_id_fk",+ "tableFrom": "channel_messages",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},- "channel_jobs_member_fk": {- "name": "channel_jobs_member_fk",- "tableFrom": "channel_jobs",- "tableTo": "channel_members",- "columnsFrom": ["channel_id", "member_id"],- "columnsTo": ["channel_id", "id"],- "onDelete": "no action",- "onUpdate": "no action"- },- "channel_jobs_requester_fk": {- "name": "channel_jobs_requester_fk",- "tableFrom": "channel_jobs",- "tableTo": "channel_members",- "columnsFrom": ["channel_id", "requester_member_id"],- "columnsTo": ["channel_id", "id"],- "onDelete": "no action",- "onUpdate": "no action"- },- "channel_jobs_message_fk": {- "name": "channel_jobs_message_fk",- "tableFrom": "channel_jobs",- "tableTo": "channel_messages",- "columnsFrom": ["channel_id", "message_id"],- "columnsTo": ["channel_id", "id"],- "onDelete": "no action",- "onUpdate": "no action"- },- "channel_jobs_thread_fk": {- "name": "channel_jobs_thread_fk",- "tableFrom": "channel_jobs",+ "channel_messages_thread_fk": {+ "name": "channel_messages_thread_fk",+ "tableFrom": "channel_messages","tableTo": "channel_threads",- "columnsFrom": ["channel_id", "thread_id"],- "columnsTo": ["channel_id", "id"],+ "columnsFrom": [+ "channel_id",+ "thread_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],"onDelete": "no action","onUpdate": "no action"}},"compositePrimaryKeys": {},"uniqueConstraints": {- "channel_jobs_operation_id_unique": {- "name": "channel_jobs_operation_id_unique",- "nullsNotDistinct": false,- "columns": ["operation_id"]- },- "channel_jobs_scope_unique": {- "name": "channel_jobs_scope_unique",+ "channel_messages_scope_unique": {+ "name": "channel_messages_scope_unique","nullsNotDistinct": false,- "columns": ["channel_id", "id"]+ "columns": [+ "channel_id",+ "id"+ ]}},"policies": {},- "checkConstraints": {},+ "checkConstraints": {+ "channel_messages_sender_check": {+ "name": "channel_messages_sender_check",+ "value": "\"channel_messages\".\"user_id\" IS NULL OR \"channel_messages\".\"agent_id\" IS NULL"+ },+ "channel_messages_user_sender_check": {+ "name": "channel_messages_user_sender_check",+ "value": "\"channel_messages\".\"routing_status\" <> 'reply' OR \"channel_messages\".\"user_id\" IS NULL"+ }+ },"isRLSEnabled": false},- "public.channel_member_grants": {- "name": "channel_member_grants",+ "public.channel_sections": {+ "name": "channel_sections","schema": "","columns": {"id": {@@ -12185,66 +15899,150 @@"notNull": true,"default": "gen_random_uuid()"},- "channel_id": {- "name": "channel_id",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,"notNull": true},- "member_id": {- "name": "member_id",- "type": "uuid",+ "workspace_id": {+ "name": "workspace_id",+ "type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "device_owner_id": {- "name": "device_owner_id",+ "name": {+ "name": "name","type": "text","primaryKey": false,"notNull": true},- "device_id": {- "name": "device_id",- "type": "varchar(64)",+ "sort": {+ "name": "sort",+ "type": "integer",+ "primaryKey": false,+ "notNull": false+ },+ "collapsed": {+ "name": "collapsed",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "default": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone","primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "channel_sections_user_id_workspace_id_idx": {+ "name": "channel_sections_user_id_workspace_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "channel_sections_user_id_users_id_fk": {+ "name": "channel_sections_user_id_users_id_fk",+ "tableFrom": "channel_sections",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channel_sections_workspace_id_workspaces_id_fk": {+ "name": "channel_sections_workspace_id_workspaces_id_fk",+ "tableFrom": "channel_sections",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.channel_threads": {+ "name": "channel_threads",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,"notNull": true},- "working_directory": {- "name": "working_directory",+ "channel_id": {+ "name": "channel_id","type": "text","primaryKey": false,"notNull": true},- "requested_by_member_id": {- "name": "requested_by_member_id",+ "root_message_id": {+ "name": "root_message_id","type": "uuid","primaryKey": false,"notNull": true},- "status": {- "name": "status",- "type": "text",- "primaryKey": false,- "notNull": true,- "default": "'pending'"- },- "decided_at": {- "name": "decided_at",- "type": "timestamp with time zone",+ "root_sequence": {+ "name": "root_sequence",+ "type": "integer","primaryKey": false,- "notNull": false+ "notNull": true},- "revoked_at": {- "name": "revoked_at",- "type": "timestamp with time zone",+ "follower_member_ids": {+ "name": "follower_member_ids",+ "type": "jsonb","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": "'[]'::jsonb"},- "revoke_reason": {- "name": "revoke_reason",+ "status": {+ "name": "status","type": "text","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": "'active'"},"metadata": {"name": "metadata",@@ -12253,15 +16051,20 @@"notNull": false,"default": "'{}'::jsonb"},- "created_at": {- "name": "created_at",+ "deleted_at": {+ "name": "deleted_at","type": "timestamp with time zone","primaryKey": false,- "notNull": true,- "default": "now()"+ "notNull": false},- "updated_at": {- "name": "updated_at",+ "is_deleted": {+ "name": "is_deleted",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false+ },+ "created_at": {+ "name": "created_at","type": "timestamp with time zone","primaryKey": false,"notNull": true,@@ -12269,108 +16072,82 @@}},"indexes": {- "channel_member_grants_member_unique": {- "name": "channel_member_grants_member_unique",- "columns": [- {- "expression": "member_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": true,- "concurrently": false,- "method": "btree",- "with": {}- },- "channel_member_grants_owner_status_idx": {- "name": "channel_member_grants_owner_status_idx",+ "channel_threads_root_unique": {+ "name": "channel_threads_root_unique","columns": [{- "expression": "device_owner_id",+ "expression": "channel_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "status",+ "expression": "root_message_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,+ "isUnique": true,+ "where": "\"channel_threads\".\"is_deleted\" IS NOT TRUE","concurrently": false,"method": "btree","with": {}}},"foreignKeys": {- "channel_member_grants_channel_id_channels_id_fk": {- "name": "channel_member_grants_channel_id_channels_id_fk",- "tableFrom": "channel_member_grants",+ "channel_threads_channel_id_channels_id_fk": {+ "name": "channel_threads_channel_id_channels_id_fk",+ "tableFrom": "channel_threads","tableTo": "channels",- "columnsFrom": ["channel_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- },- "channel_member_grants_device_owner_id_users_id_fk": {- "name": "channel_member_grants_device_owner_id_users_id_fk",- "tableFrom": "channel_member_grants",- "tableTo": "users",- "columnsFrom": ["device_owner_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "channel_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "channel_member_grants_member_fk": {- "name": "channel_member_grants_member_fk",- "tableFrom": "channel_member_grants",- "tableTo": "channel_members",- "columnsFrom": ["channel_id", "member_id"],- "columnsTo": ["channel_id", "id"],- "onDelete": "no action",- "onUpdate": "no action"- },- "channel_member_grants_requester_fk": {- "name": "channel_member_grants_requester_fk",- "tableFrom": "channel_member_grants",- "tableTo": "channel_members",- "columnsFrom": ["channel_id", "requested_by_member_id"],- "columnsTo": ["channel_id", "id"],+ "channel_threads_root_fk": {+ "name": "channel_threads_root_fk",+ "tableFrom": "channel_threads",+ "tableTo": "channel_messages",+ "columnsFrom": [+ "channel_id",+ "root_message_id"+ ],+ "columnsTo": [+ "channel_id",+ "id"+ ],"onDelete": "no action","onUpdate": "no action"}},- "compositePrimaryKeys": {},- "uniqueConstraints": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {+ "channel_threads_scope_unique": {+ "name": "channel_threads_scope_unique",+ "nullsNotDistinct": false,+ "columns": [+ "channel_id",+ "id"+ ]+ }+ },"policies": {},"checkConstraints": {},"isRLSEnabled": false},- "public.channel_members": {- "name": "channel_members",+ "public.channels": {+ "name": "channels","schema": "","columns": {"id": {"name": "id",- "type": "uuid",- "primaryKey": true,- "notNull": true,- "default": "gen_random_uuid()"- },- "channel_id": {- "name": "channel_id","type": "text",- "primaryKey": false,- "notNull": true- },- "actor_type": {- "name": "actor_type",- "type": "text",- "primaryKey": false,+ "primaryKey": true,"notNull": true},"user_id": {@@ -12379,15 +16156,15 @@"primaryKey": false,"notNull": false},- "role": {- "name": "role",+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,"notNull": false},- "last_read_sequence": {- "name": "last_read_sequence",- "type": "integer",+ "project_id": {+ "name": "project_id",+ "type": "text","primaryKey": false,"notNull": false},@@ -12397,18 +16174,44 @@"primaryKey": false,"notNull": false},- "name": {- "name": "name",+ "peer_user_id": {+ "name": "peer_user_id","type": "text","primaryKey": false,"notNull": false},- "description": {- "name": "description",+ "agent_pair_key": {+ "name": "agent_pair_key",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "sequence": {+ "name": "sequence",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "default": 0+ },+ "status": {+ "name": "status","type": "text","primaryKey": false,"notNull": true,- "default": "''"+ "default": "'active'"+ },+ "visibility": {+ "name": "visibility",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'private'"},"config": {"name": "config",@@ -12423,12 +16226,17 @@"notNull": false,"default": "'{}'::jsonb"},- "status": {- "name": "status",- "type": "text",+ "deleted_at": {+ "name": "deleted_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true,- "default": "'active'"+ "notNull": false+ },+ "is_deleted": {+ "name": "is_deleted",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false},"created_at": {"name": "created_at",@@ -12446,11 +16254,26 @@}},"indexes": {- "channel_members_channel_user_unique": {- "name": "channel_members_channel_user_unique",+ "channels_user_id_idx": {+ "name": "channels_user_id_idx","columns": [{- "expression": "channel_id",+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "channels_direct_unique": {+ "name": "channels_direct_unique",+ "columns": [+ {+ "expression": "agent_id","isExpression": false,"asc": true,"nulls": "last"@@ -12460,151 +16283,75 @@"isExpression": false,"asc": true,"nulls": "last"+ },+ {+ "expression": "coalesce(\"workspace_id\", '')",+ "asc": true,+ "isExpression": true,+ "nulls": "last"}],"isUnique": true,- "where": "\"channel_members\".\"user_id\" IS NOT NULL",+ "where": "\"channels\".\"agent_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "channel_members_user_id_idx": {- "name": "channel_members_user_id_idx",+ "channels_agent_pair_unique": {+ "name": "channels_agent_pair_unique","columns": [+ {+ "expression": "agent_pair_key",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },{"expression": "user_id","isExpression": false,"asc": true,"nulls": "last"+ },+ {+ "expression": "coalesce(\"workspace_id\", '')",+ "asc": true,+ "isExpression": true,+ "nulls": "last"}],- "isUnique": false,+ "isUnique": true,+ "where": "\"channels\".\"agent_pair_key\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "channel_members_agent_id_idx": {- "name": "channel_members_agent_id_idx",+ "channels_project_id_idx": {+ "name": "channels_project_id_idx","columns": [{- "expression": "agent_id",+ "expression": "project_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,+ "where": "\"channels\".\"project_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}- }- },- "foreignKeys": {- "channel_members_channel_id_channels_id_fk": {- "name": "channel_members_channel_id_channels_id_fk",- "tableFrom": "channel_members",- "tableTo": "channels",- "columnsFrom": ["channel_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- },- "channel_members_user_id_users_id_fk": {- "name": "channel_members_user_id_users_id_fk",- "tableFrom": "channel_members",- "tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],- "onDelete": "set null",- "onUpdate": "no action"- },- "channel_members_agent_id_agents_id_fk": {- "name": "channel_members_agent_id_agents_id_fk",- "tableFrom": "channel_members",- "tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],- "onDelete": "set null",- "onUpdate": "no action"- }- },- "compositePrimaryKeys": {},- "uniqueConstraints": {- "channel_members_scope_unique": {- "name": "channel_members_scope_unique",- "nullsNotDistinct": false,- "columns": ["channel_id", "id"]- }- },- "policies": {},- "checkConstraints": {- "channel_members_actor_type_check": {- "name": "channel_members_actor_type_check",- "value": "\"channel_members\".\"actor_type\" IN ('user', 'agent')"- },- "channel_members_user_shape_check": {- "name": "channel_members_user_shape_check",- "value": "\"channel_members\".\"actor_type\" <> 'user' OR \"channel_members\".\"role\" IS NOT NULL"- },- "channel_members_agent_shape_check": {- "name": "channel_members_agent_shape_check",- "value": "\"channel_members\".\"actor_type\" <> 'agent' OR (\"channel_members\".\"name\" IS NOT NULL AND \"channel_members\".\"config\" IS NOT NULL)"- },- "channel_members_user_id_owner_check": {- "name": "channel_members_user_id_owner_check",- "value": "\"channel_members\".\"user_id\" IS NULL OR \"channel_members\".\"actor_type\" = 'user'"- },- "channel_members_role_owner_check": {- "name": "channel_members_role_owner_check",- "value": "\"channel_members\".\"role\" IS NULL OR \"channel_members\".\"actor_type\" = 'user'"- },- "channel_members_agent_id_owner_check": {- "name": "channel_members_agent_id_owner_check",- "value": "\"channel_members\".\"agent_id\" IS NULL OR \"channel_members\".\"actor_type\" = 'agent'"- },- "channel_members_config_owner_check": {- "name": "channel_members_config_owner_check",- "value": "\"channel_members\".\"config\" IS NULL OR \"channel_members\".\"actor_type\" <> 'user'"- }- },- "isRLSEnabled": false- },- "public.channel_message_files": {- "name": "channel_message_files",- "schema": "",- "columns": {- "id": {- "name": "id",- "type": "uuid",- "primaryKey": true,- "notNull": true,- "default": "gen_random_uuid()"- },- "message_id": {- "name": "message_id",- "type": "uuid",- "primaryKey": false,- "notNull": true- },- "file_id": {- "name": "file_id",- "type": "text",- "primaryKey": false,- "notNull": true},- "sort_order": {- "name": "sort_order",- "type": "integer",- "primaryKey": false,- "notNull": true- }- },- "indexes": {- "channel_message_files_file_idx": {- "name": "channel_message_files_file_idx",+ "channels_workspace_visibility_idx": {+ "name": "channels_workspace_visibility_idx","columns": [{- "expression": "file_id",+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "visibility","isExpression": false,"asc": true,"nulls": "last"@@ -12617,141 +16364,197 @@}},"foreignKeys": {- "channel_message_files_message_id_channel_messages_id_fk": {- "name": "channel_message_files_message_id_channel_messages_id_fk",- "tableFrom": "channel_message_files",- "tableTo": "channel_messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "channels_user_id_users_id_fk": {+ "name": "channels_user_id_users_id_fk",+ "tableFrom": "channels",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "channels_workspace_id_workspaces_id_fk": {+ "name": "channels_workspace_id_workspaces_id_fk",+ "tableFrom": "channels",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "channel_message_files_file_id_files_id_fk": {- "name": "channel_message_files_file_id_files_id_fk",- "tableFrom": "channel_message_files",- "tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "channels_project_id_projects_id_fk": {+ "name": "channels_project_id_projects_id_fk",+ "tableFrom": "channels",+ "tableTo": "projects",+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "set null",+ "onUpdate": "no action"+ },+ "channels_agent_id_agents_id_fk": {+ "name": "channels_agent_id_agents_id_fk",+ "tableFrom": "channels",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "channels_peer_user_id_users_id_fk": {+ "name": "channels_peer_user_id_users_id_fk",+ "tableFrom": "channels",+ "tableTo": "users",+ "columnsFrom": [+ "peer_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}},"compositePrimaryKeys": {},- "uniqueConstraints": {- "channel_message_files_message_file_unique": {- "name": "channel_message_files_message_file_unique",- "nullsNotDistinct": false,- "columns": ["message_id", "file_id"]+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {+ "channels_direct_visibility_check": {+ "name": "channels_direct_visibility_check",+ "value": "\"channels\".\"agent_id\" IS NULL OR \"channels\".\"visibility\" = 'private'"}},- "policies": {},- "checkConstraints": {},"isRLSEnabled": false},- "public.channel_messages": {- "name": "channel_messages",+ "public.chat_groups": {+ "name": "chat_groups","schema": "","columns": {"id": {"name": "id",- "type": "uuid",+ "type": "text","primaryKey": true,- "notNull": true,- "default": "gen_random_uuid()"+ "notNull": true},- "channel_id": {- "name": "channel_id",+ "title": {+ "name": "title","type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "thread_id": {- "name": "thread_id",+ "description": {+ "name": "description","type": "text","primaryKey": false,"notNull": false},- "sequence": {- "name": "sequence",- "type": "integer",+ "avatar": {+ "name": "avatar",+ "type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "content": {- "name": "content",+ "background_color": {+ "name": "background_color","type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "user_id": {- "name": "user_id",+ "market_identifier": {+ "name": "market_identifier","type": "text","primaryKey": false,"notNull": false},- "agent_id": {- "name": "agent_id",+ "content": {+ "name": "content","type": "text","primaryKey": false,"notNull": false},- "mentions": {- "name": "mentions",+ "editor_data": {+ "name": "editor_data","type": "jsonb","primaryKey": false,- "notNull": true,- "default": "'[]'::jsonb"+ "notNull": false},- "request_key": {- "name": "request_key",- "type": "text",+ "config": {+ "name": "config",+ "type": "jsonb","primaryKey": false,- "notNull": true+ "notNull": false},- "reply_to_id": {- "name": "reply_to_id",- "type": "uuid",+ "client_id": {+ "name": "client_id",+ "type": "text","primaryKey": false,"notNull": false},- "routing_status": {- "name": "routing_status",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,"notNull": true},- "routing_source": {- "name": "routing_source",+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,"notNull": false},- "routing_reason": {- "name": "routing_reason",+ "group_id": {+ "name": "group_id","type": "text","primaryKey": false,"notNull": false},- "routing_attempt": {- "name": "routing_attempt",- "type": "integer",+ "pinned": {+ "name": "pinned",+ "type": "boolean","primaryKey": false,- "notNull": true,- "default": 0+ "notNull": false,+ "default": false},- "recipient_member_ids": {- "name": "recipient_member_ids",- "type": "jsonb",+ "visibility": {+ "name": "visibility",+ "type": "text","primaryKey": false,"notNull": true,- "default": "'[]'::jsonb"+ "default": "'public'"},- "metadata": {- "name": "metadata",- "type": "jsonb",+ "deleted_at": {+ "name": "deleted_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": false,- "default": "'{}'::jsonb"+ "notNull": false+ },+ "is_deleted": {+ "name": "is_deleted",+ "type": "boolean",+ "primaryKey": false,+ "notNull": false+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"},"created_at": {"name": "created_at",@@ -12759,20 +16562,27 @@"primaryKey": false,"notNull": true,"default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "channel_messages_sequence_unique": {- "name": "channel_messages_sequence_unique",+ "chat_groups_client_id_user_id_unique": {+ "name": "chat_groups_client_id_user_id_unique","columns": [{- "expression": "channel_id",+ "expression": "client_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "sequence",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"@@ -12783,44 +16593,26 @@"method": "btree","with": {}},- "channel_messages_request_key_unique": {- "name": "channel_messages_request_key_unique",+ "chat_groups_user_id_idx": {+ "name": "chat_groups_user_id_idx","columns": [{- "expression": "channel_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "request_key",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": true,+ "isUnique": false,"concurrently": false,"method": "btree","with": {}},- "channel_messages_thread_sequence_idx": {- "name": "channel_messages_thread_sequence_idx",+ "chat_groups_group_id_idx": {+ "name": "chat_groups_group_id_idx","columns": [{- "expression": "channel_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "thread_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "sequence",+ "expression": "group_id","isExpression": false,"asc": true,"nulls": "last"@@ -12831,180 +16623,151 @@"method": "btree","with": {}},- "channel_messages_request_sequence_idx": {- "name": "channel_messages_request_sequence_idx",+ "chat_groups_workspace_id_idx": {+ "name": "chat_groups_workspace_id_idx","columns": [{- "expression": "channel_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "thread_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "sequence",+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,- "where": "\"channel_messages\".\"routing_status\" <> 'reply'","concurrently": false,"method": "btree","with": {}},- "channel_messages_routing_pending_idx": {- "name": "channel_messages_routing_pending_idx",+ "chat_groups_workspace_visibility_idx": {+ "name": "chat_groups_workspace_visibility_idx","columns": [{- "expression": "channel_id",+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "id",+ "expression": "visibility",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,- "where": "\"channel_messages\".\"routing_status\" = 'pending'","concurrently": false,"method": "btree","with": {}}},"foreignKeys": {- "channel_messages_channel_id_channels_id_fk": {- "name": "channel_messages_channel_id_channels_id_fk",- "tableFrom": "channel_messages",- "tableTo": "channels",- "columnsFrom": ["channel_id"],- "columnsTo": ["id"],+ "chat_groups_user_id_users_id_fk": {+ "name": "chat_groups_user_id_users_id_fk",+ "tableFrom": "chat_groups",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "channel_messages_user_id_users_id_fk": {- "name": "channel_messages_user_id_users_id_fk",- "tableFrom": "channel_messages",- "tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],- "onDelete": "set null",+ "chat_groups_workspace_id_workspaces_id_fk": {+ "name": "chat_groups_workspace_id_workspaces_id_fk",+ "tableFrom": "chat_groups",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade","onUpdate": "no action"},- "channel_messages_agent_id_agents_id_fk": {- "name": "channel_messages_agent_id_agents_id_fk",- "tableFrom": "channel_messages",- "tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "chat_groups_group_id_session_groups_id_fk": {+ "name": "chat_groups_group_id_session_groups_id_fk",+ "tableFrom": "chat_groups",+ "tableTo": "session_groups",+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"- },- "channel_messages_thread_fk": {- "name": "channel_messages_thread_fk",- "tableFrom": "channel_messages",- "tableTo": "channel_threads",- "columnsFrom": ["channel_id", "thread_id"],- "columnsTo": ["channel_id", "id"],- "onDelete": "no action",- "onUpdate": "no action"}},"compositePrimaryKeys": {},- "uniqueConstraints": {- "channel_messages_scope_unique": {- "name": "channel_messages_scope_unique",- "nullsNotDistinct": false,- "columns": ["channel_id", "id"]- }- },+ "uniqueConstraints": {},"policies": {},- "checkConstraints": {- "channel_messages_sender_check": {- "name": "channel_messages_sender_check",- "value": "\"channel_messages\".\"user_id\" IS NULL OR \"channel_messages\".\"agent_id\" IS NULL"- },- "channel_messages_user_sender_check": {- "name": "channel_messages_user_sender_check",- "value": "\"channel_messages\".\"routing_status\" <> 'reply' OR \"channel_messages\".\"user_id\" IS NULL"- },- "channel_messages_agent_sender_check": {- "name": "channel_messages_agent_sender_check",- "value": "\"channel_messages\".\"routing_status\" = 'reply' OR \"channel_messages\".\"agent_id\" IS NULL"- }- },+ "checkConstraints": {},"isRLSEnabled": false},- "public.channel_threads": {- "name": "channel_threads",+ "public.chat_groups_agents": {+ "name": "chat_groups_agents","schema": "","columns": {- "id": {- "name": "id",+ "chat_group_id": {+ "name": "chat_group_id","type": "text",- "primaryKey": true,+ "primaryKey": false,"notNull": true},- "channel_id": {- "name": "channel_id",+ "agent_id": {+ "name": "agent_id","type": "text","primaryKey": false,"notNull": true},- "root_message_id": {- "name": "root_message_id",- "type": "uuid",+ "user_id": {+ "name": "user_id",+ "type": "text","primaryKey": false,"notNull": true},- "root_sequence": {- "name": "root_sequence",- "type": "integer",+ "workspace_id": {+ "name": "workspace_id",+ "type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "follower_member_ids": {- "name": "follower_member_ids",- "type": "jsonb",+ "enabled": {+ "name": "enabled",+ "type": "boolean","primaryKey": false,- "notNull": true,- "default": "'[]'::jsonb"+ "notNull": false,+ "default": true},- "status": {- "name": "status",- "type": "text",+ "order": {+ "name": "order",+ "type": "integer","primaryKey": false,- "notNull": true,- "default": "'active'"+ "notNull": false,+ "default": 0},- "metadata": {- "name": "metadata",- "type": "jsonb",+ "role": {+ "name": "role",+ "type": "text","primaryKey": false,"notNull": false,- "default": "'{}'::jsonb"+ "default": "'participant'"},- "deleted_at": {- "name": "deleted_at",+ "accessed_at": {+ "name": "accessed_at","type": "timestamp with time zone","primaryKey": false,- "notNull": false- },- "is_deleted": {- "name": "is_deleted",- "type": "boolean",- "primaryKey": false,- "notNull": false+ "notNull": true,+ "default": "now()"},"created_at": {"name": "created_at",@@ -13012,79 +16775,137 @@"primaryKey": false,"notNull": true,"default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"}},"indexes": {- "channel_threads_root_unique": {- "name": "channel_threads_root_unique",+ "chat_groups_agents_user_id_idx": {+ "name": "chat_groups_agents_user_id_idx","columns": [{- "expression": "channel_id",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"- },+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "chat_groups_agents_workspace_id_idx": {+ "name": "chat_groups_agents_workspace_id_idx",+ "columns": [{- "expression": "root_message_id",+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": true,- "where": "\"channel_threads\".\"is_deleted\" IS NOT TRUE",+ "isUnique": false,"concurrently": false,"method": "btree","with": {}}},"foreignKeys": {- "channel_threads_channel_id_channels_id_fk": {- "name": "channel_threads_channel_id_channels_id_fk",- "tableFrom": "channel_threads",- "tableTo": "channels",- "columnsFrom": ["channel_id"],- "columnsTo": ["id"],+ "chat_groups_agents_chat_group_id_chat_groups_id_fk": {+ "name": "chat_groups_agents_chat_group_id_chat_groups_id_fk",+ "tableFrom": "chat_groups_agents",+ "tableTo": "chat_groups",+ "columnsFrom": [+ "chat_group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "channel_threads_root_fk": {- "name": "channel_threads_root_fk",- "tableFrom": "channel_threads",- "tableTo": "channel_messages",- "columnsFrom": ["channel_id", "root_message_id"],- "columnsTo": ["channel_id", "id"],- "onDelete": "no action",+ "chat_groups_agents_agent_id_agents_id_fk": {+ "name": "chat_groups_agents_agent_id_agents_id_fk",+ "tableFrom": "chat_groups_agents",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "chat_groups_agents_user_id_users_id_fk": {+ "name": "chat_groups_agents_user_id_users_id_fk",+ "tableFrom": "chat_groups_agents",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "chat_groups_agents_workspace_id_workspaces_id_fk": {+ "name": "chat_groups_agents_workspace_id_workspaces_id_fk",+ "tableFrom": "chat_groups_agents",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade","onUpdate": "no action"}},- "compositePrimaryKeys": {},- "uniqueConstraints": {- "channel_threads_scope_unique": {- "name": "channel_threads_scope_unique",- "nullsNotDistinct": false,- "columns": ["channel_id", "id"]+ "compositePrimaryKeys": {+ "chat_groups_agents_chat_group_id_agent_id_pk": {+ "name": "chat_groups_agents_chat_group_id_agent_id_pk",+ "columns": [+ "chat_group_id",+ "agent_id"+ ]}},+ "uniqueConstraints": {},"policies": {},"checkConstraints": {},"isRLSEnabled": false},- "public.channels": {- "name": "channels",+ "public.user_connector_tools": {+ "name": "user_connector_tools","schema": "","columns": {"id": {"name": "id",- "type": "text",+ "type": "uuid","primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "user_connector_id": {+ "name": "user_connector_id",+ "type": "uuid",+ "primaryKey": false,"notNull": true},"user_id": {"name": "user_id","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},"workspace_id": {"name": "workspace_id",@@ -13092,69 +16913,85 @@"primaryKey": false,"notNull": false},- "project_id": {- "name": "project_id",- "type": "text",+ "tool_name": {+ "name": "tool_name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true+ },+ "display_name": {+ "name": "display_name",+ "type": "varchar(255)","primaryKey": false,"notNull": false},- "agent_id": {- "name": "agent_id",+ "description": {+ "name": "description","type": "text","primaryKey": false,"notNull": false},- "title": {- "name": "title",+ "input_schema": {+ "name": "input_schema",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "output_schema": {+ "name": "output_schema",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "crud_type": {+ "name": "crud_type","type": "text","primaryKey": false,"notNull": true},- "sequence": {- "name": "sequence",- "type": "integer",+ "render_config": {+ "name": "render_config",+ "type": "jsonb","primaryKey": false,- "notNull": true,- "default": 0+ "notNull": false},- "status": {- "name": "status",+ "permission": {+ "name": "permission","type": "text","primaryKey": false,- "notNull": true,- "default": "'active'"+ "notNull": true},- "visibility": {- "name": "visibility",- "type": "text",+ "is_work_artifact": {+ "name": "is_work_artifact",+ "type": "boolean","primaryKey": false,"notNull": true,- "default": "'private'"+ "default": false},- "config": {- "name": "config",+ "work_artifact_config": {+ "name": "work_artifact_config","type": "jsonb","primaryKey": false,"notNull": false},- "metadata": {- "name": "metadata",+ "limit_config": {+ "name": "limit_config","type": "jsonb","primaryKey": false,- "notNull": false,- "default": "'{}'::jsonb"+ "notNull": false},- "deleted_at": {- "name": "deleted_at",- "type": "timestamp with time zone",+ "metadata": {+ "name": "metadata",+ "type": "jsonb","primaryKey": false,"notNull": false},- "is_deleted": {- "name": "is_deleted",- "type": "boolean",+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": "now()"},"created_at": {"name": "created_at",@@ -13172,79 +17009,65 @@}},"indexes": {- "channels_user_id_idx": {- "name": "channels_user_id_idx",+ "user_connector_tools_connector_tool_unique": {+ "name": "user_connector_tools_connector_tool_unique","columns": [{- "expression": "user_id",+ "expression": "user_connector_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "tool_name","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,+ "isUnique": true,"concurrently": false,"method": "btree","with": {}},- "channels_direct_unique": {- "name": "channels_direct_unique",+ "user_connector_tools_user_id_idx": {+ "name": "user_connector_tools_user_id_idx","columns": [- {- "expression": "agent_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },{"expression": "user_id","isExpression": false,"asc": true,"nulls": "last"- },- {- "expression": "coalesce(\"workspace_id\", '')",- "asc": true,- "isExpression": true,- "nulls": "last"}],- "isUnique": true,- "where": "\"channels\".\"agent_id\" IS NOT NULL",+ "isUnique": false,"concurrently": false,"method": "btree","with": {}},- "channels_project_id_idx": {- "name": "channels_project_id_idx",+ "user_connector_tools_connector_id_idx": {+ "name": "user_connector_tools_connector_id_idx","columns": [{- "expression": "project_id",+ "expression": "user_connector_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,- "where": "\"channels\".\"project_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "channels_workspace_visibility_idx": {- "name": "channels_workspace_visibility_idx",+ "user_connector_tools_workspace_id_idx": {+ "name": "user_connector_tools_workspace_id_idx","columns": [{"expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"- },- {- "expression": "visibility",- "isExpression": false,- "asc": true,- "nulls": "last"}],"isUnique": false,@@ -13254,39 +17077,42 @@}},"foreignKeys": {- "channels_user_id_users_id_fk": {- "name": "channels_user_id_users_id_fk",- "tableFrom": "channels",- "tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],- "onDelete": "set null",- "onUpdate": "no action"- },- "channels_workspace_id_workspaces_id_fk": {- "name": "channels_workspace_id_workspaces_id_fk",- "tableFrom": "channels",- "tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "user_connector_tools_user_connector_id_user_connectors_id_fk": {+ "name": "user_connector_tools_user_connector_id_user_connectors_id_fk",+ "tableFrom": "user_connector_tools",+ "tableTo": "user_connectors",+ "columnsFrom": [+ "user_connector_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "channels_project_id_projects_id_fk": {- "name": "channels_project_id_projects_id_fk",- "tableFrom": "channels",- "tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],- "onDelete": "set null",+ "user_connector_tools_user_id_users_id_fk": {+ "name": "user_connector_tools_user_id_users_id_fk",+ "tableFrom": "user_connector_tools",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade","onUpdate": "no action"},- "channels_agent_id_agents_id_fk": {- "name": "channels_agent_id_agents_id_fk",- "tableFrom": "channels",- "tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "user_connector_tools_workspace_id_workspaces_id_fk": {+ "name": "user_connector_tools_workspace_id_workspaces_id_fk",+ "tableFrom": "user_connector_tools",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -13294,102 +17120,110 @@"compositePrimaryKeys": {},"uniqueConstraints": {},"policies": {},- "checkConstraints": {- "channels_direct_visibility_check": {- "name": "channels_direct_visibility_check",- "value": "\"channels\".\"agent_id\" IS NULL OR \"channels\".\"visibility\" = 'private'"- }- },+ "checkConstraints": {},"isRLSEnabled": false},- "public.chat_groups": {- "name": "chat_groups",+ "public.user_connectors": {+ "name": "user_connectors","schema": "","columns": {"id": {"name": "id",- "type": "text",+ "type": "uuid","primaryKey": true,- "notNull": true+ "notNull": true,+ "default": "gen_random_uuid()"},- "title": {- "name": "title",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "description": {- "name": "description",+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,"notNull": false},- "avatar": {- "name": "avatar",+ "agent_id": {+ "name": "agent_id","type": "text","primaryKey": false,"notNull": false},- "background_color": {- "name": "background_color",- "type": "text",+ "identifier": {+ "name": "identifier",+ "type": "varchar(255)","primaryKey": false,- "notNull": false+ "notNull": true},- "market_identifier": {- "name": "market_identifier",+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true+ },+ "source_type": {+ "name": "source_type","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "content": {- "name": "content",+ "mcp_server_url": {+ "name": "mcp_server_url","type": "text","primaryKey": false,"notNull": false},- "editor_data": {- "name": "editor_data",- "type": "jsonb",+ "mcp_connection_type": {+ "name": "mcp_connection_type",+ "type": "text","primaryKey": false,"notNull": false},- "config": {- "name": "config",+ "mcp_stdio_config": {+ "name": "mcp_stdio_config","type": "jsonb","primaryKey": false,"notNull": false},- "client_id": {- "name": "client_id",+ "status": {+ "name": "status","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "user_id": {- "name": "user_id",- "type": "text",+ "is_enabled": {+ "name": "is_enabled",+ "type": "boolean","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": true},- "workspace_id": {- "name": "workspace_id",- "type": "text",+ "oidc_config": {+ "name": "oidc_config",+ "type": "jsonb","primaryKey": false,"notNull": false},- "group_id": {- "name": "group_id",+ "credentials": {+ "name": "credentials","type": "text","primaryKey": false,"notNull": false},- "pinned": {- "name": "pinned",- "type": "boolean",+ "token_expires_at": {+ "name": "token_expires_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": false,- "default": false+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false},"visibility": {"name": "visibility",@@ -13398,18 +17232,6 @@"notNull": true,"default": "'public'"},- "deleted_at": {- "name": "deleted_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": false- },- "is_deleted": {- "name": "is_deleted",- "type": "boolean",- "primaryKey": false,- "notNull": false- },"accessed_at": {"name": "accessed_at","type": "timestamp with time zone",@@ -13433,47 +17255,83 @@}},"indexes": {- "chat_groups_client_id_user_id_unique": {- "name": "chat_groups_client_id_user_id_unique",+ "user_connectors_personal_identifier_idx": {+ "name": "user_connectors_personal_identifier_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "identifier",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"user_connectors\".\"workspace_id\" IS NULL AND \"user_connectors\".\"agent_id\" IS NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "user_connectors_workspace_identifier_idx": {+ "name": "user_connectors_workspace_identifier_idx","columns": [{- "expression": "client_id",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "user_id",+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "identifier","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": true,+ "isUnique": false,+ "where": "\"user_connectors\".\"workspace_id\" IS NOT NULL AND \"user_connectors\".\"agent_id\" IS NULL","concurrently": false,"method": "btree","with": {}},- "chat_groups_user_id_idx": {- "name": "chat_groups_user_id_idx",+ "user_connectors_agent_identifier_idx": {+ "name": "user_connectors_agent_identifier_idx","columns": [{- "expression": "user_id",+ "expression": "agent_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "identifier","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": false,+ "where": "\"user_connectors\".\"agent_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "chat_groups_group_id_idx": {- "name": "chat_groups_group_id_idx",+ "user_connectors_user_id_idx": {+ "name": "user_connectors_user_id_idx","columns": [{- "expression": "group_id",+ "expression": "user_id","isExpression": false,"asc": true,"nulls": "last"@@ -13484,11 +17342,11 @@"method": "btree","with": {}},- "chat_groups_workspace_id_idx": {- "name": "chat_groups_workspace_id_idx",+ "user_connectors_token_expires_at_idx": {+ "name": "user_connectors_token_expires_at_idx","columns": [{- "expression": "workspace_id",+ "expression": "token_expires_at","isExpression": false,"asc": true,"nulls": "last"@@ -13499,23 +17357,26 @@"method": "btree","with": {}},- "chat_groups_workspace_visibility_idx": {- "name": "chat_groups_workspace_visibility_idx",+ "user_connectors_workspace_id_idx": {+ "name": "user_connectors_workspace_id_idx","columns": [{"expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"- },- {- "expression": "visibility",- "isExpression": false,- "asc": true,- "nulls": "last"- },+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "user_connectors_agent_id_idx": {+ "name": "user_connectors_agent_id_idx",+ "columns": [{- "expression": "user_id",+ "expression": "agent_id","isExpression": false,"asc": true,"nulls": "last"@@ -13528,31 +17389,43 @@}},"foreignKeys": {- "chat_groups_user_id_users_id_fk": {- "name": "chat_groups_user_id_users_id_fk",- "tableFrom": "chat_groups",+ "user_connectors_user_id_users_id_fk": {+ "name": "user_connectors_user_id_users_id_fk",+ "tableFrom": "user_connectors","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "chat_groups_workspace_id_workspaces_id_fk": {- "name": "chat_groups_workspace_id_workspaces_id_fk",- "tableFrom": "chat_groups",+ "user_connectors_workspace_id_workspaces_id_fk": {+ "name": "user_connectors_workspace_id_workspaces_id_fk",+ "tableFrom": "user_connectors","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "chat_groups_group_id_session_groups_id_fk": {- "name": "chat_groups_group_id_session_groups_id_fk",- "tableFrom": "chat_groups",- "tableTo": "session_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],- "onDelete": "set null",+ "user_connectors_agent_id_agents_id_fk": {+ "name": "user_connectors_agent_id_agents_id_fk",+ "tableFrom": "user_connectors",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade","onUpdate": "no action"}},@@ -13562,54 +17435,57 @@"checkConstraints": {},"isRLSEnabled": false},- "public.chat_groups_agents": {- "name": "chat_groups_agents",+ "public.user_installed_plugins": {+ "name": "user_installed_plugins","schema": "","columns": {- "chat_group_id": {- "name": "chat_group_id",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,"notNull": true},- "agent_id": {- "name": "agent_id",+ "workspace_id": {+ "name": "workspace_id","type": "text","primaryKey": false,- "notNull": true+ "notNull": false},- "user_id": {- "name": "user_id",+ "identifier": {+ "name": "identifier","type": "text","primaryKey": false,"notNull": true},- "workspace_id": {- "name": "workspace_id",+ "type": {+ "name": "type","type": "text","primaryKey": false,+ "notNull": true+ },+ "manifest": {+ "name": "manifest",+ "type": "jsonb",+ "primaryKey": false,"notNull": false},- "enabled": {- "name": "enabled",- "type": "boolean",+ "settings": {+ "name": "settings",+ "type": "jsonb","primaryKey": false,- "notNull": false,- "default": true+ "notNull": false},- "order": {- "name": "order",- "type": "integer",+ "custom_params": {+ "name": "custom_params",+ "type": "jsonb","primaryKey": false,- "notNull": false,- "default": 0+ "notNull": false},- "role": {- "name": "role",- "type": "text",+ "source": {+ "name": "source",+ "type": "varchar(255)","primaryKey": false,- "notNull": false,- "default": "'participant'"+ "notNull": false},"accessed_at": {"name": "accessed_at",@@ -13634,23 +17510,8 @@}},"indexes": {- "chat_groups_agents_user_id_idx": {- "name": "chat_groups_agents_user_id_idx",- "columns": [- {- "expression": "user_id",- "isExpression": false,- "asc": true,- "nulls": "last"- }- ],- "isUnique": false,- "concurrently": false,- "method": "btree",- "with": {}- },- "chat_groups_agents_workspace_id_idx": {- "name": "chat_groups_agents_workspace_id_idx",+ "user_installed_plugins_workspace_id_idx": {+ "name": "user_installed_plugins_workspace_id_idx","columns": [{"expression": "workspace_id",@@ -13666,47 +17527,40 @@}},"foreignKeys": {- "chat_groups_agents_chat_group_id_chat_groups_id_fk": {- "name": "chat_groups_agents_chat_group_id_chat_groups_id_fk",- "tableFrom": "chat_groups_agents",- "tableTo": "chat_groups",- "columnsFrom": ["chat_group_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- },- "chat_groups_agents_agent_id_agents_id_fk": {- "name": "chat_groups_agents_agent_id_agents_id_fk",- "tableFrom": "chat_groups_agents",- "tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- },- "chat_groups_agents_user_id_users_id_fk": {- "name": "chat_groups_agents_user_id_users_id_fk",- "tableFrom": "chat_groups_agents",+ "user_installed_plugins_user_id_users_id_fk": {+ "name": "user_installed_plugins_user_id_users_id_fk",+ "tableFrom": "user_installed_plugins","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "chat_groups_agents_workspace_id_workspaces_id_fk": {- "name": "chat_groups_agents_workspace_id_workspaces_id_fk",- "tableFrom": "chat_groups_agents",+ "user_installed_plugins_workspace_id_workspaces_id_fk": {+ "name": "user_installed_plugins_workspace_id_workspaces_id_fk",+ "tableFrom": "user_installed_plugins","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}},"compositePrimaryKeys": {- "chat_groups_agents_chat_group_id_agent_id_pk": {- "name": "chat_groups_agents_chat_group_id_agent_id_pk",- "columns": ["chat_group_id", "agent_id"]+ "user_installed_plugins_user_id_identifier_pk": {+ "name": "user_installed_plugins_user_id_identifier_pk",+ "columns": [+ "user_id",+ "identifier"+ ]}},"uniqueConstraints": {},@@ -13714,8 +17568,8 @@"checkConstraints": {},"isRLSEnabled": false},- "public.user_connector_tools": {- "name": "user_connector_tools",+ "public.user_contact_requests": {+ "name": "user_contact_requests","schema": "","columns": {"id": {@@ -13725,14 +17579,14 @@"notNull": true,"default": "gen_random_uuid()"},- "user_connector_id": {- "name": "user_connector_id",- "type": "uuid",+ "requester_id": {+ "name": "requester_id",+ "type": "text","primaryKey": false,"notNull": true},- "user_id": {- "name": "user_id",+ "addressee_id": {+ "name": "addressee_id","type": "text","primaryKey": false,"notNull": true@@ -13743,76 +17597,22 @@"primaryKey": false,"notNull": false},- "tool_name": {- "name": "tool_name",- "type": "varchar(255)",- "primaryKey": false,- "notNull": true- },- "display_name": {- "name": "display_name",- "type": "varchar(255)",- "primaryKey": false,- "notNull": false- },- "description": {- "name": "description",- "type": "text",- "primaryKey": false,- "notNull": false- },- "input_schema": {- "name": "input_schema",- "type": "jsonb",- "primaryKey": false,- "notNull": false- },- "output_schema": {- "name": "output_schema",- "type": "jsonb",- "primaryKey": false,- "notNull": false- },- "crud_type": {- "name": "crud_type",+ "message": {+ "name": "message","type": "text","primaryKey": false,- "notNull": true- },- "render_config": {- "name": "render_config",- "type": "jsonb",- "primaryKey": false,"notNull": false},- "permission": {- "name": "permission",+ "status": {+ "name": "status","type": "text","primaryKey": false,- "notNull": true- },- "is_work_artifact": {- "name": "is_work_artifact",- "type": "boolean",- "primaryKey": false,"notNull": true,- "default": false- },- "work_artifact_config": {- "name": "work_artifact_config",- "type": "jsonb",- "primaryKey": false,- "notNull": false- },- "limit_config": {- "name": "limit_config",- "type": "jsonb",- "primaryKey": false,- "notNull": false+ "default": "'pending'"},- "metadata": {- "name": "metadata",- "type": "jsonb",+ "responded_at": {+ "name": "responded_at",+ "type": "timestamp with time zone","primaryKey": false,"notNull": false},@@ -13839,32 +17639,67 @@}},"indexes": {- "user_connector_tools_connector_tool_unique": {- "name": "user_connector_tools_connector_tool_unique",+ "user_contact_requests_pending_unique": {+ "name": "user_contact_requests_pending_unique","columns": [{- "expression": "user_connector_id",+ "expression": "requester_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "tool_name",+ "expression": "addressee_id","isExpression": false,"asc": true,"nulls": "last"}],"isUnique": true,+ "where": "\"user_contact_requests\".\"status\" = 'pending' AND \"user_contact_requests\".\"workspace_id\" IS NULL","concurrently": false,"method": "btree","with": {}},- "user_connector_tools_user_id_idx": {- "name": "user_connector_tools_user_id_idx",+ "user_contact_requests_workspace_pending_unique": {+ "name": "user_contact_requests_workspace_pending_unique","columns": [{- "expression": "user_id",+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "requester_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "addressee_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"user_contact_requests\".\"status\" = 'pending' AND \"user_contact_requests\".\"workspace_id\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "user_contact_requests_addressee_status_idx": {+ "name": "user_contact_requests_addressee_status_idx",+ "columns": [+ {+ "expression": "addressee_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "status","isExpression": false,"asc": true,"nulls": "last"@@ -13875,11 +17710,17 @@"method": "btree","with": {}},- "user_connector_tools_connector_id_idx": {- "name": "user_connector_tools_connector_id_idx",+ "user_contact_requests_requester_status_idx": {+ "name": "user_contact_requests_requester_status_idx","columns": [{- "expression": "user_connector_id",+ "expression": "requester_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "status","isExpression": false,"asc": true,"nulls": "last"@@ -13890,8 +17731,8 @@"method": "btree","with": {}},- "user_connector_tools_workspace_id_idx": {- "name": "user_connector_tools_workspace_id_idx",+ "user_contact_requests_workspace_id_idx": {+ "name": "user_contact_requests_workspace_id_idx","columns": [{"expression": "workspace_id",@@ -13907,30 +17748,42 @@}},"foreignKeys": {- "user_connector_tools_user_connector_id_user_connectors_id_fk": {- "name": "user_connector_tools_user_connector_id_user_connectors_id_fk",- "tableFrom": "user_connector_tools",- "tableTo": "user_connectors",- "columnsFrom": ["user_connector_id"],- "columnsTo": ["id"],+ "user_contact_requests_requester_id_users_id_fk": {+ "name": "user_contact_requests_requester_id_users_id_fk",+ "tableFrom": "user_contact_requests",+ "tableTo": "users",+ "columnsFrom": [+ "requester_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "user_connector_tools_user_id_users_id_fk": {- "name": "user_connector_tools_user_id_users_id_fk",- "tableFrom": "user_connector_tools",+ "user_contact_requests_addressee_id_users_id_fk": {+ "name": "user_contact_requests_addressee_id_users_id_fk",+ "tableFrom": "user_contact_requests","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "addressee_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "user_connector_tools_workspace_id_workspaces_id_fk": {- "name": "user_connector_tools_workspace_id_workspaces_id_fk",- "tableFrom": "user_connector_tools",+ "user_contact_requests_workspace_id_workspaces_id_fk": {+ "name": "user_contact_requests_workspace_id_workspaces_id_fk",+ "tableFrom": "user_contact_requests","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -13938,11 +17791,16 @@"compositePrimaryKeys": {},"uniqueConstraints": {},"policies": {},- "checkConstraints": {},+ "checkConstraints": {+ "user_contact_requests_not_self_check": {+ "name": "user_contact_requests_not_self_check",+ "value": "\"user_contact_requests\".\"requester_id\" <> \"user_contact_requests\".\"addressee_id\""+ }+ },"isRLSEnabled": false},- "public.user_connectors": {- "name": "user_connectors",+ "public.user_contact_tag_assignments": {+ "name": "user_contact_tag_assignments","schema": "","columns": {"id": {@@ -13952,96 +17810,181 @@"notNull": true,"default": "gen_random_uuid()"},- "user_id": {- "name": "user_id",- "type": "text",+ "tag_id": {+ "name": "tag_id",+ "type": "uuid","primaryKey": false,"notNull": true},- "workspace_id": {- "name": "workspace_id",- "type": "text",+ "contact_id": {+ "name": "contact_id",+ "type": "uuid","primaryKey": false,- "notNull": false+ "notNull": true},- "agent_id": {- "name": "agent_id",+ "user_id": {+ "name": "user_id","type": "text","primaryKey": false,- "notNull": false- },- "identifier": {- "name": "identifier",- "type": "varchar(255)",- "primaryKey": false,"notNull": true},- "name": {- "name": "name",- "type": "varchar(255)",+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "now()"},- "source_type": {- "name": "source_type",- "type": "text",+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": true+ "notNull": true,+ "default": "now()"},- "mcp_server_url": {- "name": "mcp_server_url",- "type": "text",+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "user_contact_tag_assignments_tag_id_contact_id_unique": {+ "name": "user_contact_tag_assignments_tag_id_contact_id_unique",+ "columns": [+ {+ "expression": "tag_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "contact_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "concurrently": false,+ "method": "btree",+ "with": {}},- "mcp_connection_type": {- "name": "mcp_connection_type",- "type": "text",- "primaryKey": false,- "notNull": false+ "user_contact_tag_assignments_contact_id_idx": {+ "name": "user_contact_tag_assignments_contact_id_idx",+ "columns": [+ {+ "expression": "contact_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}},- "mcp_stdio_config": {- "name": "mcp_stdio_config",- "type": "jsonb",- "primaryKey": false,- "notNull": false+ "user_contact_tag_assignments_user_id_idx": {+ "name": "user_contact_tag_assignments_user_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "user_contact_tag_assignments_tag_id_user_contact_tags_id_fk": {+ "name": "user_contact_tag_assignments_tag_id_user_contact_tags_id_fk",+ "tableFrom": "user_contact_tag_assignments",+ "tableTo": "user_contact_tags",+ "columnsFrom": [+ "tag_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"},- "status": {- "name": "status",- "type": "text",- "primaryKey": false,- "notNull": true+ "user_contact_tag_assignments_contact_id_user_contacts_id_fk": {+ "name": "user_contact_tag_assignments_contact_id_user_contacts_id_fk",+ "tableFrom": "user_contact_tag_assignments",+ "tableTo": "user_contacts",+ "columnsFrom": [+ "contact_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"},- "is_enabled": {- "name": "is_enabled",- "type": "boolean",- "primaryKey": false,+ "user_contact_tag_assignments_user_id_users_id_fk": {+ "name": "user_contact_tag_assignments_user_id_users_id_fk",+ "tableFrom": "user_contact_tag_assignments",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.user_contact_tags": {+ "name": "user_contact_tags",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,"notNull": true,- "default": true+ "default": "gen_random_uuid()"},- "oidc_config": {- "name": "oidc_config",- "type": "jsonb",+ "user_id": {+ "name": "user_id",+ "type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "credentials": {- "name": "credentials",+ "name": {+ "name": "name","type": "text","primaryKey": false,- "notNull": false+ "notNull": true},- "token_expires_at": {- "name": "token_expires_at",- "type": "timestamp with time zone",+ "color": {+ "name": "color",+ "type": "text","primaryKey": false,"notNull": false},- "metadata": {- "name": "metadata",- "type": "jsonb",+ "sort_order": {+ "name": "sort_order",+ "type": "integer","primaryKey": false,- "notNull": false+ "notNull": true,+ "default": 0},"accessed_at": {"name": "accessed_at",@@ -14066,8 +18009,8 @@}},"indexes": {- "user_connectors_personal_identifier_idx": {- "name": "user_connectors_personal_identifier_idx",+ "user_contact_tags_user_id_name_unique": {+ "name": "user_contact_tags_user_id_name_unique","columns": [{"expression": "user_id",@@ -14076,20 +18019,129 @@"nulls": "last"},{- "expression": "identifier",+ "expression": "name","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,- "where": "\"user_connectors\".\"workspace_id\" IS NULL AND \"user_connectors\".\"agent_id\" IS NULL",+ "isUnique": true,"concurrently": false,"method": "btree","with": {}+ }+ },+ "foreignKeys": {+ "user_contact_tags_user_id_users_id_fk": {+ "name": "user_contact_tags_user_id_users_id_fk",+ "tableFrom": "user_contact_tags",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.user_contacts": {+ "name": "user_contacts",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"},- "user_connectors_workspace_identifier_idx": {- "name": "user_connectors_workspace_identifier_idx",+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "type": {+ "name": "type",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "contact_user_id": {+ "name": "contact_user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "agent_id": {+ "name": "agent_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "remark": {+ "name": "remark",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "phones": {+ "name": "phones",+ "type": "text[]",+ "primaryKey": false,+ "notNull": false+ },+ "metadata": {+ "name": "metadata",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": false+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "user_contacts_user_unique": {+ "name": "user_contacts_user_unique","columns": [{"expression": "user_id",@@ -14098,81 +18150,95 @@"nulls": "last"},{- "expression": "workspace_id",- "isExpression": false,- "asc": true,- "nulls": "last"- },- {- "expression": "identifier",+ "expression": "contact_user_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,- "where": "\"user_connectors\".\"workspace_id\" IS NOT NULL AND \"user_connectors\".\"agent_id\" IS NULL",+ "isUnique": true,+ "where": "\"user_contacts\".\"contact_user_id\" IS NOT NULL AND \"user_contacts\".\"workspace_id\" IS NULL","concurrently": false,"method": "btree","with": {}},- "user_connectors_agent_identifier_idx": {- "name": "user_connectors_agent_identifier_idx",+ "user_contacts_workspace_user_unique": {+ "name": "user_contacts_workspace_user_unique","columns": [{- "expression": "agent_id",+ "expression": "workspace_id","isExpression": false,"asc": true,"nulls": "last"},{- "expression": "identifier",+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "contact_user_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,- "where": "\"user_connectors\".\"agent_id\" IS NOT NULL",+ "isUnique": true,+ "where": "\"user_contacts\".\"contact_user_id\" IS NOT NULL AND \"user_contacts\".\"workspace_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "user_connectors_user_id_idx": {- "name": "user_connectors_user_id_idx",+ "user_contacts_agent_unique": {+ "name": "user_contacts_agent_unique","columns": [{"expression": "user_id","isExpression": false,"asc": true,"nulls": "last"+ },+ {+ "expression": "agent_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"}],- "isUnique": false,+ "isUnique": true,+ "where": "\"user_contacts\".\"agent_id\" IS NOT NULL AND \"user_contacts\".\"workspace_id\" IS NULL","concurrently": false,"method": "btree","with": {}},- "user_connectors_token_expires_at_idx": {- "name": "user_connectors_token_expires_at_idx",+ "user_contacts_workspace_agent_unique": {+ "name": "user_contacts_workspace_agent_unique","columns": [{- "expression": "token_expires_at",+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "agent_id","isExpression": false,"asc": true,"nulls": "last"}],- "isUnique": false,+ "isUnique": true,+ "where": "\"user_contacts\".\"agent_id\" IS NOT NULL AND \"user_contacts\".\"workspace_id\" IS NOT NULL","concurrently": false,"method": "btree","with": {}},- "user_connectors_workspace_id_idx": {- "name": "user_connectors_workspace_id_idx",+ "user_contacts_contact_user_id_idx": {+ "name": "user_contacts_contact_user_id_idx","columns": [{- "expression": "workspace_id",+ "expression": "contact_user_id","isExpression": false,"asc": true,"nulls": "last"@@ -14183,8 +18249,8 @@"method": "btree","with": {}},- "user_connectors_agent_id_idx": {- "name": "user_connectors_agent_id_idx",+ "user_contacts_agent_id_idx": {+ "name": "user_contacts_agent_id_idx","columns": [{"expression": "agent_id",@@ -14197,120 +18263,9 @@"concurrently": false,"method": "btree","with": {}- }- },- "foreignKeys": {- "user_connectors_user_id_users_id_fk": {- "name": "user_connectors_user_id_users_id_fk",- "tableFrom": "user_connectors",- "tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- },- "user_connectors_workspace_id_workspaces_id_fk": {- "name": "user_connectors_workspace_id_workspaces_id_fk",- "tableFrom": "user_connectors",- "tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- },- "user_connectors_agent_id_agents_id_fk": {- "name": "user_connectors_agent_id_agents_id_fk",- "tableFrom": "user_connectors",- "tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],- "onDelete": "cascade",- "onUpdate": "no action"- }- },- "compositePrimaryKeys": {},- "uniqueConstraints": {},- "policies": {},- "checkConstraints": {},- "isRLSEnabled": false- },- "public.user_installed_plugins": {- "name": "user_installed_plugins",- "schema": "",- "columns": {- "user_id": {- "name": "user_id",- "type": "text",- "primaryKey": false,- "notNull": true- },- "workspace_id": {- "name": "workspace_id",- "type": "text",- "primaryKey": false,- "notNull": false- },- "identifier": {- "name": "identifier",- "type": "text",- "primaryKey": false,- "notNull": true- },- "type": {- "name": "type",- "type": "text",- "primaryKey": false,- "notNull": true- },- "manifest": {- "name": "manifest",- "type": "jsonb",- "primaryKey": false,- "notNull": false- },- "settings": {- "name": "settings",- "type": "jsonb",- "primaryKey": false,- "notNull": false},- "custom_params": {- "name": "custom_params",- "type": "jsonb",- "primaryKey": false,- "notNull": false- },- "source": {- "name": "source",- "type": "varchar(255)",- "primaryKey": false,- "notNull": false- },- "accessed_at": {- "name": "accessed_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": true,- "default": "now()"- },- "created_at": {- "name": "created_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": true,- "default": "now()"- },- "updated_at": {- "name": "updated_at",- "type": "timestamp with time zone",- "primaryKey": false,- "notNull": true,- "default": "now()"- }- },- "indexes": {- "user_installed_plugins_workspace_id_idx": {- "name": "user_installed_plugins_workspace_id_idx",+ "user_contacts_workspace_id_idx": {+ "name": "user_contacts_workspace_id_idx","columns": [{"expression": "workspace_id",@@ -14326,31 +18281,60 @@}},"foreignKeys": {- "user_installed_plugins_user_id_users_id_fk": {- "name": "user_installed_plugins_user_id_users_id_fk",- "tableFrom": "user_installed_plugins",+ "user_contacts_user_id_users_id_fk": {+ "name": "user_contacts_user_id_users_id_fk",+ "tableFrom": "user_contacts","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},- "user_installed_plugins_workspace_id_workspaces_id_fk": {- "name": "user_installed_plugins_workspace_id_workspaces_id_fk",- "tableFrom": "user_installed_plugins",+ "user_contacts_workspace_id_workspaces_id_fk": {+ "name": "user_contacts_workspace_id_workspaces_id_fk",+ "tableFrom": "user_contacts","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "user_contacts_contact_user_id_users_id_fk": {+ "name": "user_contacts_contact_user_id_users_id_fk",+ "tableFrom": "user_contacts",+ "tableTo": "users",+ "columnsFrom": [+ "contact_user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "user_contacts_agent_id_agents_id_fk": {+ "name": "user_contacts_agent_id_agents_id_fk",+ "tableFrom": "user_contacts",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}},- "compositePrimaryKeys": {- "user_installed_plugins_user_id_identifier_pk": {- "name": "user_installed_plugins_user_id_identifier_pk",- "columns": ["user_id", "identifier"]- }- },+ "compositePrimaryKeys": {},"uniqueConstraints": {},"policies": {},"checkConstraints": {},@@ -14520,8 +18504,12 @@"name": "dashboard_items_dashboard_id_dashboards_id_fk","tableFrom": "dashboard_items","tableTo": "dashboards",- "columnsFrom": ["dashboard_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dashboard_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -14529,8 +18517,12 @@"name": "dashboard_items_widget_id_widgets_id_fk","tableFrom": "dashboard_items","tableTo": "widgets",- "columnsFrom": ["widget_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "widget_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -14538,8 +18530,12 @@"name": "dashboard_items_user_id_users_id_fk","tableFrom": "dashboard_items","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -14547,8 +18543,12 @@"name": "dashboard_items_workspace_id_workspaces_id_fk","tableFrom": "dashboard_items","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -14791,8 +18791,12 @@"name": "dashboards_user_id_users_id_fk","tableFrom": "dashboards","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -14800,8 +18804,12 @@"name": "dashboards_workspace_id_workspaces_id_fk","tableFrom": "dashboards","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -14809,8 +18817,12 @@"name": "dashboards_project_id_projects_id_fk","tableFrom": "dashboards","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -14818,8 +18830,12 @@"name": "dashboards_agent_id_agents_id_fk","tableFrom": "dashboards","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15072,8 +19088,12 @@"name": "devices_user_id_users_id_fk","tableFrom": "devices","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15081,8 +19101,12 @@"name": "devices_workspace_id_workspaces_id_fk","tableFrom": "devices","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15194,8 +19218,12 @@"name": "document_comment_mentions_comment_id_document_comments_id_fk","tableFrom": "document_comment_mentions","tableTo": "document_comments",- "columnsFrom": ["comment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "comment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15203,8 +19231,12 @@"name": "document_comment_mentions_mentioned_user_id_users_id_fk","tableFrom": "document_comment_mentions","tableTo": "users",- "columnsFrom": ["mentioned_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "mentioned_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15212,8 +19244,12 @@"name": "document_comment_mentions_workspace_id_workspaces_id_fk","tableFrom": "document_comment_mentions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15443,8 +19479,12 @@"name": "document_comments_document_id_documents_id_fk","tableFrom": "document_comments","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15452,8 +19492,12 @@"name": "document_comments_parent_comment_id_document_comments_id_fk","tableFrom": "document_comments","tableTo": "document_comments",- "columnsFrom": ["parent_comment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_comment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"},@@ -15461,8 +19505,12 @@"name": "document_comments_reply_to_comment_id_document_comments_id_fk","tableFrom": "document_comments","tableTo": "document_comments",- "columnsFrom": ["reply_to_comment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "reply_to_comment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -15470,8 +19518,12 @@"name": "document_comments_author_user_id_users_id_fk","tableFrom": "document_comments","tableTo": "users",- "columnsFrom": ["author_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "author_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -15479,8 +19531,12 @@"name": "document_comments_workspace_id_workspaces_id_fk","tableFrom": "document_comments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15628,8 +19684,12 @@"name": "document_histories_document_id_documents_id_fk","tableFrom": "document_histories","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15637,8 +19697,12 @@"name": "document_histories_user_id_users_id_fk","tableFrom": "document_histories","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15646,8 +19710,12 @@"name": "document_histories_workspace_id_workspaces_id_fk","tableFrom": "document_histories","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15774,8 +19842,12 @@"name": "document_likes_document_id_documents_id_fk","tableFrom": "document_likes","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15783,8 +19855,12 @@"name": "document_likes_user_id_users_id_fk","tableFrom": "document_likes","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15792,8 +19868,12 @@"name": "document_likes_workspace_id_workspaces_id_fk","tableFrom": "document_likes","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15928,8 +20008,12 @@"name": "document_shares_document_id_documents_id_fk","tableFrom": "document_shares","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15937,8 +20021,12 @@"name": "document_shares_user_id_users_id_fk","tableFrom": "document_shares","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -15946,8 +20034,12 @@"name": "document_shares_workspace_id_workspaces_id_fk","tableFrom": "document_shares","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -15981,6 +20073,12 @@"primaryKey": false,"notNull": false},+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },"name": {"name": "name","type": "varchar(255)",@@ -16066,6 +20164,22 @@"method": "btree","with": {}},+ "environments_project_id_unique": {+ "name": "environments_project_id_unique",+ "columns": [+ {+ "expression": "project_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"environments\".\"project_id\" is not null",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },"environments_workspace_visibility_idx": {"name": "environments_workspace_visibility_idx","columns": [@@ -16110,7 +20224,7 @@}],"isUnique": true,- "where": "\"environments\".\"workspace_id\" is null",+ "where": "\"environments\".\"workspace_id\" IS NULL AND \"environments\".\"project_id\" IS NULL","concurrently": false,"method": "btree","with": {}@@ -16138,7 +20252,7 @@}],"isUnique": true,- "where": "\"environments\".\"workspace_id\" is not null",+ "where": "\"environments\".\"workspace_id\" IS NOT NULL AND \"environments\".\"project_id\" IS NULL","concurrently": false,"method": "btree","with": {}@@ -16149,8 +20263,12 @@"name": "environments_user_id_users_id_fk","tableFrom": "environments","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "restrict","onUpdate": "no action"},@@ -16158,8 +20276,25 @@"name": "environments_workspace_id_workspaces_id_fk","tableFrom": "environments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "restrict",+ "onUpdate": "no action"+ },+ "environments_project_id_projects_id_fk": {+ "name": "environments_project_id_projects_id_fk",+ "tableFrom": "environments",+ "tableTo": "projects",+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "restrict","onUpdate": "no action"}@@ -16403,8 +20538,12 @@"name": "environment_instances_environment_id_environments_id_fk","tableFrom": "environment_instances","tableTo": "environments",- "columnsFrom": ["environment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "environment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "restrict","onUpdate": "no action"},@@ -16412,8 +20551,12 @@"name": "environment_instances_device_id_devices_id_fk","tableFrom": "environment_instances","tableTo": "devices",- "columnsFrom": ["device_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "device_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "restrict","onUpdate": "no action"}@@ -16666,8 +20809,12 @@"name": "expertise_bindings_domain_id_expertise_domains_id_fk","tableFrom": "expertise_bindings","tableTo": "expertise_domains",- "columnsFrom": ["domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -16675,8 +20822,12 @@"name": "expertise_bindings_agent_id_agents_id_fk","tableFrom": "expertise_bindings","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -16684,8 +20835,12 @@"name": "expertise_bindings_project_id_projects_id_fk","tableFrom": "expertise_bindings","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -16693,8 +20848,12 @@"name": "expertise_bindings_bound_workspace_id_workspaces_id_fk","tableFrom": "expertise_bindings","tableTo": "workspaces",- "columnsFrom": ["bound_workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "bound_workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -16702,8 +20861,12 @@"name": "expertise_bindings_bound_user_id_users_id_fk","tableFrom": "expertise_bindings","tableTo": "users",- "columnsFrom": ["bound_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "bound_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -16711,8 +20874,12 @@"name": "expertise_bindings_added_by_user_id_users_id_fk","tableFrom": "expertise_bindings","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -16720,8 +20887,12 @@"name": "expertise_bindings_workspace_id_workspaces_id_fk","tableFrom": "expertise_bindings","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -16951,8 +21122,12 @@"name": "expertise_domain_snapshots_domain_id_expertise_domains_id_fk","tableFrom": "expertise_domain_snapshots","tableTo": "expertise_domains",- "columnsFrom": ["domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -16960,8 +21135,12 @@"name": "expertise_domain_snapshots_run_id_expertise_runs_id_fk","tableFrom": "expertise_domain_snapshots","tableTo": "expertise_runs",- "columnsFrom": ["run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -16969,8 +21148,14 @@"name": "expertise_domain_snapshots_run_domain_fk","tableFrom": "expertise_domain_snapshots","tableTo": "expertise_runs",- "columnsFrom": ["run_id", "domain_id"],- "columnsTo": ["id", "domain_id"],+ "columnsFrom": [+ "run_id",+ "domain_id"+ ],+ "columnsTo": [+ "id",+ "domain_id"+ ],"onDelete": "no action","onUpdate": "no action"}@@ -17255,8 +21440,12 @@"name": "expertise_domains_user_id_users_id_fk","tableFrom": "expertise_domains","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17264,8 +21453,12 @@"name": "expertise_domains_workspace_id_workspaces_id_fk","tableFrom": "expertise_domains","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17273,8 +21466,12 @@"name": "expertise_domains_parent_domain_id_expertise_domains_id_fk","tableFrom": "expertise_domains","tableTo": "expertise_domains",- "columnsFrom": ["parent_domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17282,8 +21479,12 @@"name": "expertise_domains_canon_document_id_documents_id_fk","tableFrom": "expertise_domains","tableTo": "documents",- "columnsFrom": ["canon_document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "canon_document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17291,8 +21492,12 @@"name": "expertise_domains_lesson_base_document_id_documents_id_fk","tableFrom": "expertise_domains","tableTo": "documents",- "columnsFrom": ["lesson_base_document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "lesson_base_document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17300,8 +21505,12 @@"name": "expertise_domains_anchor_chosen_by_user_id_users_id_fk","tableFrom": "expertise_domains","tableTo": "users",- "columnsFrom": ["anchor_chosen_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "anchor_chosen_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -17510,8 +21719,12 @@"name": "expertise_hits_domain_id_expertise_domains_id_fk","tableFrom": "expertise_hits","tableTo": "expertise_domains",- "columnsFrom": ["domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17519,8 +21732,12 @@"name": "expertise_hits_evidence_id_verify_evidence_id_fk","tableFrom": "expertise_hits","tableTo": "verify_evidence",- "columnsFrom": ["evidence_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "evidence_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17528,8 +21745,12 @@"name": "expertise_hits_operation_id_agent_operations_id_fk","tableFrom": "expertise_hits","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17537,8 +21758,12 @@"name": "expertise_hits_source_check_result_id_verify_check_results_id_fk","tableFrom": "expertise_hits","tableTo": "verify_check_results",- "columnsFrom": ["source_check_result_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_check_result_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17546,8 +21771,12 @@"name": "expertise_hits_source_message_id_messages_id_fk","tableFrom": "expertise_hits","tableTo": "messages",- "columnsFrom": ["source_message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17555,8 +21784,14 @@"name": "expertise_hits_run_domain_fk","tableFrom": "expertise_hits","tableTo": "expertise_runs",- "columnsFrom": ["run_id", "domain_id"],- "columnsTo": ["id", "domain_id"],+ "columnsFrom": [+ "run_id",+ "domain_id"+ ],+ "columnsTo": [+ "id",+ "domain_id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17564,8 +21799,14 @@"name": "expertise_hits_lesson_domain_fk","tableFrom": "expertise_hits","tableTo": "expertise_lessons",- "columnsFrom": ["lesson_id", "domain_id"],- "columnsTo": ["id", "domain_id"],+ "columnsFrom": [+ "lesson_id",+ "domain_id"+ ],+ "columnsTo": [+ "id",+ "domain_id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -17752,8 +21993,12 @@"name": "expertise_insights_domain_id_expertise_domains_id_fk","tableFrom": "expertise_insights","tableTo": "expertise_domains",- "columnsFrom": ["domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17761,8 +22006,12 @@"name": "expertise_insights_user_id_users_id_fk","tableFrom": "expertise_insights","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17770,8 +22019,12 @@"name": "expertise_insights_workspace_id_workspaces_id_fk","tableFrom": "expertise_insights","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17779,8 +22032,12 @@"name": "expertise_insights_generated_by_operation_id_agent_operations_id_fk","tableFrom": "expertise_insights","tableTo": "agent_operations",- "columnsFrom": ["generated_by_operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "generated_by_operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -17920,8 +22177,12 @@"name": "expertise_lesson_revisions_lesson_id_expertise_lessons_id_fk","tableFrom": "expertise_lesson_revisions","tableTo": "expertise_lessons",- "columnsFrom": ["lesson_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "lesson_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -17929,8 +22190,12 @@"name": "expertise_lesson_revisions_changed_by_user_id_users_id_fk","tableFrom": "expertise_lesson_revisions","tableTo": "users",- "columnsFrom": ["changed_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "changed_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -17938,8 +22203,12 @@"name": "expertise_lesson_revisions_operation_id_agent_operations_id_fk","tableFrom": "expertise_lesson_revisions","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -18273,8 +22542,12 @@"name": "expertise_lessons_domain_id_expertise_domains_id_fk","tableFrom": "expertise_lessons","tableTo": "expertise_domains",- "columnsFrom": ["domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -18282,8 +22555,12 @@"name": "expertise_lessons_created_by_user_id_users_id_fk","tableFrom": "expertise_lessons","tableTo": "users",- "columnsFrom": ["created_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -18291,8 +22568,12 @@"name": "expertise_lessons_salvaged_from_id_expertise_lessons_id_fk","tableFrom": "expertise_lessons","tableTo": "expertise_lessons",- "columnsFrom": ["salvaged_from_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "salvaged_from_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -18300,8 +22581,12 @@"name": "expertise_lessons_compiled_criterion_id_verify_criteria_id_fk","tableFrom": "expertise_lessons","tableTo": "verify_criteria",- "columnsFrom": ["compiled_criterion_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "compiled_criterion_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -18311,7 +22596,10 @@"expertise_lessons_id_domain_unique": {"name": "expertise_lessons_id_domain_unique","nullsNotDistinct": false,- "columns": ["id", "domain_id"]+ "columns": [+ "id",+ "domain_id"+ ]}},"policies": {},@@ -18578,8 +22866,12 @@"name": "expertise_runs_domain_id_expertise_domains_id_fk","tableFrom": "expertise_runs","tableTo": "expertise_domains",- "columnsFrom": ["domain_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "domain_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -18587,8 +22879,12 @@"name": "expertise_runs_user_id_users_id_fk","tableFrom": "expertise_runs","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -18596,8 +22892,12 @@"name": "expertise_runs_workspace_id_workspaces_id_fk","tableFrom": "expertise_runs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -18607,7 +22907,10 @@"expertise_runs_id_domain_unique": {"name": "expertise_runs_id_domain_unique","nullsNotDistinct": false,- "columns": ["id", "domain_id"]+ "columns": [+ "id",+ "domain_id"+ ]}},"policies": {},@@ -18795,8 +23098,12 @@"name": "user_favorites_user_id_users_id_fk","tableFrom": "user_favorites","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -18804,8 +23111,12 @@"name": "user_favorites_workspace_id_workspaces_id_fk","tableFrom": "user_favorites","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -19206,8 +23517,12 @@"name": "documents_file_id_files_id_fk","tableFrom": "documents","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -19215,8 +23530,12 @@"name": "documents_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "documents","tableTo": "knowledge_bases",- "columnsFrom": ["knowledge_base_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "knowledge_base_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -19224,8 +23543,12 @@"name": "documents_parent_id_documents_id_fk","tableFrom": "documents","tableTo": "documents",- "columnsFrom": ["parent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -19233,8 +23556,12 @@"name": "documents_user_id_users_id_fk","tableFrom": "documents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -19242,8 +23569,12 @@"name": "documents_workspace_id_workspaces_id_fk","tableFrom": "documents","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -19460,8 +23791,12 @@"name": "file_uploads_user_id_users_id_fk","tableFrom": "file_uploads","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -19469,8 +23804,12 @@"name": "file_uploads_workspace_id_workspaces_id_fk","tableFrom": "file_uploads","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -19478,8 +23817,12 @@"name": "file_uploads_file_id_files_id_fk","tableFrom": "file_uploads","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -19764,8 +24107,12 @@"name": "files_user_id_users_id_fk","tableFrom": "files","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -19773,8 +24120,12 @@"name": "files_file_hash_global_files_hash_id_fk","tableFrom": "files","tableTo": "global_files",- "columnsFrom": ["file_hash"],- "columnsTo": ["hash_id"],+ "columnsFrom": [+ "file_hash"+ ],+ "columnsTo": [+ "hash_id"+ ],"onDelete": "no action","onUpdate": "no action"},@@ -19782,8 +24133,12 @@"name": "files_parent_id_documents_id_fk","tableFrom": "files","tableTo": "documents",- "columnsFrom": ["parent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -19791,8 +24146,12 @@"name": "files_chunk_task_id_async_tasks_id_fk","tableFrom": "files","tableTo": "async_tasks",- "columnsFrom": ["chunk_task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chunk_task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -19800,8 +24159,12 @@"name": "files_embedding_task_id_async_tasks_id_fk","tableFrom": "files","tableTo": "async_tasks",- "columnsFrom": ["embedding_task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "embedding_task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -19809,8 +24172,12 @@"name": "files_workspace_id_workspaces_id_fk","tableFrom": "files","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -19898,8 +24265,12 @@"name": "global_files_creator_users_id_fk","tableFrom": "global_files","tableTo": "users",- "columnsFrom": ["creator"],- "columnsTo": ["id"],+ "columnsFrom": [+ "creator"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -20013,8 +24384,12 @@"name": "knowledge_base_files_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "knowledge_base_files","tableTo": "knowledge_bases",- "columnsFrom": ["knowledge_base_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "knowledge_base_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20022,8 +24397,12 @@"name": "knowledge_base_files_file_id_files_id_fk","tableFrom": "knowledge_base_files","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20031,8 +24410,12 @@"name": "knowledge_base_files_user_id_users_id_fk","tableFrom": "knowledge_base_files","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20040,8 +24423,12 @@"name": "knowledge_base_files_workspace_id_workspaces_id_fk","tableFrom": "knowledge_base_files","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -20049,7 +24436,10 @@"compositePrimaryKeys": {"knowledge_base_files_knowledge_base_id_file_id_pk": {"name": "knowledge_base_files_knowledge_base_id_file_id_pk",- "columns": ["knowledge_base_id", "file_id"]+ "columns": [+ "knowledge_base_id",+ "file_id"+ ]}},"uniqueConstraints": {},@@ -20248,8 +24638,12 @@"name": "knowledge_bases_user_id_users_id_fk","tableFrom": "knowledge_bases","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20257,8 +24651,12 @@"name": "knowledge_bases_workspace_id_workspaces_id_fk","tableFrom": "knowledge_bases","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -20397,8 +24795,12 @@"name": "file_shares_file_id_files_id_fk","tableFrom": "file_shares","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20406,8 +24808,12 @@"name": "file_shares_user_id_users_id_fk","tableFrom": "file_shares","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20415,8 +24821,12 @@"name": "file_shares_workspace_id_workspaces_id_fk","tableFrom": "file_shares","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -20782,8 +25192,12 @@"name": "generation_batches_user_id_users_id_fk","tableFrom": "generation_batches","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20791,8 +25205,12 @@"name": "generation_batches_workspace_id_workspaces_id_fk","tableFrom": "generation_batches","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20800,8 +25218,12 @@"name": "generation_batches_generation_topic_id_generation_topics_id_fk","tableFrom": "generation_batches","tableTo": "generation_topics",- "columnsFrom": ["generation_topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "generation_topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -20958,8 +25380,12 @@"name": "generation_topics_user_id_users_id_fk","tableFrom": "generation_topics","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -20967,8 +25393,12 @@"name": "generation_topics_workspace_id_workspaces_id_fk","tableFrom": "generation_topics","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -21132,8 +25562,12 @@"name": "generations_user_id_users_id_fk","tableFrom": "generations","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21141,8 +25575,12 @@"name": "generations_workspace_id_workspaces_id_fk","tableFrom": "generations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21150,8 +25588,12 @@"name": "generations_generation_batch_id_generation_batches_id_fk","tableFrom": "generations","tableTo": "generation_batches",- "columnsFrom": ["generation_batch_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "generation_batch_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21159,8 +25601,12 @@"name": "generations_async_task_id_async_tasks_id_fk","tableFrom": "generations","tableTo": "async_tasks",- "columnsFrom": ["async_task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "async_task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -21168,8 +25614,12 @@"name": "generations_file_id_files_id_fk","tableFrom": "generations","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -21445,8 +25895,12 @@"name": "goals_user_id_users_id_fk","tableFrom": "goals","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21454,8 +25908,12 @@"name": "goals_workspace_id_workspaces_id_fk","tableFrom": "goals","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21463,8 +25921,12 @@"name": "goals_agent_id_agents_id_fk","tableFrom": "goals","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -21472,8 +25934,12 @@"name": "goals_project_id_projects_id_fk","tableFrom": "goals","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -21591,8 +26057,12 @@"name": "goal_edges_goal_id_goals_id_fk","tableFrom": "goal_edges","tableTo": "goals",- "columnsFrom": ["goal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "goal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21600,8 +26070,14 @@"name": "goal_edges_goal_source_node_fk","tableFrom": "goal_edges","tableTo": "goal_nodes",- "columnsFrom": ["goal_id", "source_node_id"],- "columnsTo": ["goal_id", "id"],+ "columnsFrom": [+ "goal_id",+ "source_node_id"+ ],+ "columnsTo": [+ "goal_id",+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21609,8 +26085,14 @@"name": "goal_edges_goal_target_node_fk","tableFrom": "goal_edges","tableTo": "goal_nodes",- "columnsFrom": ["goal_id", "target_node_id"],- "columnsTo": ["goal_id", "id"],+ "columnsFrom": [+ "goal_id",+ "target_node_id"+ ],+ "columnsTo": [+ "goal_id",+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -21778,8 +26260,12 @@"name": "goal_events_goal_id_goals_id_fk","tableFrom": "goal_events","tableTo": "goals",- "columnsFrom": ["goal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "goal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21787,8 +26273,12 @@"name": "goal_events_task_id_tasks_id_fk","tableFrom": "goal_events","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -21990,8 +26480,12 @@"name": "goal_node_decisions_node_id_goal_nodes_id_fk","tableFrom": "goal_node_decisions","tableTo": "goal_nodes",- "columnsFrom": ["node_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "node_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -21999,8 +26493,12 @@"name": "goal_node_decisions_requested_user_id_users_id_fk","tableFrom": "goal_node_decisions","tableTo": "users",- "columnsFrom": ["requested_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "requested_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -22008,8 +26506,12 @@"name": "goal_node_decisions_resolved_by_user_id_users_id_fk","tableFrom": "goal_node_decisions","tableTo": "users",- "columnsFrom": ["resolved_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "resolved_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -22017,8 +26519,12 @@"name": "goal_node_decisions_resolved_by_agent_id_agents_id_fk","tableFrom": "goal_node_decisions","tableTo": "agents",- "columnsFrom": ["resolved_by_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "resolved_by_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -22115,8 +26621,12 @@"name": "goal_node_work_versions_node_id_goal_nodes_id_fk","tableFrom": "goal_node_work_versions","tableTo": "goal_nodes",- "columnsFrom": ["node_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "node_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22124,8 +26634,12 @@"name": "goal_node_work_versions_work_version_id_work_versions_id_fk","tableFrom": "goal_node_work_versions","tableTo": "work_versions",- "columnsFrom": ["work_version_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "work_version_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -22317,8 +26831,12 @@"name": "goal_nodes_goal_id_goals_id_fk","tableFrom": "goal_nodes","tableTo": "goals",- "columnsFrom": ["goal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "goal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22326,8 +26844,12 @@"name": "goal_nodes_task_id_tasks_id_fk","tableFrom": "goal_nodes","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -22335,8 +26857,12 @@"name": "goal_nodes_created_by_user_id_users_id_fk","tableFrom": "goal_nodes","tableTo": "users",- "columnsFrom": ["created_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -22344,8 +26870,12 @@"name": "goal_nodes_created_by_agent_id_agents_id_fk","tableFrom": "goal_nodes","tableTo": "agents",- "columnsFrom": ["created_by_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -22355,7 +26885,10 @@"goal_nodes_goal_id_id_unique": {"name": "goal_nodes_goal_id_id_unique","nullsNotDistinct": false,- "columns": ["goal_id", "id"]+ "columns": [+ "goal_id",+ "id"+ ]}},"policies": {},@@ -22495,8 +27028,12 @@"name": "goal_shares_goal_id_goals_id_fk","tableFrom": "goal_shares","tableTo": "goals",- "columnsFrom": ["goal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "goal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22504,8 +27041,12 @@"name": "goal_shares_user_id_users_id_fk","tableFrom": "goal_shares","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22513,8 +27054,12 @@"name": "goal_shares_workspace_id_workspaces_id_fk","tableFrom": "goal_shares","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -22813,8 +27358,12 @@"name": "goal_subscriptions_goal_id_goals_id_fk","tableFrom": "goal_subscriptions","tableTo": "goals",- "columnsFrom": ["goal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "goal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22822,8 +27371,12 @@"name": "goal_subscriptions_widget_id_widgets_id_fk","tableFrom": "goal_subscriptions","tableTo": "widgets",- "columnsFrom": ["widget_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "widget_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22831,8 +27384,12 @@"name": "goal_subscriptions_metric_id_metrics_id_fk","tableFrom": "goal_subscriptions","tableTo": "metrics",- "columnsFrom": ["metric_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "metric_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22840,8 +27397,12 @@"name": "goal_subscriptions_user_id_users_id_fk","tableFrom": "goal_subscriptions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22849,8 +27410,12 @@"name": "goal_subscriptions_workspace_id_workspaces_id_fk","tableFrom": "goal_subscriptions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -22858,8 +27423,12 @@"name": "goal_subscriptions_confirmed_version_id_widget_versions_id_fk","tableFrom": "goal_subscriptions","tableTo": "widget_versions",- "columnsFrom": ["confirmed_version_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "confirmed_version_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -23045,8 +27614,364 @@"name": "goal_traces_goal_id_goals_id_fk","tableFrom": "goal_traces","tableTo": "goals",- "columnsFrom": ["goal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "goal_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "policies": {},+ "checkConstraints": {},+ "isRLSEnabled": false+ },+ "public.inbound_webhooks": {+ "name": "inbound_webhooks",+ "schema": "",+ "columns": {+ "id": {+ "name": "id",+ "type": "uuid",+ "primaryKey": true,+ "notNull": true,+ "default": "gen_random_uuid()"+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "kind": {+ "name": "kind",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "default": "'pending'"+ },+ "agent_id": {+ "name": "agent_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true+ },+ "topic_id": {+ "name": "topic_id",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "instructions": {+ "name": "instructions",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "secret": {+ "name": "secret",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "verification": {+ "name": "verification",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": true+ },+ "config": {+ "name": "config",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": true+ },+ "state": {+ "name": "state",+ "type": "jsonb",+ "primaryKey": false,+ "notNull": true,+ "default": "'{}'::jsonb"+ },+ "connector_id": {+ "name": "connector_id",+ "type": "uuid",+ "primaryKey": false,+ "notNull": false+ },+ "dedupe_key": {+ "name": "dedupe_key",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "next_maintenance_at": {+ "name": "next_maintenance_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "maintenance_failures": {+ "name": "maintenance_failures",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "default": 0+ },+ "last_delivery_at": {+ "name": "last_delivery_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": false+ },+ "last_error": {+ "name": "last_error",+ "type": "text",+ "primaryKey": false,+ "notNull": false+ },+ "wake_count": {+ "name": "wake_count",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "default": 0+ },+ "wake_window_started_at": {+ "name": "wake_window_started_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "accessed_at": {+ "name": "accessed_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp with time zone",+ "primaryKey": false,+ "notNull": true,+ "default": "now()"+ }+ },+ "indexes": {+ "inbound_webhooks_user_kind_dedupe_unique": {+ "name": "inbound_webhooks_user_kind_dedupe_unique",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "kind",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "dedupe_key",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": true,+ "where": "\"inbound_webhooks\".\"dedupe_key\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "inbound_webhooks_next_maintenance_idx": {+ "name": "inbound_webhooks_next_maintenance_idx",+ "columns": [+ {+ "expression": "next_maintenance_at",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "where": "\"inbound_webhooks\".\"next_maintenance_at\" IS NOT NULL",+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "inbound_webhooks_user_idx": {+ "name": "inbound_webhooks_user_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "inbound_webhooks_workspace_idx": {+ "name": "inbound_webhooks_workspace_idx",+ "columns": [+ {+ "expression": "workspace_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "inbound_webhooks_topic_idx": {+ "name": "inbound_webhooks_topic_idx",+ "columns": [+ {+ "expression": "topic_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "inbound_webhooks_agent_idx": {+ "name": "inbound_webhooks_agent_idx",+ "columns": [+ {+ "expression": "agent_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },+ "inbound_webhooks_connector_idx": {+ "name": "inbound_webhooks_connector_idx",+ "columns": [+ {+ "expression": "connector_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ }+ },+ "foreignKeys": {+ "inbound_webhooks_user_id_users_id_fk": {+ "name": "inbound_webhooks_user_id_users_id_fk",+ "tableFrom": "inbound_webhooks",+ "tableTo": "users",+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "inbound_webhooks_workspace_id_workspaces_id_fk": {+ "name": "inbound_webhooks_workspace_id_workspaces_id_fk",+ "tableFrom": "inbound_webhooks",+ "tableTo": "workspaces",+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "inbound_webhooks_agent_id_agents_id_fk": {+ "name": "inbound_webhooks_agent_id_agents_id_fk",+ "tableFrom": "inbound_webhooks",+ "tableTo": "agents",+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "inbound_webhooks_topic_id_topics_id_fk": {+ "name": "inbound_webhooks_topic_id_topics_id_fk",+ "tableFrom": "inbound_webhooks",+ "tableTo": "topics",+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],+ "onDelete": "cascade",+ "onUpdate": "no action"+ },+ "inbound_webhooks_connector_id_user_connectors_id_fk": {+ "name": "inbound_webhooks_connector_id_user_connectors_id_fk",+ "tableFrom": "inbound_webhooks",+ "tableTo": "user_connectors",+ "columnsFrom": [+ "connector_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -23244,8 +28169,12 @@"name": "linear_connections_user_id_users_id_fk","tableFrom": "linear_connections","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -23253,8 +28182,12 @@"name": "linear_connections_workspace_id_workspaces_id_fk","tableFrom": "linear_connections","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -23431,8 +28364,12 @@"name": "linear_sync_rules_project_id_projects_id_fk","tableFrom": "linear_sync_rules","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -23440,8 +28377,12 @@"name": "linear_sync_rules_connection_id_linear_connections_id_fk","tableFrom": "linear_sync_rules","tableTo": "linear_connections",- "columnsFrom": ["connection_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "connection_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -23449,8 +28390,12 @@"name": "linear_sync_rules_user_id_users_id_fk","tableFrom": "linear_sync_rules","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -23458,8 +28403,12 @@"name": "linear_sync_rules_workspace_id_workspaces_id_fk","tableFrom": "linear_sync_rules","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -23879,8 +28828,12 @@"name": "llm_generation_tracing_workspace_id_workspaces_id_fk","tableFrom": "llm_generation_tracing","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -24013,8 +28966,12 @@"name": "meeting_minutes_meeting_id_meetings_id_fk","tableFrom": "meeting_minutes","tableTo": "meetings",- "columnsFrom": ["meeting_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "meeting_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24022,8 +28979,12 @@"name": "meeting_minutes_document_id_documents_id_fk","tableFrom": "meeting_minutes","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -24185,8 +29146,12 @@"name": "meeting_segments_meeting_id_meetings_id_fk","tableFrom": "meeting_segments","tableTo": "meetings",- "columnsFrom": ["meeting_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "meeting_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24194,8 +29159,12 @@"name": "meeting_segments_speaker_id_meeting_speakers_id_fk","tableFrom": "meeting_segments","tableTo": "meeting_speakers",- "columnsFrom": ["speaker_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "speaker_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -24285,8 +29254,12 @@"name": "meeting_speakers_meeting_id_meetings_id_fk","tableFrom": "meeting_speakers","tableTo": "meetings",- "columnsFrom": ["meeting_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "meeting_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -24494,8 +29467,12 @@"name": "meetings_user_id_users_id_fk","tableFrom": "meetings","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24503,8 +29480,12 @@"name": "meetings_workspace_id_workspaces_id_fk","tableFrom": "meetings","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24512,8 +29493,12 @@"name": "meetings_audio_file_id_files_id_fk","tableFrom": "meetings","tableTo": "files",- "columnsFrom": ["audio_file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "audio_file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -24605,8 +29590,12 @@"name": "message_chunks_message_id_messages_id_fk","tableFrom": "message_chunks","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24614,8 +29603,12 @@"name": "message_chunks_chunk_id_chunks_id_fk","tableFrom": "message_chunks","tableTo": "chunks",- "columnsFrom": ["chunk_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chunk_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24623,8 +29616,12 @@"name": "message_chunks_user_id_users_id_fk","tableFrom": "message_chunks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24632,8 +29629,12 @@"name": "message_chunks_workspace_id_workspaces_id_fk","tableFrom": "message_chunks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -24641,7 +29642,10 @@"compositePrimaryKeys": {"message_chunks_chunk_id_message_id_pk": {"name": "message_chunks_chunk_id_message_id_pk",- "columns": ["chunk_id", "message_id"]+ "columns": [+ "chunk_id",+ "message_id"+ ]}},"uniqueConstraints": {},@@ -24871,8 +29875,12 @@"name": "message_groups_topic_id_topics_id_fk","tableFrom": "message_groups","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24880,8 +29888,12 @@"name": "message_groups_user_id_users_id_fk","tableFrom": "message_groups","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24889,8 +29901,12 @@"name": "message_groups_workspace_id_workspaces_id_fk","tableFrom": "message_groups","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24898,8 +29914,12 @@"name": "message_groups_parent_group_id_message_groups_id_fk","tableFrom": "message_groups","tableTo": "message_groups",- "columnsFrom": ["parent_group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -24907,8 +29927,12 @@"name": "message_groups_parent_message_id_messages_id_fk","tableFrom": "message_groups","tableTo": "messages",- "columnsFrom": ["parent_message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -25070,8 +30094,12 @@"name": "message_plugins_id_messages_id_fk","tableFrom": "message_plugins","tableTo": "messages",- "columnsFrom": ["id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25079,8 +30107,12 @@"name": "message_plugins_user_id_users_id_fk","tableFrom": "message_plugins","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25088,8 +30120,12 @@"name": "message_plugins_workspace_id_workspaces_id_fk","tableFrom": "message_plugins","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -25242,8 +30278,12 @@"name": "message_queries_message_id_messages_id_fk","tableFrom": "message_queries","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25251,8 +30291,12 @@"name": "message_queries_user_id_users_id_fk","tableFrom": "message_queries","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25260,8 +30304,12 @@"name": "message_queries_workspace_id_workspaces_id_fk","tableFrom": "message_queries","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25269,8 +30317,12 @@"name": "message_queries_embeddings_id_embeddings_id_fk","tableFrom": "message_queries","tableTo": "embeddings",- "columnsFrom": ["embeddings_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "embeddings_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -25389,8 +30441,12 @@"name": "message_query_chunks_id_messages_id_fk","tableFrom": "message_query_chunks","tableTo": "messages",- "columnsFrom": ["id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25398,8 +30454,12 @@"name": "message_query_chunks_query_id_message_queries_id_fk","tableFrom": "message_query_chunks","tableTo": "message_queries",- "columnsFrom": ["query_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "query_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25407,8 +30467,12 @@"name": "message_query_chunks_chunk_id_chunks_id_fk","tableFrom": "message_query_chunks","tableTo": "chunks",- "columnsFrom": ["chunk_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chunk_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25416,8 +30480,12 @@"name": "message_query_chunks_user_id_users_id_fk","tableFrom": "message_query_chunks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25425,8 +30493,12 @@"name": "message_query_chunks_workspace_id_workspaces_id_fk","tableFrom": "message_query_chunks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -25434,7 +30506,11 @@"compositePrimaryKeys": {"message_query_chunks_chunk_id_id_query_id_pk": {"name": "message_query_chunks_chunk_id_id_query_id_pk",- "columns": ["chunk_id", "id", "query_id"]+ "columns": [+ "chunk_id",+ "id",+ "query_id"+ ]}},"uniqueConstraints": {},@@ -25547,8 +30623,12 @@"name": "message_tts_id_messages_id_fk","tableFrom": "message_tts","tableTo": "messages",- "columnsFrom": ["id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25556,8 +30636,12 @@"name": "message_tts_file_id_files_id_fk","tableFrom": "message_tts","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25565,8 +30649,12 @@"name": "message_tts_user_id_users_id_fk","tableFrom": "message_tts","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25574,8 +30662,12 @@"name": "message_tts_workspace_id_workspaces_id_fk","tableFrom": "message_tts","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -25691,8 +30783,12 @@"name": "message_translates_id_messages_id_fk","tableFrom": "message_translates","tableTo": "messages",- "columnsFrom": ["id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25700,8 +30796,12 @@"name": "message_translates_user_id_users_id_fk","tableFrom": "message_translates","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -25709,8 +30809,12 @@"name": "message_translates_workspace_id_workspaces_id_fk","tableFrom": "message_translates","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -26046,6 +31150,27 @@"method": "btree","with": {}},+ "messages_user_id_topic_id_idx": {+ "name": "messages_user_id_topic_id_idx",+ "columns": [+ {+ "expression": "user_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ },+ {+ "expression": "topic_id",+ "isExpression": false,+ "asc": true,+ "nulls": "last"+ }+ ],+ "isUnique": false,+ "concurrently": false,+ "method": "btree",+ "with": {}+ },"messages_session_id_idx": {"name": "messages_session_id_idx","columns": [@@ -26172,8 +31297,12 @@"name": "messages_user_id_users_id_fk","tableFrom": "messages","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26181,8 +31310,12 @@"name": "messages_session_id_sessions_id_fk","tableFrom": "messages","tableTo": "sessions",- "columnsFrom": ["session_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "session_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26190,8 +31323,12 @@"name": "messages_topic_id_topics_id_fk","tableFrom": "messages","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26199,8 +31336,12 @@"name": "messages_thread_id_threads_id_fk","tableFrom": "messages","tableTo": "threads",- "columnsFrom": ["thread_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "thread_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26208,8 +31349,12 @@"name": "messages_parent_id_messages_id_fk","tableFrom": "messages","tableTo": "messages",- "columnsFrom": ["parent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -26217,8 +31362,12 @@"name": "messages_quota_id_messages_id_fk","tableFrom": "messages","tableTo": "messages",- "columnsFrom": ["quota_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "quota_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -26226,8 +31375,12 @@"name": "messages_agent_id_agents_id_fk","tableFrom": "messages","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26235,8 +31388,12 @@"name": "messages_group_id_chat_groups_id_fk","tableFrom": "messages","tableTo": "chat_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -26244,8 +31401,12 @@"name": "messages_message_group_id_message_groups_id_fk","tableFrom": "messages","tableTo": "message_groups",- "columnsFrom": ["message_group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26253,8 +31414,12 @@"name": "messages_workspace_id_workspaces_id_fk","tableFrom": "messages","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -26346,8 +31511,12 @@"name": "messages_files_file_id_files_id_fk","tableFrom": "messages_files","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26355,8 +31524,12 @@"name": "messages_files_message_id_messages_id_fk","tableFrom": "messages_files","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26364,8 +31537,12 @@"name": "messages_files_user_id_users_id_fk","tableFrom": "messages_files","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26373,8 +31550,12 @@"name": "messages_files_workspace_id_workspaces_id_fk","tableFrom": "messages_files","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -26382,7 +31563,10 @@"compositePrimaryKeys": {"messages_files_file_id_message_id_pk": {"name": "messages_files_file_id_message_id_pk",- "columns": ["file_id", "message_id"]+ "columns": [+ "file_id",+ "message_id"+ ]}},"uniqueConstraints": {},@@ -26597,8 +31781,12 @@"name": "messenger_account_links_user_id_users_id_fk","tableFrom": "messenger_account_links","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26606,8 +31794,12 @@"name": "messenger_account_links_workspace_id_workspaces_id_fk","tableFrom": "messenger_account_links","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26615,8 +31807,12 @@"name": "messenger_account_links_active_agent_id_agents_id_fk","tableFrom": "messenger_account_links","tableTo": "agents",- "columnsFrom": ["active_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "active_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -26791,8 +31987,12 @@"name": "messenger_installations_installed_by_user_id_users_id_fk","tableFrom": "messenger_installations","tableTo": "users",- "columnsFrom": ["installed_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "installed_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -26940,8 +32140,12 @@"name": "metric_points_metric_id_metrics_id_fk","tableFrom": "metric_points","tableTo": "metrics",- "columnsFrom": ["metric_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "metric_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26949,8 +32153,12 @@"name": "metric_points_user_id_users_id_fk","tableFrom": "metric_points","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -26958,8 +32166,12 @@"name": "metric_points_workspace_id_workspaces_id_fk","tableFrom": "metric_points","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27132,8 +32344,12 @@"name": "metrics_user_id_users_id_fk","tableFrom": "metrics","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -27141,8 +32357,12 @@"name": "metrics_workspace_id_workspaces_id_fk","tableFrom": "metrics","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27246,8 +32466,12 @@"name": "nextauth_accounts_user_id_users_id_fk","tableFrom": "nextauth_accounts","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27255,7 +32479,10 @@"compositePrimaryKeys": {"nextauth_accounts_provider_providerAccountId_pk": {"name": "nextauth_accounts_provider_providerAccountId_pk",- "columns": ["provider", "providerAccountId"]+ "columns": [+ "provider",+ "providerAccountId"+ ]}},"uniqueConstraints": {},@@ -27322,8 +32549,12 @@"name": "nextauth_authenticators_user_id_users_id_fk","tableFrom": "nextauth_authenticators","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27331,14 +32562,19 @@"compositePrimaryKeys": {"nextauth_authenticators_user_id_credentialID_pk": {"name": "nextauth_authenticators_user_id_credentialID_pk",- "columns": ["user_id", "credentialID"]+ "columns": [+ "user_id",+ "credentialID"+ ]}},"uniqueConstraints": {"nextauth_authenticators_credentialID_unique": {"name": "nextauth_authenticators_credentialID_unique","nullsNotDistinct": false,- "columns": ["credentialID"]+ "columns": [+ "credentialID"+ ]}},"policies": {},@@ -27390,8 +32626,12 @@"name": "nextauth_sessions_user_id_users_id_fk","tableFrom": "nextauth_sessions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27430,7 +32670,10 @@"compositePrimaryKeys": {"nextauth_verificationtokens_identifier_token_pk": {"name": "nextauth_verificationtokens_identifier_token_pk",- "columns": ["identifier", "token"]+ "columns": [+ "identifier",+ "token"+ ]}},"uniqueConstraints": {},@@ -27545,8 +32788,12 @@"name": "notification_deliveries_notification_id_notifications_id_fk","tableFrom": "notification_deliveries","tableTo": "notifications",- "columnsFrom": ["notification_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "notification_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27802,8 +33049,12 @@"name": "notifications_user_id_users_id_fk","tableFrom": "notifications","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -27811,8 +33062,12 @@"name": "notifications_workspace_id_workspaces_id_fk","tableFrom": "notifications","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -27965,8 +33220,12 @@"name": "oidc_access_tokens_user_id_users_id_fk","tableFrom": "oidc_access_tokens","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28067,8 +33326,12 @@"name": "oidc_authorization_codes_user_id_users_id_fk","tableFrom": "oidc_authorization_codes","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28257,8 +33520,12 @@"name": "oidc_clients_user_id_users_id_fk","tableFrom": "oidc_clients","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -28266,8 +33533,12 @@"name": "oidc_clients_workspace_id_workspaces_id_fk","tableFrom": "oidc_clients","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28334,8 +33605,12 @@"name": "oidc_consents_user_id_users_id_fk","tableFrom": "oidc_consents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -28343,8 +33618,12 @@"name": "oidc_consents_client_id_oidc_clients_id_fk","tableFrom": "oidc_consents","tableTo": "oidc_clients",- "columnsFrom": ["client_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "client_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28352,7 +33631,10 @@"compositePrimaryKeys": {"oidc_consents_user_id_client_id_pk": {"name": "oidc_consents_user_id_client_id_pk",- "columns": ["user_id", "client_id"]+ "columns": [+ "user_id",+ "client_id"+ ]}},"uniqueConstraints": {},@@ -28456,8 +33738,12 @@"name": "oidc_device_codes_user_id_users_id_fk","tableFrom": "oidc_device_codes","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28552,8 +33838,12 @@"name": "oidc_grants_user_id_users_id_fk","tableFrom": "oidc_grants","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28706,8 +33996,12 @@"name": "oidc_refresh_tokens_user_id_users_id_fk","tableFrom": "oidc_refresh_tokens","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28790,8 +34084,12 @@"name": "oidc_sessions_user_id_users_id_fk","tableFrom": "oidc_sessions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -28964,8 +34262,12 @@"name": "project_agents_project_id_projects_id_fk","tableFrom": "project_agents","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -28973,8 +34275,12 @@"name": "project_agents_agent_id_agents_id_fk","tableFrom": "project_agents","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -28982,8 +34288,12 @@"name": "project_agents_added_by_user_id_users_id_fk","tableFrom": "project_agents","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -28991,8 +34301,12 @@"name": "project_agents_workspace_id_workspaces_id_fk","tableFrom": "project_agents","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -29165,8 +34479,12 @@"name": "project_chat_groups_project_id_projects_id_fk","tableFrom": "project_chat_groups","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29174,8 +34492,12 @@"name": "project_chat_groups_chat_group_id_chat_groups_id_fk","tableFrom": "project_chat_groups","tableTo": "chat_groups",- "columnsFrom": ["chat_group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chat_group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29183,8 +34505,12 @@"name": "project_chat_groups_added_by_user_id_users_id_fk","tableFrom": "project_chat_groups","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -29192,8 +34518,12 @@"name": "project_chat_groups_workspace_id_workspaces_id_fk","tableFrom": "project_chat_groups","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -29352,8 +34682,12 @@"name": "project_completion_reviews_project_id_projects_id_fk","tableFrom": "project_completion_reviews","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29361,8 +34695,12 @@"name": "project_completion_reviews_reviewer_user_id_users_id_fk","tableFrom": "project_completion_reviews","tableTo": "users",- "columnsFrom": ["reviewer_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "reviewer_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -29370,8 +34708,12 @@"name": "project_completion_reviews_workspace_id_workspaces_id_fk","tableFrom": "project_completion_reviews","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -29537,8 +34879,12 @@"name": "project_knowledge_bases_project_id_projects_id_fk","tableFrom": "project_knowledge_bases","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29546,8 +34892,12 @@"name": "project_knowledge_bases_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "project_knowledge_bases","tableTo": "knowledge_bases",- "columnsFrom": ["knowledge_base_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "knowledge_base_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29555,8 +34905,12 @@"name": "project_knowledge_bases_added_by_user_id_users_id_fk","tableFrom": "project_knowledge_bases","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -29564,8 +34918,12 @@"name": "project_knowledge_bases_workspace_id_workspaces_id_fk","tableFrom": "project_knowledge_bases","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -29767,8 +35125,12 @@"name": "project_working_directories_project_id_projects_id_fk","tableFrom": "project_working_directories","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29776,8 +35138,12 @@"name": "project_working_directories_device_id_devices_id_fk","tableFrom": "project_working_directories","tableTo": "devices",- "columnsFrom": ["device_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "device_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -29785,8 +35151,12 @@"name": "project_working_directories_workspace_id_workspaces_id_fk","tableFrom": "project_working_directories","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -29794,8 +35164,12 @@"name": "project_working_directories_added_by_user_id_users_id_fk","tableFrom": "project_working_directories","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -30181,8 +35555,12 @@"name": "projects_coordinator_agent_id_agents_id_fk","tableFrom": "projects","tableTo": "agents",- "columnsFrom": ["coordinator_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "coordinator_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -30190,8 +35568,12 @@"name": "projects_user_id_users_id_fk","tableFrom": "projects","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30199,8 +35581,12 @@"name": "projects_workspace_id_workspaces_id_fk","tableFrom": "projects","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -30425,8 +35811,12 @@"name": "project_environments_project_id_projects_id_fk","tableFrom": "project_environments","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30434,8 +35824,12 @@"name": "project_environments_environment_id_environments_id_fk","tableFrom": "project_environments","tableTo": "environments",- "columnsFrom": ["environment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "environment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "restrict","onUpdate": "no action"},@@ -30443,8 +35837,12 @@"name": "project_environments_workspace_id_workspaces_id_fk","tableFrom": "project_environments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30452,8 +35850,12 @@"name": "project_environments_added_by_user_id_users_id_fk","tableFrom": "project_environments","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -30461,8 +35863,14 @@"name": "project_environments_default_instance_fk","tableFrom": "project_environments","tableTo": "environment_instances",- "columnsFrom": ["environment_id", "default_instance_id"],- "columnsTo": ["environment_id", "id"],+ "columnsFrom": [+ "environment_id",+ "default_instance_id"+ ],+ "columnsTo": [+ "environment_id",+ "id"+ ],"onDelete": "restrict","onUpdate": "no action"}@@ -30600,8 +36008,12 @@"name": "project_members_project_id_projects_id_fk","tableFrom": "project_members","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30609,8 +36021,12 @@"name": "project_members_user_id_users_id_fk","tableFrom": "project_members","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30618,8 +36034,12 @@"name": "project_members_added_by_user_id_users_id_fk","tableFrom": "project_members","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -30741,8 +36161,12 @@"name": "project_sites_project_id_projects_id_fk","tableFrom": "project_sites","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30750,8 +36174,12 @@"name": "project_sites_workspace_id_workspaces_id_fk","tableFrom": "project_sites","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30759,8 +36187,12 @@"name": "project_sites_created_by_user_id_users_id_fk","tableFrom": "project_sites","tableTo": "users",- "columnsFrom": ["created_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -30768,8 +36200,12 @@"name": "project_sites_acceptance_id_acceptances_id_fk","tableFrom": "project_sites","tableTo": "acceptances",- "columnsFrom": ["acceptance_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "acceptance_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -30932,8 +36368,12 @@"name": "project_works_project_id_projects_id_fk","tableFrom": "project_works","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30941,8 +36381,12 @@"name": "project_works_work_id_works_id_fk","tableFrom": "project_works","tableTo": "works",- "columnsFrom": ["work_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "work_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -30950,8 +36394,12 @@"name": "project_works_added_by_user_id_users_id_fk","tableFrom": "project_works","tableTo": "users",- "columnsFrom": ["added_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "added_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -30959,8 +36407,12 @@"name": "project_works_workspace_id_workspaces_id_fk","tableFrom": "project_works","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -31130,8 +36582,12 @@"name": "push_live_activities_user_id_users_id_fk","tableFrom": "push_live_activities","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -31279,8 +36735,12 @@"name": "push_tokens_user_id_users_id_fk","tableFrom": "push_tokens","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -31435,8 +36895,12 @@"name": "chunks_user_id_users_id_fk","tableFrom": "chunks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31444,8 +36908,12 @@"name": "chunks_workspace_id_workspaces_id_fk","tableFrom": "chunks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -31565,8 +37033,12 @@"name": "document_chunks_document_id_documents_id_fk","tableFrom": "document_chunks","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31574,8 +37046,12 @@"name": "document_chunks_chunk_id_chunks_id_fk","tableFrom": "document_chunks","tableTo": "chunks",- "columnsFrom": ["chunk_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chunk_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31583,8 +37059,12 @@"name": "document_chunks_user_id_users_id_fk","tableFrom": "document_chunks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31592,8 +37072,12 @@"name": "document_chunks_workspace_id_workspaces_id_fk","tableFrom": "document_chunks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -31601,7 +37085,10 @@"compositePrimaryKeys": {"document_chunks_document_id_chunk_id_pk": {"name": "document_chunks_document_id_chunk_id_pk",- "columns": ["document_id", "chunk_id"]+ "columns": [+ "document_id",+ "chunk_id"+ ]}},"uniqueConstraints": {},@@ -31730,8 +37217,12 @@"name": "embeddings_chunk_id_chunks_id_fk","tableFrom": "embeddings","tableTo": "chunks",- "columnsFrom": ["chunk_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chunk_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31739,8 +37230,12 @@"name": "embeddings_user_id_users_id_fk","tableFrom": "embeddings","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31748,8 +37243,12 @@"name": "embeddings_workspace_id_workspaces_id_fk","tableFrom": "embeddings","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -31759,7 +37258,9 @@"embeddings_chunk_id_unique": {"name": "embeddings_chunk_id_unique","nullsNotDistinct": false,- "columns": ["chunk_id"]+ "columns": [+ "chunk_id"+ ]}},"policies": {},@@ -31947,8 +37448,12 @@"name": "unstructured_chunks_composite_id_chunks_id_fk","tableFrom": "unstructured_chunks","tableTo": "chunks",- "columnsFrom": ["composite_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "composite_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31956,8 +37461,12 @@"name": "unstructured_chunks_user_id_users_id_fk","tableFrom": "unstructured_chunks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31965,8 +37474,12 @@"name": "unstructured_chunks_workspace_id_workspaces_id_fk","tableFrom": "unstructured_chunks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -31974,8 +37487,12 @@"name": "unstructured_chunks_file_id_files_id_fk","tableFrom": "unstructured_chunks","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -32097,8 +37614,12 @@"name": "rag_eval_dataset_records_dataset_id_rag_eval_datasets_id_fk","tableFrom": "rag_eval_dataset_records","tableTo": "rag_eval_datasets",- "columnsFrom": ["dataset_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dataset_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32106,8 +37627,12 @@"name": "rag_eval_dataset_records_user_id_users_id_fk","tableFrom": "rag_eval_dataset_records","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32115,8 +37640,12 @@"name": "rag_eval_dataset_records_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_dataset_records","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -32226,8 +37755,12 @@"name": "rag_eval_datasets_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "rag_eval_datasets","tableTo": "knowledge_bases",- "columnsFrom": ["knowledge_base_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "knowledge_base_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32235,8 +37768,12 @@"name": "rag_eval_datasets_user_id_users_id_fk","tableFrom": "rag_eval_datasets","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32244,8 +37781,12 @@"name": "rag_eval_datasets_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_datasets","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -32391,8 +37932,12 @@"name": "rag_eval_evaluations_dataset_id_rag_eval_datasets_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "rag_eval_datasets",- "columnsFrom": ["dataset_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dataset_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32400,8 +37945,12 @@"name": "rag_eval_evaluations_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "knowledge_bases",- "columnsFrom": ["knowledge_base_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "knowledge_base_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32409,8 +37958,12 @@"name": "rag_eval_evaluations_user_id_users_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32418,8 +37971,12 @@"name": "rag_eval_evaluations_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -32583,8 +38140,12 @@"name": "rag_eval_evaluation_records_question_embedding_id_embeddings_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "embeddings",- "columnsFrom": ["question_embedding_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "question_embedding_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -32592,8 +38153,12 @@"name": "rag_eval_evaluation_records_dataset_record_id_rag_eval_dataset_records_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "rag_eval_dataset_records",- "columnsFrom": ["dataset_record_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dataset_record_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32601,8 +38166,12 @@"name": "rag_eval_evaluation_records_evaluation_id_rag_eval_evaluations_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "rag_eval_evaluations",- "columnsFrom": ["evaluation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "evaluation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32610,8 +38179,12 @@"name": "rag_eval_evaluation_records_user_id_users_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32619,8 +38192,12 @@"name": "rag_eval_evaluation_records_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -32701,7 +38278,9 @@"rbac_permissions_code_unique": {"name": "rbac_permissions_code_unique","nullsNotDistinct": false,- "columns": ["code"]+ "columns": [+ "code"+ ]}},"policies": {},@@ -32769,8 +38348,12 @@"name": "rbac_role_permissions_role_id_rbac_roles_id_fk","tableFrom": "rbac_role_permissions","tableTo": "rbac_roles",- "columnsFrom": ["role_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "role_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -32778,8 +38361,12 @@"name": "rbac_role_permissions_permission_id_rbac_permissions_id_fk","tableFrom": "rbac_role_permissions","tableTo": "rbac_permissions",- "columnsFrom": ["permission_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "permission_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -32787,7 +38374,10 @@"compositePrimaryKeys": {"rbac_role_permissions_role_id_permission_id_pk": {"name": "rbac_role_permissions_role_id_permission_id_pk",- "columns": ["role_id", "permission_id"]+ "columns": [+ "role_id",+ "permission_id"+ ]}},"uniqueConstraints": {},@@ -32915,8 +38505,12 @@"name": "rbac_roles_workspace_id_workspaces_id_fk","tableFrom": "rbac_roles","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -33049,8 +38643,12 @@"name": "rbac_user_roles_user_id_users_id_fk","tableFrom": "rbac_user_roles","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33058,8 +38656,12 @@"name": "rbac_user_roles_role_id_rbac_roles_id_fk","tableFrom": "rbac_user_roles","tableTo": "rbac_roles",- "columnsFrom": ["role_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "role_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33067,8 +38669,12 @@"name": "rbac_user_roles_workspace_id_workspaces_id_fk","tableFrom": "rbac_user_roles","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -33175,8 +38781,12 @@"name": "agents_to_sessions_agent_id_agents_id_fk","tableFrom": "agents_to_sessions","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33184,8 +38794,12 @@"name": "agents_to_sessions_session_id_sessions_id_fk","tableFrom": "agents_to_sessions","tableTo": "sessions",- "columnsFrom": ["session_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "session_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33193,8 +38807,12 @@"name": "agents_to_sessions_user_id_users_id_fk","tableFrom": "agents_to_sessions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33202,8 +38820,12 @@"name": "agents_to_sessions_workspace_id_workspaces_id_fk","tableFrom": "agents_to_sessions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -33211,7 +38833,10 @@"compositePrimaryKeys": {"agents_to_sessions_agent_id_session_id_pk": {"name": "agents_to_sessions_agent_id_session_id_pk",- "columns": ["agent_id", "session_id"]+ "columns": [+ "agent_id",+ "session_id"+ ]}},"uniqueConstraints": {},@@ -33322,8 +38947,12 @@"name": "file_chunks_file_id_files_id_fk","tableFrom": "file_chunks","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33331,8 +38960,12 @@"name": "file_chunks_chunk_id_chunks_id_fk","tableFrom": "file_chunks","tableTo": "chunks",- "columnsFrom": ["chunk_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "chunk_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33340,8 +38973,12 @@"name": "file_chunks_user_id_users_id_fk","tableFrom": "file_chunks","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33349,8 +38986,12 @@"name": "file_chunks_workspace_id_workspaces_id_fk","tableFrom": "file_chunks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -33358,7 +38999,10 @@"compositePrimaryKeys": {"file_chunks_file_id_chunk_id_pk": {"name": "file_chunks_file_id_chunk_id_pk",- "columns": ["file_id", "chunk_id"]+ "columns": [+ "file_id",+ "chunk_id"+ ]}},"uniqueConstraints": {},@@ -33462,8 +39106,12 @@"name": "files_to_sessions_file_id_files_id_fk","tableFrom": "files_to_sessions","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33471,8 +39119,12 @@"name": "files_to_sessions_session_id_sessions_id_fk","tableFrom": "files_to_sessions","tableTo": "sessions",- "columnsFrom": ["session_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "session_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33480,8 +39132,12 @@"name": "files_to_sessions_user_id_users_id_fk","tableFrom": "files_to_sessions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33489,8 +39145,12 @@"name": "files_to_sessions_workspace_id_workspaces_id_fk","tableFrom": "files_to_sessions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -33498,7 +39158,10 @@"compositePrimaryKeys": {"files_to_sessions_file_id_session_id_pk": {"name": "files_to_sessions_file_id_session_id_pk",- "columns": ["file_id", "session_id"]+ "columns": [+ "file_id",+ "session_id"+ ]}},"uniqueConstraints": {},@@ -33731,8 +39394,12 @@"name": "resource_permissions_workspace_id_workspaces_id_fk","tableFrom": "resource_permissions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33740,8 +39407,12 @@"name": "resource_permissions_user_id_users_id_fk","tableFrom": "resource_permissions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33749,8 +39420,12 @@"name": "resource_permissions_created_by_users_id_fk","tableFrom": "resource_permissions","tableTo": "users",- "columnsFrom": ["created_by"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -33920,8 +39595,12 @@"name": "resource_transfer_requests_workspace_id_workspaces_id_fk","tableFrom": "resource_transfer_requests","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -33929,8 +39608,12 @@"name": "resource_transfer_requests_initiator_id_users_id_fk","tableFrom": "resource_transfer_requests","tableTo": "users",- "columnsFrom": ["initiator_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "initiator_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -33938,8 +39621,12 @@"name": "resource_transfer_requests_recipient_id_users_id_fk","tableFrom": "resource_transfer_requests","tableTo": "users",- "columnsFrom": ["recipient_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "recipient_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -33947,8 +39634,12 @@"name": "resource_transfer_requests_previous_owner_id_users_id_fk","tableFrom": "resource_transfer_requests","tableTo": "users",- "columnsFrom": ["previous_owner_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "previous_owner_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -34343,8 +40034,12 @@"name": "scm_change_requests_user_id_users_id_fk","tableFrom": "scm_change_requests","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -34352,8 +40047,12 @@"name": "scm_change_requests_workspace_id_workspaces_id_fk","tableFrom": "scm_change_requests","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -34361,8 +40060,12 @@"name": "scm_change_requests_installation_id_scm_installations_id_fk","tableFrom": "scm_change_requests","tableTo": "scm_installations",- "columnsFrom": ["installation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "installation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -34370,8 +40073,12 @@"name": "scm_change_requests_acceptance_id_acceptances_id_fk","tableFrom": "scm_change_requests","tableTo": "acceptances",- "columnsFrom": ["acceptance_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "acceptance_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -34379,8 +40086,12 @@"name": "scm_change_requests_work_id_works_id_fk","tableFrom": "scm_change_requests","tableTo": "works",- "columnsFrom": ["work_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "work_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -34388,8 +40099,12 @@"name": "scm_change_requests_topic_id_topics_id_fk","tableFrom": "scm_change_requests","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -34397,8 +40112,12 @@"name": "scm_change_requests_task_id_tasks_id_fk","tableFrom": "scm_change_requests","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -34549,8 +40268,12 @@"name": "scm_identities_user_id_users_id_fk","tableFrom": "scm_identities","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -34759,8 +40482,12 @@"name": "scm_installations_user_id_users_id_fk","tableFrom": "scm_installations","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -34768,8 +40495,12 @@"name": "scm_installations_workspace_id_workspaces_id_fk","tableFrom": "scm_installations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -35070,8 +40801,12 @@"name": "session_groups_user_id_users_id_fk","tableFrom": "session_groups","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -35079,8 +40814,12 @@"name": "session_groups_workspace_id_workspaces_id_fk","tableFrom": "session_groups","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -35350,8 +41089,12 @@"name": "sessions_user_id_users_id_fk","tableFrom": "sessions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -35359,8 +41102,12 @@"name": "sessions_group_id_session_groups_id_fk","tableFrom": "sessions","tableTo": "session_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -35368,8 +41115,12 @@"name": "sessions_workspace_id_workspaces_id_fk","tableFrom": "sessions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -35647,8 +41398,12 @@"name": "signals_user_id_users_id_fk","tableFrom": "signals","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -35656,8 +41411,12 @@"name": "signals_workspace_id_workspaces_id_fk","tableFrom": "signals","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -35665,8 +41424,12 @@"name": "signals_account_id_agent_accounts_id_fk","tableFrom": "signals","tableTo": "agent_accounts",- "columnsFrom": ["account_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "account_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -35674,8 +41437,12 @@"name": "signals_agent_id_agents_id_fk","tableFrom": "signals","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -35770,8 +41537,12 @@"name": "signal_decision_labels_decision_id_signal_decisions_id_fk","tableFrom": "signal_decision_labels","tableTo": "signal_decisions",- "columnsFrom": ["decision_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "decision_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -35985,8 +41756,12 @@"name": "signal_decisions_signal_id_signals_id_fk","tableFrom": "signal_decisions","tableTo": "signals",- "columnsFrom": ["signal_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "signal_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -35994,8 +41769,12 @@"name": "signal_decisions_agent_id_agents_id_fk","tableFrom": "signal_decisions","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -36003,8 +41782,12 @@"name": "signal_decisions_user_id_users_id_fk","tableFrom": "signal_decisions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36012,8 +41795,12 @@"name": "signal_decisions_workspace_id_workspaces_id_fk","tableFrom": "signal_decisions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36021,8 +41808,12 @@"name": "signal_decisions_topic_id_topics_id_fk","tableFrom": "signal_decisions","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -36403,8 +42194,12 @@"name": "briefs_user_id_users_id_fk","tableFrom": "briefs","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36412,8 +42207,12 @@"name": "briefs_workspace_id_workspaces_id_fk","tableFrom": "briefs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36421,8 +42220,12 @@"name": "briefs_task_id_tasks_id_fk","tableFrom": "briefs","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36430,8 +42233,12 @@"name": "briefs_cron_job_id_agent_cron_jobs_id_fk","tableFrom": "briefs","tableTo": "agent_cron_jobs",- "columnsFrom": ["cron_job_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "cron_job_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -36589,8 +42396,12 @@"name": "task_activities_task_id_tasks_id_fk","tableFrom": "task_activities","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36598,8 +42409,12 @@"name": "task_activities_user_id_users_id_fk","tableFrom": "task_activities","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36607,8 +42422,12 @@"name": "task_activities_workspace_id_workspaces_id_fk","tableFrom": "task_activities","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36616,8 +42435,12 @@"name": "task_activities_actor_user_id_users_id_fk","tableFrom": "task_activities","tableTo": "users",- "columnsFrom": ["actor_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "actor_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -36625,8 +42448,12 @@"name": "task_activities_actor_agent_id_agents_id_fk","tableFrom": "task_activities","tableTo": "agents",- "columnsFrom": ["actor_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "actor_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -36869,8 +42696,12 @@"name": "task_comments_task_id_tasks_id_fk","tableFrom": "task_comments","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36878,8 +42709,12 @@"name": "task_comments_user_id_users_id_fk","tableFrom": "task_comments","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36887,8 +42722,12 @@"name": "task_comments_workspace_id_workspaces_id_fk","tableFrom": "task_comments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -36896,8 +42735,12 @@"name": "task_comments_author_user_id_users_id_fk","tableFrom": "task_comments","tableTo": "users",- "columnsFrom": ["author_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "author_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -36905,8 +42748,12 @@"name": "task_comments_author_agent_id_agents_id_fk","tableFrom": "task_comments","tableTo": "agents",- "columnsFrom": ["author_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "author_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -36914,8 +42761,12 @@"name": "task_comments_brief_id_briefs_id_fk","tableFrom": "task_comments","tableTo": "briefs",- "columnsFrom": ["brief_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "brief_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -36923,8 +42774,12 @@"name": "task_comments_topic_id_topics_id_fk","tableFrom": "task_comments","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -37113,8 +42968,12 @@"name": "task_dependencies_task_id_tasks_id_fk","tableFrom": "task_dependencies","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37122,8 +42981,12 @@"name": "task_dependencies_depends_on_id_tasks_id_fk","tableFrom": "task_dependencies","tableTo": "tasks",- "columnsFrom": ["depends_on_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "depends_on_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37131,8 +42994,12 @@"name": "task_dependencies_user_id_users_id_fk","tableFrom": "task_dependencies","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37140,8 +43007,12 @@"name": "task_dependencies_workspace_id_workspaces_id_fk","tableFrom": "task_dependencies","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -37324,8 +43195,12 @@"name": "task_documents_task_id_tasks_id_fk","tableFrom": "task_documents","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37333,8 +43208,12 @@"name": "task_documents_document_id_documents_id_fk","tableFrom": "task_documents","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37342,8 +43221,12 @@"name": "task_documents_user_id_users_id_fk","tableFrom": "task_documents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37351,8 +43234,12 @@"name": "task_documents_workspace_id_workspaces_id_fk","tableFrom": "task_documents","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -37624,8 +43511,12 @@"name": "task_topics_task_id_tasks_id_fk","tableFrom": "task_topics","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37633,8 +43524,12 @@"name": "task_topics_topic_id_topics_id_fk","tableFrom": "task_topics","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37642,8 +43537,12 @@"name": "task_topics_user_id_users_id_fk","tableFrom": "task_topics","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -37651,8 +43550,12 @@"name": "task_topics_workspace_id_workspaces_id_fk","tableFrom": "task_topics","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -38162,8 +44065,12 @@"name": "tasks_created_by_user_id_users_id_fk","tableFrom": "tasks","tableTo": "users",- "columnsFrom": ["created_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38171,8 +44078,12 @@"name": "tasks_workspace_id_workspaces_id_fk","tableFrom": "tasks","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38180,8 +44091,12 @@"name": "tasks_project_id_projects_id_fk","tableFrom": "tasks","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -38189,8 +44104,12 @@"name": "tasks_created_by_agent_id_agents_id_fk","tableFrom": "tasks","tableTo": "agents",- "columnsFrom": ["created_by_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -38198,8 +44117,12 @@"name": "tasks_assignee_user_id_users_id_fk","tableFrom": "tasks","tableTo": "users",- "columnsFrom": ["assignee_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "assignee_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -38207,8 +44130,12 @@"name": "tasks_assignee_agent_id_agents_id_fk","tableFrom": "tasks","tableTo": "agents",- "columnsFrom": ["assignee_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "assignee_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -38216,8 +44143,12 @@"name": "tasks_current_topic_id_topics_id_fk","tableFrom": "tasks","tableTo": "topics",- "columnsFrom": ["current_topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "current_topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -38225,8 +44156,12 @@"name": "tasks_parent_task_id_tasks_id_fk","tableFrom": "tasks","tableTo": "tasks",- "columnsFrom": ["parent_task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -38458,8 +44393,12 @@"name": "task_external_links_task_id_tasks_id_fk","tableFrom": "task_external_links","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38467,8 +44406,12 @@"name": "task_external_links_user_id_users_id_fk","tableFrom": "task_external_links","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38476,8 +44419,12 @@"name": "task_external_links_workspace_id_workspaces_id_fk","tableFrom": "task_external_links","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -38604,8 +44551,12 @@"name": "task_label_links_task_id_tasks_id_fk","tableFrom": "task_label_links","tableTo": "tasks",- "columnsFrom": ["task_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "task_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38613,8 +44564,12 @@"name": "task_label_links_label_id_task_labels_id_fk","tableFrom": "task_label_links","tableTo": "task_labels",- "columnsFrom": ["label_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "label_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38622,8 +44577,12 @@"name": "task_label_links_user_id_users_id_fk","tableFrom": "task_label_links","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38631,8 +44590,12 @@"name": "task_label_links_workspace_id_workspaces_id_fk","tableFrom": "task_label_links","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -38822,8 +44785,12 @@"name": "task_labels_user_id_users_id_fk","tableFrom": "task_labels","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -38831,8 +44798,12 @@"name": "task_labels_workspace_id_workspaces_id_fk","tableFrom": "task_labels","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -38840,8 +44811,12 @@"name": "task_labels_parent_id_task_labels_id_fk","tableFrom": "task_labels","tableTo": "task_labels",- "columnsFrom": ["parent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -39120,8 +45095,12 @@"name": "threads_topic_id_topics_id_fk","tableFrom": "threads","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39129,8 +45108,12 @@"name": "threads_parent_thread_id_threads_id_fk","tableFrom": "threads","tableTo": "threads",- "columnsFrom": ["parent_thread_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_thread_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -39138,8 +45121,12 @@"name": "threads_agent_id_agents_id_fk","tableFrom": "threads","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39147,8 +45134,12 @@"name": "threads_group_id_chat_groups_id_fk","tableFrom": "threads","tableTo": "chat_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39156,8 +45147,12 @@"name": "threads_user_id_users_id_fk","tableFrom": "threads","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39165,8 +45160,12 @@"name": "threads_workspace_id_workspaces_id_fk","tableFrom": "threads","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -39280,8 +45279,12 @@"name": "topic_documents_document_id_documents_id_fk","tableFrom": "topic_documents","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39289,8 +45292,12 @@"name": "topic_documents_topic_id_topics_id_fk","tableFrom": "topic_documents","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39298,8 +45305,12 @@"name": "topic_documents_user_id_users_id_fk","tableFrom": "topic_documents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39307,8 +45318,12 @@"name": "topic_documents_workspace_id_workspaces_id_fk","tableFrom": "topic_documents","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -39316,7 +45331,10 @@"compositePrimaryKeys": {"topic_documents_document_id_topic_id_pk": {"name": "topic_documents_document_id_topic_id_pk",- "columns": ["document_id", "topic_id"]+ "columns": [+ "document_id",+ "topic_id"+ ]}},"uniqueConstraints": {},@@ -39440,8 +45458,12 @@"name": "topic_shares_topic_id_topics_id_fk","tableFrom": "topic_shares","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39449,8 +45471,12 @@"name": "topic_shares_user_id_users_id_fk","tableFrom": "topic_shares","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39458,8 +45484,12 @@"name": "topic_shares_workspace_id_workspaces_id_fk","tableFrom": "topic_shares","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -39965,8 +45995,12 @@"name": "topics_session_id_sessions_id_fk","tableFrom": "topics","tableTo": "sessions",- "columnsFrom": ["session_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "session_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39974,8 +46008,12 @@"name": "topics_agent_id_agents_id_fk","tableFrom": "topics","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39983,8 +46021,12 @@"name": "topics_group_id_chat_groups_id_fk","tableFrom": "topics","tableTo": "chat_groups",- "columnsFrom": ["group_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "group_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -39992,8 +46034,12 @@"name": "topics_project_id_projects_id_fk","tableFrom": "topics","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -40001,8 +46047,12 @@"name": "topics_project_working_directory_id_project_working_directories_id_fk","tableFrom": "topics","tableTo": "project_working_directories",- "columnsFrom": ["project_working_directory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_working_directory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -40010,8 +46060,12 @@"name": "topics_user_id_users_id_fk","tableFrom": "topics","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40019,8 +46073,12 @@"name": "topics_workspace_id_workspaces_id_fk","tableFrom": "topics","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -40300,8 +46358,12 @@"name": "topic_analyses_topic_id_topics_id_fk","tableFrom": "topic_analyses","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40309,8 +46371,12 @@"name": "topic_analyses_user_id_users_id_fk","tableFrom": "topic_analyses","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40318,8 +46384,12 @@"name": "topic_analyses_workspace_id_workspaces_id_fk","tableFrom": "topic_analyses","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -40431,8 +46501,12 @@"name": "topic_comment_mentions_comment_id_topic_comments_id_fk","tableFrom": "topic_comment_mentions","tableTo": "topic_comments",- "columnsFrom": ["comment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "comment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40440,8 +46514,12 @@"name": "topic_comment_mentions_mentioned_user_id_users_id_fk","tableFrom": "topic_comment_mentions","tableTo": "users",- "columnsFrom": ["mentioned_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "mentioned_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40449,8 +46527,12 @@"name": "topic_comment_mentions_workspace_id_workspaces_id_fk","tableFrom": "topic_comment_mentions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -40748,8 +46830,12 @@"name": "topic_comments_topic_id_topics_id_fk","tableFrom": "topic_comments","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40757,8 +46843,12 @@"name": "topic_comments_message_id_messages_id_fk","tableFrom": "topic_comments","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -40766,8 +46856,12 @@"name": "topic_comments_parent_comment_id_topic_comments_id_fk","tableFrom": "topic_comments","tableTo": "topic_comments",- "columnsFrom": ["parent_comment_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_comment_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "no action","onUpdate": "no action"},@@ -40775,8 +46869,12 @@"name": "topic_comments_author_user_id_users_id_fk","tableFrom": "topic_comments","tableTo": "users",- "columnsFrom": ["author_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "author_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -40784,8 +46882,12 @@"name": "topic_comments_workspace_id_workspaces_id_fk","tableFrom": "topic_comments","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -40793,8 +46895,12 @@"name": "topic_comments_moderated_by_user_id_users_id_fk","tableFrom": "topic_comments","tableTo": "users",- "columnsFrom": ["moderated_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "moderated_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -41041,8 +47147,12 @@"name": "trash_items_root_id_trash_items_id_fk","tableFrom": "trash_items","tableTo": "trash_items",- "columnsFrom": ["root_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "root_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -41050,8 +47160,12 @@"name": "trash_items_user_id_users_id_fk","tableFrom": "trash_items","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -41059,8 +47173,12 @@"name": "trash_items_workspace_id_workspaces_id_fk","tableFrom": "trash_items","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -41068,8 +47186,12 @@"name": "trash_items_deleted_by_user_id_users_id_fk","tableFrom": "trash_items","tableTo": "users",- "columnsFrom": ["deleted_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "deleted_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -41169,8 +47291,12 @@"name": "user_settings_id_users_id_fk","tableFrom": "user_settings","tableTo": "users",- "columnsFrom": ["id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -41425,22 +47551,30 @@"users_username_unique": {"name": "users_username_unique","nullsNotDistinct": false,- "columns": ["username"]+ "columns": [+ "username"+ ]},"users_email_unique": {"name": "users_email_unique","nullsNotDistinct": false,- "columns": ["email"]+ "columns": [+ "email"+ ]},"users_normalized_email_unique": {"name": "users_normalized_email_unique","nullsNotDistinct": false,- "columns": ["normalized_email"]+ "columns": [+ "normalized_email"+ ]},"users_phone_unique": {"name": "users_phone_unique","nullsNotDistinct": false,- "columns": ["phone"]+ "columns": [+ "phone"+ ]}},"policies": {},@@ -41717,8 +47851,12 @@"name": "user_memories_activities_user_id_users_id_fk","tableFrom": "user_memories_activities","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -41726,8 +47864,12 @@"name": "user_memories_activities_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_activities","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -41735,8 +47877,12 @@"name": "user_memories_activities_dossier_id_user_memories_dossiers_id_fk","tableFrom": "user_memories_activities","tableTo": "user_memories_dossiers",- "columnsFrom": ["dossier_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "dossier_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -41950,8 +48096,12 @@"name": "user_memories_user_id_users_id_fk","tableFrom": "user_memories","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -42097,8 +48247,12 @@"name": "user_memories_context_projects_context_id_user_memories_contexts_id_fk","tableFrom": "user_memories_context_projects","tableTo": "user_memories_contexts",- "columnsFrom": ["context_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "context_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42106,8 +48260,12 @@"name": "user_memories_context_projects_project_id_projects_id_fk","tableFrom": "user_memories_context_projects","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42115,8 +48273,12 @@"name": "user_memories_context_projects_user_id_users_id_fk","tableFrom": "user_memories_context_projects","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -42392,8 +48554,12 @@"name": "user_memories_contexts_user_id_users_id_fk","tableFrom": "user_memories_contexts","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42401,8 +48567,12 @@"name": "user_memories_contexts_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_contexts","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -42681,8 +48851,12 @@"name": "user_memories_dossiers_context_id_user_memories_contexts_id_fk","tableFrom": "user_memories_dossiers","tableTo": "user_memories_contexts",- "columnsFrom": ["context_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "context_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -42690,8 +48864,12 @@"name": "user_memories_dossiers_user_id_users_id_fk","tableFrom": "user_memories_dossiers","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42699,8 +48877,12 @@"name": "user_memories_dossiers_workspace_id_workspaces_id_fk","tableFrom": "user_memories_dossiers","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42708,8 +48890,12 @@"name": "user_memories_dossiers_agent_id_agents_id_fk","tableFrom": "user_memories_dossiers","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42717,8 +48903,12 @@"name": "user_memories_dossiers_project_id_projects_id_fk","tableFrom": "user_memories_dossiers","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42726,8 +48916,12 @@"name": "user_memories_dossiers_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_dossiers","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -42911,8 +49105,12 @@"name": "user_memories_edges_source_memory_id_user_memories_id_fk","tableFrom": "user_memories_edges","tableTo": "user_memories",- "columnsFrom": ["source_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42920,8 +49118,12 @@"name": "user_memories_edges_target_memory_id_user_memories_id_fk","tableFrom": "user_memories_edges","tableTo": "user_memories",- "columnsFrom": ["target_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "target_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42929,8 +49131,12 @@"name": "user_memories_edges_user_id_users_id_fk","tableFrom": "user_memories_edges","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -42938,8 +49144,12 @@"name": "user_memories_edges_workspace_id_workspaces_id_fk","tableFrom": "user_memories_edges","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -43216,8 +49426,12 @@"name": "user_memories_entities_parent_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_entities","tableTo": "user_memories_entities",- "columnsFrom": ["parent_entity_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_entity_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -43225,8 +49439,12 @@"name": "user_memories_entities_user_id_users_id_fk","tableFrom": "user_memories_entities","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43234,8 +49452,12 @@"name": "user_memories_entities_workspace_id_workspaces_id_fk","tableFrom": "user_memories_entities","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43243,8 +49465,12 @@"name": "user_memories_entities_agent_id_agents_id_fk","tableFrom": "user_memories_entities","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43252,8 +49478,12 @@"name": "user_memories_entities_project_id_projects_id_fk","tableFrom": "user_memories_entities","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43261,8 +49491,12 @@"name": "user_memories_entities_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_entities","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -43425,8 +49659,12 @@"name": "user_memories_entity_names_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_entity_names","tableTo": "user_memories_entities",- "columnsFrom": ["entity_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "entity_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43434,8 +49672,12 @@"name": "user_memories_entity_names_user_id_users_id_fk","tableFrom": "user_memories_entity_names","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43443,8 +49685,12 @@"name": "user_memories_entity_names_workspace_id_workspaces_id_fk","tableFrom": "user_memories_entity_names","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43452,8 +49698,12 @@"name": "user_memories_entity_names_source_memory_id_user_memories_id_fk","tableFrom": "user_memories_entity_names","tableTo": "user_memories",- "columnsFrom": ["source_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -43688,8 +49938,12 @@"name": "user_memories_experiences_user_id_users_id_fk","tableFrom": "user_memories_experiences","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43697,8 +49951,12 @@"name": "user_memories_experiences_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_experiences","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -43897,8 +50155,12 @@"name": "user_memories_identities_user_id_users_id_fk","tableFrom": "user_memories_identities","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43906,8 +50168,12 @@"name": "user_memories_identities_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_identities","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -43915,8 +50181,12 @@"name": "user_memories_identities_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_identities","tableTo": "user_memories_entities",- "columnsFrom": ["entity_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "entity_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -44098,8 +50368,12 @@"name": "user_memories_operations_user_id_users_id_fk","tableFrom": "user_memories_operations","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -44107,8 +50381,12 @@"name": "user_memories_operations_workspace_id_workspaces_id_fk","tableFrom": "user_memories_operations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -44308,8 +50586,12 @@"name": "user_memory_persona_document_histories_user_id_users_id_fk","tableFrom": "user_memory_persona_document_histories","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -44317,8 +50599,12 @@"name": "user_memory_persona_document_histories_persona_id_user_memory_persona_documents_id_fk","tableFrom": "user_memory_persona_document_histories","tableTo": "user_memory_persona_documents",- "columnsFrom": ["persona_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "persona_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -44461,8 +50747,12 @@"name": "user_memory_persona_documents_user_id_users_id_fk","tableFrom": "user_memory_persona_documents","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -44687,8 +50977,12 @@"name": "user_memories_preferences_user_id_users_id_fk","tableFrom": "user_memories_preferences","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -44696,8 +50990,12 @@"name": "user_memories_preferences_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_preferences","tableTo": "user_memories",- "columnsFrom": ["user_memory_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_memory_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -44705,8 +51003,12 @@"name": "user_memories_preferences_holder_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_preferences","tableTo": "user_memories_entities",- "columnsFrom": ["holder_entity_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "holder_entity_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -44714,8 +51016,12 @@"name": "user_memories_preferences_applies_to_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_preferences","tableTo": "user_memories_entities",- "columnsFrom": ["applies_to_entity_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "applies_to_entity_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -45005,8 +51311,12 @@"name": "acceptances_user_id_users_id_fk","tableFrom": "acceptances","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45014,8 +51324,12 @@"name": "acceptances_workspace_id_workspaces_id_fk","tableFrom": "acceptances","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45023,8 +51337,12 @@"name": "acceptances_project_id_projects_id_fk","tableFrom": "acceptances","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -45411,8 +51729,12 @@"name": "verify_check_results_verify_run_id_verify_runs_id_fk","tableFrom": "verify_check_results","tableTo": "verify_runs",- "columnsFrom": ["verify_run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "verify_run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45420,8 +51742,12 @@"name": "verify_check_results_operation_id_agent_operations_id_fk","tableFrom": "verify_check_results","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45429,8 +51755,12 @@"name": "verify_check_results_user_id_users_id_fk","tableFrom": "verify_check_results","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45438,8 +51768,12 @@"name": "verify_check_results_workspace_id_workspaces_id_fk","tableFrom": "verify_check_results","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45447,8 +51781,12 @@"name": "verify_check_results_source_criterion_id_verify_criteria_id_fk","tableFrom": "verify_check_results","tableTo": "verify_criteria",- "columnsFrom": ["source_criterion_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_criterion_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45456,8 +51794,12 @@"name": "verify_check_results_verifier_operation_id_agent_operations_id_fk","tableFrom": "verify_check_results","tableTo": "agent_operations",- "columnsFrom": ["verifier_operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "verifier_operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45465,8 +51807,12 @@"name": "verify_check_results_verifier_tracing_id_llm_generation_tracing_id_fk","tableFrom": "verify_check_results","tableTo": "llm_generation_tracing",- "columnsFrom": ["verifier_tracing_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "verifier_tracing_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45474,8 +51820,12 @@"name": "verify_check_results_repair_operation_id_agent_operations_id_fk","tableFrom": "verify_check_results","tableTo": "agent_operations",- "columnsFrom": ["repair_operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "repair_operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -45662,8 +52012,12 @@"name": "verify_criteria_user_id_users_id_fk","tableFrom": "verify_criteria","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45671,8 +52025,12 @@"name": "verify_criteria_document_id_documents_id_fk","tableFrom": "verify_criteria","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45680,8 +52038,12 @@"name": "verify_criteria_workspace_id_workspaces_id_fk","tableFrom": "verify_criteria","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -45859,8 +52221,12 @@"name": "verify_evidence_check_result_id_verify_check_results_id_fk","tableFrom": "verify_evidence","tableTo": "verify_check_results",- "columnsFrom": ["check_result_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "check_result_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45868,8 +52234,12 @@"name": "verify_evidence_document_id_documents_id_fk","tableFrom": "verify_evidence","tableTo": "documents",- "columnsFrom": ["document_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "document_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45877,8 +52247,12 @@"name": "verify_evidence_file_id_files_id_fk","tableFrom": "verify_evidence","tableTo": "files",- "columnsFrom": ["file_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "file_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -45886,8 +52260,12 @@"name": "verify_evidence_user_id_users_id_fk","tableFrom": "verify_evidence","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -45895,8 +52273,12 @@"name": "verify_evidence_workspace_id_workspaces_id_fk","tableFrom": "verify_evidence","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -46086,8 +52468,12 @@"name": "verify_reports_verify_run_id_verify_runs_id_fk","tableFrom": "verify_reports","tableTo": "verify_runs",- "columnsFrom": ["verify_run_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "verify_run_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46095,8 +52481,12 @@"name": "verify_reports_operation_id_agent_operations_id_fk","tableFrom": "verify_reports","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -46104,8 +52494,12 @@"name": "verify_reports_user_id_users_id_fk","tableFrom": "verify_reports","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46113,8 +52507,12 @@"name": "verify_reports_workspace_id_workspaces_id_fk","tableFrom": "verify_reports","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -46364,8 +52762,12 @@"name": "verify_review_predictions_check_result_id_verify_check_results_id_fk","tableFrom": "verify_review_predictions","tableTo": "verify_check_results",- "columnsFrom": ["check_result_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "check_result_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46373,8 +52775,12 @@"name": "verify_review_predictions_user_id_users_id_fk","tableFrom": "verify_review_predictions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46382,8 +52788,12 @@"name": "verify_review_predictions_workspace_id_workspaces_id_fk","tableFrom": "verify_review_predictions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -46493,8 +52903,12 @@"name": "verify_rubric_criteria_rubric_id_verify_rubrics_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "verify_rubrics",- "columnsFrom": ["rubric_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "rubric_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46502,8 +52916,12 @@"name": "verify_rubric_criteria_criterion_id_verify_criteria_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "verify_criteria",- "columnsFrom": ["criterion_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "criterion_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46511,8 +52929,12 @@"name": "verify_rubric_criteria_user_id_users_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46520,8 +52942,12 @@"name": "verify_rubric_criteria_workspace_id_workspaces_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -46529,7 +52955,10 @@"compositePrimaryKeys": {"verify_rubric_criteria_rubric_id_criterion_id_pk": {"name": "verify_rubric_criteria_rubric_id_criterion_id_pk",- "columns": ["rubric_id", "criterion_id"]+ "columns": [+ "rubric_id",+ "criterion_id"+ ]}},"uniqueConstraints": {},@@ -46638,8 +53067,12 @@"name": "verify_rubrics_user_id_users_id_fk","tableFrom": "verify_rubrics","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46647,8 +53080,12 @@"name": "verify_rubrics_workspace_id_workspaces_id_fk","tableFrom": "verify_rubrics","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -46920,8 +53357,12 @@"name": "verify_runs_user_id_users_id_fk","tableFrom": "verify_runs","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46929,8 +53370,12 @@"name": "verify_runs_workspace_id_workspaces_id_fk","tableFrom": "verify_runs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -46938,8 +53383,12 @@"name": "verify_runs_acceptance_id_acceptances_id_fk","tableFrom": "verify_runs","tableTo": "acceptances",- "columnsFrom": ["acceptance_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "acceptance_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -46947,8 +53396,12 @@"name": "verify_runs_operation_id_agent_operations_id_fk","tableFrom": "verify_runs","tableTo": "agent_operations",- "columnsFrom": ["operation_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "operation_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -47154,8 +53607,12 @@"name": "widget_runs_widget_id_widgets_id_fk","tableFrom": "widget_runs","tableTo": "widgets",- "columnsFrom": ["widget_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "widget_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47163,8 +53620,12 @@"name": "widget_runs_version_id_widget_versions_id_fk","tableFrom": "widget_runs","tableTo": "widget_versions",- "columnsFrom": ["version_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "version_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47172,8 +53633,12 @@"name": "widget_runs_user_id_users_id_fk","tableFrom": "widget_runs","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47181,8 +53646,12 @@"name": "widget_runs_workspace_id_workspaces_id_fk","tableFrom": "widget_runs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -47443,8 +53912,12 @@"name": "widget_versions_widget_id_widgets_id_fk","tableFrom": "widget_versions","tableTo": "widgets",- "columnsFrom": ["widget_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "widget_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47452,8 +53925,12 @@"name": "widget_versions_user_id_users_id_fk","tableFrom": "widget_versions","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47461,8 +53938,12 @@"name": "widget_versions_workspace_id_workspaces_id_fk","tableFrom": "widget_versions","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47470,8 +53951,12 @@"name": "widget_versions_published_by_user_id_users_id_fk","tableFrom": "widget_versions","tableTo": "users",- "columnsFrom": ["published_by_user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "published_by_user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -47479,8 +53964,12 @@"name": "widget_versions_source_agent_id_agents_id_fk","tableFrom": "widget_versions","tableTo": "agents",- "columnsFrom": ["source_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -47488,8 +53977,12 @@"name": "widget_versions_source_topic_id_topics_id_fk","tableFrom": "widget_versions","tableTo": "topics",- "columnsFrom": ["source_topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "source_topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -47497,8 +53990,12 @@"name": "widget_versions_parent_version_id_widget_versions_id_fk","tableFrom": "widget_versions","tableTo": "widget_versions",- "columnsFrom": ["parent_version_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "parent_version_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -47868,8 +54365,12 @@"name": "widgets_user_id_users_id_fk","tableFrom": "widgets","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47877,8 +54378,12 @@"name": "widgets_workspace_id_workspaces_id_fk","tableFrom": "widgets","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47886,8 +54391,12 @@"name": "widgets_project_id_projects_id_fk","tableFrom": "widgets","tableTo": "projects",- "columnsFrom": ["project_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "project_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47895,8 +54404,12 @@"name": "widgets_agent_id_agents_id_fk","tableFrom": "widgets","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -47904,8 +54417,12 @@"name": "widgets_published_version_id_widget_versions_id_fk","tableFrom": "widgets","tableTo": "widget_versions",- "columnsFrom": ["published_version_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "published_version_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -47913,8 +54430,12 @@"name": "widgets_draft_version_id_widget_versions_id_fk","tableFrom": "widgets","tableTo": "widget_versions",- "columnsFrom": ["draft_version_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "draft_version_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -47922,8 +54443,12 @@"name": "widgets_metric_id_metrics_id_fk","tableFrom": "widgets","tableTo": "metrics",- "columnsFrom": ["metric_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "metric_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -48237,8 +54762,12 @@"name": "work_versions_work_id_works_id_fk","tableFrom": "work_versions","tableTo": "works",- "columnsFrom": ["work_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "work_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -48246,8 +54775,12 @@"name": "work_versions_topic_id_topics_id_fk","tableFrom": "work_versions","tableTo": "topics",- "columnsFrom": ["topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -48255,8 +54788,12 @@"name": "work_versions_thread_id_threads_id_fk","tableFrom": "work_versions","tableTo": "threads",- "columnsFrom": ["thread_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "thread_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -48264,8 +54801,12 @@"name": "work_versions_message_id_messages_id_fk","tableFrom": "work_versions","tableTo": "messages",- "columnsFrom": ["message_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "message_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -48273,8 +54814,12 @@"name": "work_versions_agent_id_agents_id_fk","tableFrom": "work_versions","tableTo": "agents",- "columnsFrom": ["agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -48663,8 +55208,12 @@"name": "works_origin_topic_id_topics_id_fk","tableFrom": "works","tableTo": "topics",- "columnsFrom": ["origin_topic_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "origin_topic_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -48672,8 +55221,12 @@"name": "works_origin_thread_id_threads_id_fk","tableFrom": "works","tableTo": "threads",- "columnsFrom": ["origin_thread_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "origin_thread_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -48681,8 +55234,12 @@"name": "works_origin_agent_id_agents_id_fk","tableFrom": "works","tableTo": "agents",- "columnsFrom": ["origin_agent_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "origin_agent_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"},@@ -48690,8 +55247,12 @@"name": "works_user_id_users_id_fk","tableFrom": "works","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -48699,8 +55260,12 @@"name": "works_workspace_id_workspaces_id_fk","tableFrom": "works","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -48824,8 +55389,12 @@"name": "workspace_audit_logs_workspace_id_workspaces_id_fk","tableFrom": "workspace_audit_logs","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -48979,8 +55548,12 @@"name": "workspace_invitations_workspace_id_workspaces_id_fk","tableFrom": "workspace_invitations","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -48988,8 +55561,12 @@"name": "workspace_invitations_inviter_id_users_id_fk","tableFrom": "workspace_invitations","tableTo": "users",- "columnsFrom": ["inviter_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "inviter_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -48999,7 +55576,9 @@"workspace_invitations_token_unique": {"name": "workspace_invitations_token_unique","nullsNotDistinct": false,- "columns": ["token"]+ "columns": [+ "token"+ ]}},"policies": {},@@ -49112,8 +55691,12 @@"name": "workspace_members_workspace_id_workspaces_id_fk","tableFrom": "workspace_members","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -49121,8 +55704,12 @@"name": "workspace_members_user_id_users_id_fk","tableFrom": "workspace_members","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -49130,7 +55717,10 @@"compositePrimaryKeys": {"workspace_members_workspace_id_user_id_pk": {"name": "workspace_members_workspace_id_user_id_pk",- "columns": ["workspace_id", "user_id"]+ "columns": [+ "workspace_id",+ "user_id"+ ]}},"uniqueConstraints": {},@@ -49246,8 +55836,12 @@"name": "workspace_team_members_workspace_id_workspaces_id_fk","tableFrom": "workspace_team_members","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -49255,8 +55849,12 @@"name": "workspace_team_members_user_id_users_id_fk","tableFrom": "workspace_team_members","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -49264,8 +55862,14 @@"name": "workspace_team_members_team_workspace_fk","tableFrom": "workspace_team_members","tableTo": "workspace_teams",- "columnsFrom": ["team_id", "workspace_id"],- "columnsTo": ["id", "workspace_id"],+ "columnsFrom": [+ "team_id",+ "workspace_id"+ ],+ "columnsTo": [+ "id",+ "workspace_id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -49395,8 +55999,12 @@"name": "workspace_teams_workspace_id_workspaces_id_fk","tableFrom": "workspace_teams","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -49404,8 +56012,12 @@"name": "workspace_teams_created_by_users_id_fk","tableFrom": "workspace_teams","tableTo": "users",- "columnsFrom": ["created_by"],- "columnsTo": ["id"],+ "columnsFrom": [+ "created_by"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "set null","onUpdate": "no action"}@@ -49415,7 +56027,10 @@"workspace_teams_id_workspace_unique": {"name": "workspace_teams_id_workspace_unique","nullsNotDistinct": false,- "columns": ["id", "workspace_id"]+ "columns": [+ "id",+ "workspace_id"+ ]}},"policies": {},@@ -49510,8 +56125,12 @@"name": "workspace_user_settings_workspace_id_workspaces_id_fk","tableFrom": "workspace_user_settings","tableTo": "workspaces",- "columnsFrom": ["workspace_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "workspace_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"},@@ -49519,8 +56138,12 @@"name": "workspace_user_settings_user_id_users_id_fk","tableFrom": "workspace_user_settings","tableTo": "users",- "columnsFrom": ["user_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "user_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -49649,8 +56272,12 @@"name": "workspaces_primary_owner_id_users_id_fk","tableFrom": "workspaces","tableTo": "users",- "columnsFrom": ["primary_owner_id"],- "columnsTo": ["id"],+ "columnsFrom": [+ "primary_owner_id"+ ],+ "columnsTo": [+ "id"+ ],"onDelete": "cascade","onUpdate": "no action"}@@ -49662,6 +56289,26 @@"isRLSEnabled": false}},- "version": "7",- "views": {}-}+ "enums": {},+ "schemas": {},+ "sequences": {+ "public.fts_search_sync_revision_seq": {+ "name": "fts_search_sync_revision_seq",+ "schema": "public",+ "increment": "1",+ "startWith": "1",+ "minValue": "1",+ "maxValue": "9223372036854775807",+ "cache": "1",+ "cycle": false+ }+ },+ "roles": {},+ "policies": {},+ "views": {},+ "_meta": {+ "columns": {},+ "schemas": {},+ "tables": {}+ }+}\ No newline at end of filediff --git a/packages/database/migrations/meta/_journal.json b/packages/database/migrations/meta/_journal.jsonindex 723adb270bb..a0c6151f816 100644--- a/packages/database/migrations/meta/_journal.json+++ b/packages/database/migrations/meta/_journal.json@@ -1561,7 +1561,14 @@"when": 1795064606437,"tag": "0222_agent_skill_upstream","breakpoints": true+ },+ {+ "idx": 223,+ "version": "7",+ "when": 1795082781704,+ "tag": "0223_running_operations_and_message_author_indexes",+ "breakpoints": true}],"version": "6"-}+}\ No newline at end of filediff --git a/packages/database/src/schemas/agentOperations.ts b/packages/database/src/schemas/agentOperations.tsindex 3828cf98301..59bdfb5fbd7 100644--- a/packages/database/src/schemas/agentOperations.ts+++ b/packages/database/src/schemas/agentOperations.ts@@ -4,6 +4,7 @@ import type {AgentOperationStatus,VerifyCheckItem,} from '@lobechat/types';+import { sql } from 'drizzle-orm';import { boolean, index, integer, jsonb, pgTable, text } from 'drizzle-orm/pg-core';import { amountNumeric, timestamps, timestamptz } from './_helpers';@@ -145,6 +146,14 @@ export const agentOperations = pgTable(index('agent_operations_chat_group_id_idx').on(t.chatGroupId),index('agent_operations_parent_operation_id_idx').on(t.parentOperationId),index('agent_operations_status_idx').on(t.status),+ /**+ * Live-run scans of `StaleOperationReaper`. Keyed on `created_at` rather+ * than `updated_at` on purpose: every write bumps `updated_at`, so an+ * index on it would cost the table its HOT updates.+ */+ index('agent_operations_running_created_at_idx')+ .on(t.createdAt)+ .where(sql`${t.status} = 'running'`),index('agent_operations_user_id_created_at_idx').on(t.userId, t.createdAt),index('agent_operations_workspace_id_created_at_idx').on(t.workspaceId, t.createdAt),index('agent_operations_metadata_idx').using('gin', t.metadata),diff --git a/packages/database/src/schemas/message.ts b/packages/database/src/schemas/message.tsindex 58392521fbe..e409cec8134 100644--- a/packages/database/src/schemas/message.ts+++ b/packages/database/src/schemas/message.ts@@ -163,6 +163,12 @@ export const messages = pgTable(index('messages_quota_id_idx').on(table.quotaId),index('messages_user_id_idx').on(table.userId),+ /**+ * Author counts joined to their topic's scope (workspace usage stats):+ * lets them read `topic_id` from the index instead of fetching every+ * message the user ever wrote from the heap.+ */+ index('messages_user_id_topic_id_idx').on(table.userId, table.topicId),index('messages_session_id_idx').on(table.sessionId),index('messages_thread_id_idx').on(table.threadId),index('messages_agent_id_idx').on(table.agentId),