-
2.30.1
Stablereleased this
2026-09-06 19:53:12 +02:00 | 89 commits to main since this releaseMake 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
a390332fa722ran an unconditionalop.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) removeddata_sourcefrom theTeammodel — so the baseline codifies ateamtable without the column. Any database built from the chain createsteamwithoutdata_sourceand 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
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads