Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Add missing migration for LiteLLM_ToolTable policy changes

Julio Quinteros Prod8d3375a3ccc
diff --git a/litellm-proxy-extras/litellm_proxy_extras/migrations/20260303000000_update_tool_table_policies/migration.sql b/litellm-proxy-extras/litellm_proxy_extras/migrations/20260303000000_update_tool_table_policies/migration.sql
new file mode 100644
index 00000000000..2e2d722ed4c
--- /dev/null
+++ b/litellm-proxy-extras/litellm_proxy_extras/migrations/20260303000000_update_tool_table_policies/migration.sql
@@ -0,0 +1,20 @@
+-- Rename call_policy to input_policy
+ALTER TABLE "LiteLLM_ToolTable" RENAME COLUMN "call_policy" TO "input_policy";
+
+-- Add output_policy column
+ALTER TABLE "LiteLLM_ToolTable" ADD COLUMN "output_policy" TEXT NOT NULL DEFAULT 'untrusted';
+
+-- Add user_agent column
+ALTER TABLE "LiteLLM_ToolTable" ADD COLUMN "user_agent" TEXT;
+
+-- Add last_used_at column
+ALTER TABLE "LiteLLM_ToolTable" ADD COLUMN "last_used_at" TIMESTAMP(3);
+
+-- Drop old index on call_policy
+DROP INDEX IF EXISTS "LiteLLM_ToolTable_call_policy_idx";
+
+-- CreateIndex
+CREATE INDEX "LiteLLM_ToolTable_input_policy_idx" ON "LiteLLM_ToolTable"("input_policy");
+
+-- CreateIndex
+CREATE INDEX "LiteLLM_ToolTable_output_policy_idx" ON "LiteLLM_ToolTable"("output_policy");