Skip to content

chore: remove obsolete startup migrations#233

Merged
adrunkhuman merged 1 commit intomasterfrom
issue-232-remove-obsolete-startup-migrations
May 10, 2026
Merged

chore: remove obsolete startup migrations#233
adrunkhuman merged 1 commit intomasterfrom
issue-232-remove-obsolete-startup-migrations

Conversation

@adrunkhuman
Copy link
Copy Markdown
Owner

Summary

  • Remove automatic startup migrations/backfills for historical database shapes
  • Keep fresh database initialization, but require existing databases to already match the current schema
  • Add startup validation for required columns, required conflict-target unique constraints, duplicate result rows, and invalid fixture guild ownership
  • Replace legacy migration-contract tests with current-schema restart and fail-fast validation tests

Live DB Verification

Ran the schema inspection command from #232 against /app/data/typer.db before opening this PR.

Observed:

  • required current columns exist for seasons, fixtures, predictions, results, scores, and guild_config
  • required unique indexes exist for predictions(fixture_id, user_id), results(fixture_id), scores(fixture_id, user_id), and guild_config(guild_id)
  • existing extra fixture columns announcement_message_id and thread_id are harmless and ignored
  • prior data-state check confirmed one active season, no fixtures without season_id, no foreign season references, and valid guild_config.active_season_id

Verification

  • uv run pytest --tb=short
  • uv run ruff check .
  • uv run ruff format --check .
  • uv run ty check typer_bot

Closes #232

@adrunkhuman adrunkhuman merged commit edbf42d into master May 10, 2026
1 check passed
@adrunkhuman adrunkhuman deleted the issue-232-remove-obsolete-startup-migrations branch May 10, 2026 18:25
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.

chore: remove obsolete startup compatibility migrations

1 participant