docs: notes for bf-67io - SQL migration file already exists
The migration file migrations/0001_initial.sql was added in commit 31678be.
This bead was filed based on an outdated plan inventory.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
a304f1febd
commit
424aaf34d6
1 changed files with 25 additions and 24 deletions
|
|
@ -1,29 +1,30 @@
|
|||
# Bead bf-67io: SQL Migration File Verification
|
||||
# Bead bf-67io: SQL Migration File Already Exists
|
||||
|
||||
## Task
|
||||
Infra: SQL migration file (migrations/0001_initial.sql) — schema is embedded in db.go but no standalone migration file exists per §11.1 plan inventory
|
||||
## Status: COMPLETE (pre-existing)
|
||||
|
||||
## Status
|
||||
**ALREADY COMPLETE** - Work was done in commit 31678be prior to bead assignment
|
||||
## Finding
|
||||
The SQL migration file `migrations/0001_initial.sql` already exists in the codebase, added in commit 31678be.
|
||||
|
||||
## Verification
|
||||
- Migration file exists at: `migrations/0001_initial.sql`
|
||||
- Created in commit: `31678be` (2026-05-22 15:52:54)
|
||||
- Contains all 20 tables from `cmd/acb-api/db.go`:
|
||||
- bots, matches, match_participants, jobs, rating_history
|
||||
- seasons, season_snapshots, series, series_games
|
||||
- predictions, predictor_stats
|
||||
- maps, map_scores, map_votes, map_fairness
|
||||
- programs, playlists, playlist_matches
|
||||
- replay_feedback, feedback_upvotes
|
||||
- enrichment_requests
|
||||
## Migration File Location
|
||||
- **Path:** `migrations/0001_initial.sql`
|
||||
- **Commit:** 31678be "Infra: Add initial SQL migration file (0001_initial.sql)"
|
||||
- **Date:** 2026-05-21
|
||||
|
||||
## Schema Completeness
|
||||
All columns from `db.go` are present in the migration file, including:
|
||||
- `matches.combat_turns` (line 41)
|
||||
- `matches.enrichment_requested_at` (line 43)
|
||||
- `bots.debug_public` (line 30)
|
||||
- `series.bracket_round`, `bracket_position`, `featured` (lines 116-118)
|
||||
## Schema Coverage
|
||||
The migration file contains the complete initial schema including:
|
||||
- Core tables: bots, matches, match_participants, jobs, rating_history
|
||||
- Season & Series tables: seasons, season_snapshots, series, series_games
|
||||
- Prediction tables: predictions, predictor_stats
|
||||
- Map tables: maps, map_scores, map_votes, map_fairness
|
||||
- Program tables (evolution): programs
|
||||
- Playlist tables: playlists, playlist_matches
|
||||
- Feedback tables: replay_feedback, feedback_upvotes
|
||||
- Enrichment tables: enrichment_requests
|
||||
|
||||
## Notes
|
||||
The migration file uses clean `CREATE TABLE` statements (not `CREATE TABLE IF NOT EXISTS`), which is the correct approach for an initial migration. The idempotent migrations in `db.go` are appropriate for runtime schema enforcement.
|
||||
## Current State
|
||||
- The embedded schema in `cmd/acb-api/db.go` remains as a runtime convenience (uses `CREATE TABLE IF NOT EXISTS` for idempotency)
|
||||
- The standalone migration file serves as the canonical schema definition and can be used with migration tools
|
||||
- Both sources are equivalent in terms of schema definition
|
||||
|
||||
## No Action Required
|
||||
This bead was filed based on a plan inventory that noted the migration file was missing, but it was created before this bead was picked up.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue