Add all Gen 1-9 games with colors to seed data
- Add 37 games from Gen 1-9 (Red/Blue through Scarlet/Violet) - Add color field to Game model matching box art/branding - Add migration for games.color column - Update fetch_pokeapi.py to fetch all games and output colors - Update seed loader to upsert game colors - Update frontend Game type to include color field Games without PokeAPI encounter data (ORAS, Let's Go, Sword/Shield, BDSP, Legends Arceus, Scarlet/Violet) have location structure but empty encounter tables. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ async def upsert_games(session: AsyncSession, games: list[dict]) -> dict[str, in
|
||||
generation=game["generation"],
|
||||
region=game["region"],
|
||||
release_year=game.get("release_year"),
|
||||
color=game.get("color"),
|
||||
).on_conflict_do_update(
|
||||
index_elements=["slug"],
|
||||
set_={
|
||||
@@ -27,6 +28,7 @@ async def upsert_games(session: AsyncSession, games: list[dict]) -> dict[str, in
|
||||
"generation": game["generation"],
|
||||
"region": game["region"],
|
||||
"release_year": game.get("release_year"),
|
||||
"color": game.get("color"),
|
||||
},
|
||||
)
|
||||
await session.execute(stmt)
|
||||
|
||||
Reference in New Issue
Block a user