Skip to content

litellm_fix: add migration for vector store team_id/user_id columns#20193

Closed
shin-bot-litellm wants to merge 1 commit intomainfrom
litellm_fix_vector_store_migration
Closed

litellm_fix: add migration for vector store team_id/user_id columns#20193
shin-bot-litellm wants to merge 1 commit intomainfrom
litellm_fix_vector_store_migration

Conversation

@shin-bot-litellm
Copy link
Contributor

Summary

Fixes CI failure in test_aaaasschema_migration_check.

Problem

PR #19972 (commit 9c5fed4) added team_id and user_id columns to LiteLLM_ManagedVectorStoresTable in schema.prisma but did not include the corresponding migration file.

Solution

Add the missing migration file with:

  • team_id TEXT column
  • user_id TEXT column
  • Indexes on both columns

Regression

9c5fed4

Testing

This migration was generated by prisma migrate diff based on the schema changes.

Fixes CI failure in test_aaaasschema_migration_check.

PR #19972 (commit 9c5fed4) added team_id and user_id columns to
LiteLLM_ManagedVectorStoresTable in schema.prisma but didn't include
the corresponding migration file.

Regression: 9c5fed4
@vercel
Copy link

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Error Error Jan 31, 2026 10:47pm

Request Review

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 31, 2026

Greptile Overview

Greptile Summary

This PR adds the missing database migration file for team_id and user_id columns that were added to LiteLLM_ManagedVectorStoresTable in PR #19972. The migration correctly:

  • Adds two nullable TEXT columns (team_id and user_id) to the existing table
  • Creates indexes on both columns to enable efficient queries by team or user
  • Matches the schema definition exactly (lines 763-767 in schema.prisma)

The migration follows the standard Prisma migration format and aligns with the schema changes. This resolves the CI test failure in test_aaaasschema_migration_check which validates that all schema changes have corresponding migration files.

Confidence Score: 5/5

  • This PR is safe to merge - it's a straightforward database migration fix
  • Migration correctly adds nullable columns with indexes that match the schema definition, fixing a CI test failure without affecting existing data or runtime behavior
  • No files require special attention

Important Files Changed

Filename Overview
litellm-proxy-extras/litellm_proxy_extras/migrations/20260131_add_team_user_to_vector_stores/migration.sql Adds team_id and user_id TEXT columns to LiteLLM_ManagedVectorStoresTable with indexes on both columns

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant PR as PR #19972
    participant Schema as schema.prisma
    participant DB as Database
    participant Migration as Migration Script
    participant CI as CI Tests
    
    Note over Dev,PR: Original PR #19972
    Dev->>Schema: Add team_id and user_id fields
    Dev->>Schema: Add indexes on team_id and user_id
    PR->>CI: Run tests (missing migration)
    CI-->>PR: ❌ test_aaaasschema_migration_check fails
    
    Note over Dev,Migration: This PR (Fix)
    Dev->>Migration: Generate migration.sql
    Migration->>DB: ALTER TABLE ADD COLUMN team_id TEXT
    Migration->>DB: ALTER TABLE ADD COLUMN user_id TEXT
    Migration->>DB: CREATE INDEX on team_id
    Migration->>DB: CREATE INDEX on user_id
    DB-->>Migration: ✓ Schema synchronized
    Migration->>CI: Run schema migration check
    CI-->>Migration: ✓ Tests pass
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants