2.2 KiB
2.2 KiB
title, status, type, priority, created_at, updated_at, parent
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| Seed moves and abilities tables (names + introduced generation) | completed | task | normal | 2026-03-20T15:11:44Z | 2026-03-20T15:25:11Z | nuzlocke-tracker-neqv |
Create and seed moves and abilities tables with name and generation data using the hybrid approach.
Approach
Seed move/ability names with introduced_gen only. Full generation-specific stats (power, accuracy, type changes, effect text) will be added in a follow-up bean.
This enables FK references and autocomplete from boss pokemon fields without blocking on a full moves database.
Checklist
- Migration: Create
movestable (id,name,introduced_gen,typeoptional) - Migration: Create
abilitiestable (id,name,introduced_gen) - Models: Create
MoveandAbilitySQLAlchemy models - Seed data: Seed all move names with introduced generation (source: PokeAPI or Bulbapedia)
- Seed data: Seed all ability names with introduced generation
- Seed script: Add to existing seeding pipeline (
backend/src/app/seed/) - Schemas: Create basic response schemas for API consumption
Summary of Changes
Migration
- Created
j1e2f3a4b5c6_add_moves_and_abilities_tables.pymigration movestable:id,name(unique),introduced_gen,type(optional)abilitiestable:id,name(unique),introduced_gen- Added indexes on
introduced_genfor both tables
Models
backend/src/app/models/move.py:MoveSQLAlchemy modelbackend/src/app/models/ability.py:AbilitySQLAlchemy model- Updated
models/__init__.pyto export both
Schemas
backend/src/app/schemas/move.py:MoveResponse,AbilityResponse, and paginated variants- Updated
schemas/__init__.pyto export all new schemas
Seed Data
- Created
backend/scripts/fetch_moves_abilities.pyto fetch data from PokeAPI - Generated
moves.json(937 moves) andabilities.json(367 abilities) - Data includes name, introduced generation, and type (for moves)
Seed Pipeline
- Added
upsert_movesandupsert_abilitiesfunctions toloader.py - Updated
run.pyto seed moves and abilities after Pokemon - Updated
verify()to include move/ability counts