• 2.30.1 b87cd13184

    2.30.1
    All checks were successful
    Build and push image / build-and-push (push) Successful in 2m2s
    Python FastAPI Jinja Linting / build (push) Successful in 30s
    Tests / pytest (push) Successful in 16s
    Stable

    johnsturgeon released this 2026-09-06 19:53:12 +02:00 | 89 commits to main since this release

    Make drop_team_data_source migration idempotent

    resolves #480

    Problem

    Production crashed running migrations:

    sqlalchemy.exc.ProgrammingError: (psycopg.errors.UndefinedColumn)
    column "data_source" of relation "team" does not exist
    [SQL: ALTER TABLE team DROP COLUMN data_source]
    

    The migration a390332fa722 ran an unconditional op.drop_column('team', 'data_source'), but no migration in the chain ever creates that column. The Alembic baseline (0c2ed4448b99) was auto-generated on 2026-08-31, after the Tank01 refactor (302663c, 2026-08-28) removed data_source from the Team model — so the baseline codifies a team table without the column. Any database built from the chain creates team without data_source and then tries to drop it → crash.

    Fix

    Use ALTER TABLE team DROP COLUMN IF EXISTS data_source, which:

    • drops the column on pre-baseline snapshots that still carry the ESPN-era field, and
    • is a safe no-op on any database built from the current baseline.

    Version bumped 2.30.0 → 2.30.1. Tests: 314 passed, pylint 10.00/10.

    🤖 Generated with Claude Code

    Issues closed

    • #480 Migration a390332fa722 crashes: drops non-existent team.data_source column

    Pull request: #479

    Downloads