mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
feat(v2 managed agents): hand-written migration for managed_agent tables
This commit is contained in:
parent
071895cd07
commit
d0c27c1fd5
1 changed files with 42 additions and 0 deletions
|
|
@ -0,0 +1,42 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE IF NOT EXISTS "LiteLLM_ManagedAgent" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"config" JSONB NOT NULL,
|
||||
"created_by" TEXT,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "LiteLLM_ManagedAgent_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE IF NOT EXISTS "LiteLLM_ManagedAgentSession" (
|
||||
"id" TEXT NOT NULL,
|
||||
"agent_id" TEXT NOT NULL,
|
||||
"sandbox_type" TEXT NOT NULL,
|
||||
"sandbox_size" TEXT NOT NULL,
|
||||
"sandbox_timeout_minutes" INTEGER NOT NULL,
|
||||
"sandbox_idle_timeout_minutes" INTEGER NOT NULL,
|
||||
"sandbox_image" TEXT,
|
||||
"sandbox_url" TEXT,
|
||||
"sandbox_metadata" JSONB,
|
||||
"status" TEXT NOT NULL DEFAULT 'provisioning',
|
||||
"repos" JSONB,
|
||||
"env_vars" JSONB,
|
||||
"created_by" TEXT,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL,
|
||||
"terminated_at" TIMESTAMP(3),
|
||||
|
||||
CONSTRAINT "LiteLLM_ManagedAgentSession_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX IF NOT EXISTS "LiteLLM_ManagedAgentSession_agent_id_idx" ON "LiteLLM_ManagedAgentSession"("agent_id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX IF NOT EXISTS "LiteLLM_ManagedAgentSession_created_by_idx" ON "LiteLLM_ManagedAgentSession"("created_by");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX IF NOT EXISTS "LiteLLM_ManagedAgentSession_status_idx" ON "LiteLLM_ManagedAgentSession"("status");
|
||||
Loading…
Add table
Reference in a new issue