WP-04: SQL Migration Script #69
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#69
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
SQL migration creating all five new tables (
player_season_stats+ four evolution tables) and addingvariantcolumn tocardandimage_urlcolumn tobattingcard/pitchingcard. Must be idempotent.Note:
evolution_milestone,evolution_progresstables are NOT created.image_formatcolumn is NOT added.Repo:
databasePhase: 1a (Schema & Data Foundation)
Dependencies: WP-01, WP-02
Complexity: M
Tables Created
player_season_statsevolution_trackevolution_card_stateevolution_tier_boost(Phase 2 stub)evolution_cosmetic(Phase 2 stub)Files
database/migrations/2026-XX-XX_add_evolution_tables.sqlTests (write first in
database/tests/test_evolution_migration.py)Acceptance Criteria
card.variantadded (INTEGER, NULL, DEFAULT NULL)battingcard.image_urladded (VARCHAR(500), NULL)pitchingcardPlan reference:
docs/prd-evolution/PHASE1_PROJECT_PLAN.mdWP-04PR #84 opened: #84
Created
migrations/2026-03-12_add_evolution_tables.sql— idempotent PostgreSQL migration that:player_season_stats,evolution_track,evolution_card_state,evolution_tier_boost(stub),evolution_cosmetic(stub)card.variant(INTEGER NULL DEFAULT NULL),battingcard.image_url(VARCHAR 500 NULL),pitchingcard.image_url(VARCHAR 500 NULL)IF NOT EXISTSthroughout; wrapped in BEGIN/COMMITSchema derived from WP-01 Peewee models (branch ai/paper-dynasty-database#67) —
evolution_trackusest1_threshold…t4_thresholdcolumn names to match the approved ORM model.Tests: 16 unit tests pass (SQL content validation); 6 integration tests auto-skip when
POSTGRES_HOSTis not set.Implemented and merged. Refractor system deployed to dev.