Skip to content

armgit / crm

Public Imported from GitHub
0

Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM.

TypeScript
504 B
Raw Blame
ALTER TABLE "agentEvent"
ADD COLUMN "conversationId" TEXT;

UPDATE "agentEvent" AS event
SET "conversationId" = conversation.id
FROM "agentConversation" AS conversation
WHERE event."sessionId" = conversation."sessionId";

ALTER TABLE "agentEvent"
ADD CONSTRAINT "agentEvent_conversationId_fkey"
FOREIGN KEY ("conversationId") REFERENCES "agentConversation"("id")
ON DELETE CASCADE ON UPDATE CASCADE;

CREATE INDEX "agentEvent_conversationId_emittedAt_idx"
ON "agentEvent"("conversationId", "emittedAt");