Skip to content

docs(proxy): document the pre-migration row check and --check_migrations_against_existing_data - #2635

Merged
kerry-berri merged 1 commit into
mainfrom
litellm_check_migrations_against_existing_data_docs
Oct 27, 2026
Merged

kerry-berri merged 1 commit into
mainfrom
litellm_check_migrations_against_existing_data_docs

Conversation

@kerry-berri

Copy link
Copy Markdown
Contributor

Summary

Documents the pre-migration row check that landed in litellm with #48493, from v1.108.0: the migration job reads the rows a pending schema change depends on before prisma migrate deploy and refuses with a named report when they would make the change fail, and litellm --check_migrations_against_existing_data runs the same check on its own against a database before an upgrade

Three pages change. docs/proxy/upgrade_guide.md gets a "Check the rows before the schema" section under "Before you upgrade" with the docker command, the exit codes, the report as it prints, which statement kinds get a check, LITELLM_MIGRATION_DATA_CHECK_TIMEOUT, and what the check cannot see, plus one sentence in "Custom deployments" saying --skip_server_startup now runs it first. docs/troubleshoot/prisma_migrations.md gets section 6 for the refusal text, with the symptom on v1.108.0 and later, the symptom on v1.103.0 to v1.107.x (the index row size ... exceeds btree version 4 maximum 2704 failure, inside the migration on v1.103.x and v1.104.x, as an INVALID request-log index from v1.105.0), the cause (raw keys written before v1.99.0, 2684 bytes left for api_key next to startTime), the count query, the hash UPDATE, and the cleanup of an invalid index or a failed migration entry on older versions. docs/proxy/cli.md gets the flag under Database Configuration

Version facts checked against the litellm tags: the index migration 20260823000000_add_spend_logs_api_key_starttime_index first ships in v1.103.0, litellm#43948 moved the build into the job in v1.105.0, and main is at 1.108.0

Link to Devin session: https://app.devin.ai/sessions/14b2bd229edf4b11a3220d90993f6708
Open in Devin Desktop: https://app.devin.ai/desktop/session/14b2bd229edf4b11a3220d90993f6708?variant=devin
Requested by: @kerry-berri

…ons_against_existing_data

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
litellm Ready Ready Preview Oct 27, 2026 7:22pm UTC

Request Review

@kerry-berri
kerry-berri enabled auto-merge (squash) October 27, 2026 19:20
@kerry-berri
kerry-berri merged commit 7c642b8 into main Oct 27, 2026
6 checks passed
@kerry-berri
kerry-berri deleted the litellm_check_migrations_against_existing_data_docs branch October 27, 2026 19:25

This branch was previously deployed

1 inactive deployment
Preview — 3eeca881 Deployed Oct 27, 2026 by vercel[bot]
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.

1 participant