mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 12:40:09 +01:00
25 lines
1.1 KiB
MySQL
25 lines
1.1 KiB
MySQL
|
-- AlterTable
|
||
|
ALTER TABLE "workspaces" ADD COLUMN "agentModel" TEXT;
|
||
|
ALTER TABLE "workspaces" ADD COLUMN "agentProvider" TEXT;
|
||
|
|
||
|
-- CreateTable
|
||
|
CREATE TABLE "workspace_agent_invocations" (
|
||
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||
|
"uuid" TEXT NOT NULL,
|
||
|
"prompt" TEXT NOT NULL,
|
||
|
"closed" BOOLEAN NOT NULL DEFAULT false,
|
||
|
"user_id" INTEGER,
|
||
|
"thread_id" INTEGER,
|
||
|
"workspace_id" INTEGER NOT NULL,
|
||
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||
|
"lastUpdatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||
|
CONSTRAINT "workspace_agent_invocations_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
||
|
CONSTRAINT "workspace_agent_invocations_workspace_id_fkey" FOREIGN KEY ("workspace_id") REFERENCES "workspaces" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||
|
);
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "workspace_agent_invocations_uuid_key" ON "workspace_agent_invocations"("uuid");
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE INDEX "workspace_agent_invocations_uuid_idx" ON "workspace_agent_invocations"("uuid");
|