Add game data seeding from PokeAPI with level ranges
Seed the database with Pokemon game data for 5 games (FireRed, LeafGreen, Emerald, HeartGold, SoulSilver) using pokebase. Includes Alembic migrations for route unique constraints and encounter level ranges, a two-phase seed system (offline fetch to JSON, then idempotent upserts), and Dockerfile updates for the seed runner. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
backend/src/app/seeds/__main__.py
Normal file
21
backend/src/app/seeds/__main__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Entry point for running seeds.
|
||||
|
||||
Usage:
|
||||
python -m app.seeds # Run seed
|
||||
python -m app.seeds --verify # Run seed + verification
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import sys
|
||||
|
||||
from app.seeds.run import seed, verify
|
||||
|
||||
|
||||
async def main():
|
||||
await seed()
|
||||
if "--verify" in sys.argv:
|
||||
await verify()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user