From 5b007add62e2d2bd31eaad6dbf4e988c7e0246ea Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Tue, 21 Apr 2026 12:07:19 -0700 Subject: [PATCH] [Docs] Fix docstring inaccuracies in run_migration.py - _find_destructive_statements: add DROP INDEX to the docstring (the regex already detects it; only the docstring lagged). - create_migration: correct the base_branch default documented in the docstring from "main" to "litellm_internal_staging". --- ci_cd/run_migration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci_cd/run_migration.py b/ci_cd/run_migration.py index 1cbe9fb59d..feec4046ee 100644 --- a/ci_cd/run_migration.py +++ b/ci_cd/run_migration.py @@ -15,7 +15,7 @@ DEFAULT_BASE_BRANCH = "litellm_internal_staging" def _find_destructive_statements(sql: str) -> list: - """Return SQL lines containing DROP COLUMN or DROP TABLE.""" + """Return SQL lines containing DROP COLUMN, DROP TABLE, or DROP INDEX.""" return [ line.strip() for line in sql.splitlines() if DESTRUCTIVE_PATTERN.search(line) ] @@ -210,7 +210,8 @@ def create_migration( allow_destructive (bool): Required to write a migration that contains DROP COLUMN, DROP TABLE, or DROP INDEX statements. Without this flag, the script exits non-zero and prints guidance. - base_branch (str): Branch to check freshness against (default: "main"). + base_branch (str): Branch to check freshness against + (default: "litellm_internal_staging"). skip_freshness_check (bool): Skip the "branch is up to date" check. Only for intentional migrations against an older base. """