SQL

CREATE TABLE "agent_chat_subscriptions"  (
  "agentId" varchar(36) NOT NULL,
  "integrationType" varchar(64) NOT NULL,
  "credentialId" varchar(255) NOT NULL,
  "threadId" varchar(255) NOT NULL,
  "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')),
  "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')),
  CONSTRAINT "CHK_agent_chat_subscriptions_integrationType" CHECK ("integrationType" IN ('telegram', 'slack', 'linear')),
  CONSTRAINT "FK_e79153bd179c011e779d5016796" FOREIGN KEY ("agentId") REFERENCES "agents" ("id") ON DELETE CASCADE,
  PRIMARY KEY ("agentId", "integrationType", "credentialId", "threadId")
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
agentId varchar(36) Rename | Drop
integrationType varchar(64) Rename | Drop
credentialId varchar(255) Rename | Drop
threadId varchar(255) Rename | Drop
createdAt datetime(3) Rename | Drop
updatedAt datetime(3) Rename | Drop

Foreign Keys

Column Destination
agentId agents.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
sqlite_autoindex_agent_chat_subscriptions_1
  • agentId
  • integrationType
  • credentialId
  • threadId
SQL
-- no sql found --
Drop