feat: Rename game to soundtrack throughout codebase
- Database migration: rename game table to soundtrack - Rename game_name to soundtrack_name, game_id to soundtrack_id - Update all SQL queries in soundtrack.sql, song.sql, song_list.sql, statistics.sql - Regenerate sqlc code (soundtrack.sql.go, song.sql.go, etc.) - Update backend: music.go, sync.go, statistics.go - Update server: musicHandler.go, syncHandler.go, routes.go - Update frontend: hello.go - Keep URL paths as /games for backward compatibility Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const getSongList = `-- name: GetSongList :many
|
||||
SELECT match_date, match_id, song_no, game_name, song_name
|
||||
SELECT match_date, match_id, song_no, soundtrack_name, song_name
|
||||
FROM song_list
|
||||
WHERE match_date = $1
|
||||
ORDER BY song_no DESC
|
||||
@@ -30,7 +30,7 @@ func (q *Queries) GetSongList(ctx context.Context, matchDate time.Time) ([]SongL
|
||||
&i.MatchDate,
|
||||
&i.MatchID,
|
||||
&i.SongNo,
|
||||
&i.GameName,
|
||||
&i.SoundtrackName,
|
||||
&i.SongName,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
@@ -44,16 +44,16 @@ func (q *Queries) GetSongList(ctx context.Context, matchDate time.Time) ([]SongL
|
||||
}
|
||||
|
||||
const insertSongInList = `-- name: InsertSongInList :exec
|
||||
INSERT INTO song_list (match_date, match_id, song_no, game_name, song_name)
|
||||
INSERT INTO song_list (match_date, match_id, song_no, soundtrack_name, song_name)
|
||||
VALUES ($1, $2, $3, $4, $5)
|
||||
`
|
||||
|
||||
type InsertSongInListParams struct {
|
||||
MatchDate time.Time `json:"match_date"`
|
||||
MatchID int32 `json:"match_id"`
|
||||
SongNo int32 `json:"song_no"`
|
||||
GameName *string `json:"game_name"`
|
||||
SongName *string `json:"song_name"`
|
||||
MatchDate time.Time `json:"match_date"`
|
||||
MatchID int32 `json:"match_id"`
|
||||
SongNo int32 `json:"song_no"`
|
||||
SoundtrackName *string `json:"soundtrack_name"`
|
||||
SongName *string `json:"song_name"`
|
||||
}
|
||||
|
||||
func (q *Queries) InsertSongInList(ctx context.Context, arg InsertSongInListParams) error {
|
||||
@@ -61,7 +61,7 @@ func (q *Queries) InsertSongInList(ctx context.Context, arg InsertSongInListPara
|
||||
arg.MatchDate,
|
||||
arg.MatchID,
|
||||
arg.SongNo,
|
||||
arg.GameName,
|
||||
arg.SoundtrackName,
|
||||
arg.SongName,
|
||||
)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user