mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-17 23:51:30 +00:00
feat(v2 managed agents): backstop UNIQUE(name, created_by) in migration SQL
This commit is contained in:
parent
218d43c1b1
commit
d2d9221322
1 changed files with 6 additions and 0 deletions
|
|
@ -40,3 +40,9 @@ CREATE INDEX IF NOT EXISTS "LiteLLM_ManagedAgentSession_created_by_idx" ON "Lite
|
|||
|
||||
-- CreateIndex
|
||||
CREATE INDEX IF NOT EXISTS "LiteLLM_ManagedAgentSession_status_idx" ON "LiteLLM_ManagedAgentSession"("status");
|
||||
|
||||
-- CreateIndex
|
||||
-- Backstop for the application-level (name, created_by) duplicate check —
|
||||
-- catches the read-then-write race when two concurrent POST /v2/agents
|
||||
-- requests both pass the pre-query and try to insert at the same time.
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS "LiteLLM_ManagedAgent_name_created_by_key" ON "LiteLLM_ManagedAgent"("name", "created_by");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue