Add game_id FK to BossBattle for version-exclusive bosses
All checks were successful
CI / backend-lint (pull_request) Successful in 8s
CI / frontend-lint (pull_request) Successful in 30s

Version-exclusive bosses (e.g., Bea in Sword, Allister in Shield) were
using the section field to indicate which game they belong to. This adds
a proper game_id foreign key so the API can filter bosses per game,
keeping section free for visual grouping like "Main Story".

- Alembic migration adds nullable game_id column with FK and index
- API list_bosses filters by game_id unless ?all=true is passed
- Seed data updated to use game_slug instead of section overloading
- Admin form adds "Game (version exclusive)" dropdown
- Export endpoints include game_slug for exclusive bosses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 11:00:48 +01:00
parent 3e7a6c9221
commit d8fb6c328c
17 changed files with 250 additions and 53 deletions

View File

@@ -0,0 +1,11 @@
---
# nuzlocke-tracker-zmvy
title: Add game_id field to BossBattle for version-exclusive bosses
status: completed
type: feature
priority: normal
created_at: 2026-02-14T09:47:40Z
updated_at: 2026-02-14T09:52:59Z
---
Add a proper game_id FK to BossBattle so version-exclusive bosses can be filtered per game instead of overloading the section field.