diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-22 23:16:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-22 23:16:14 +0300 |
| commit | 1c912d5feee218ef46a295c05652f2dc3bd4d1d5 (patch) | |
| tree | 2358d0cffa9c58fabe162b24f6ecb0510898a41b /player-server | |
| parent | c2944be8708f4bb9c687679b4ed63e1398b83f05 (diff) | |
Add migration for missing playback_progress.finished column (5f)
Existing databases created before the finished column was added to the
base schema still satisfied CREATE TABLE IF NOT EXISTS and never got the
column, causing GET /api/v1/media/{id} to fail with
"SQL logic error: no such column: finished" and break media detail view.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'player-server')
| -rw-r--r-- | player-server/internal/repository/schema.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/player-server/internal/repository/schema.go b/player-server/internal/repository/schema.go index 5d97a8b..2330991 100644 --- a/player-server/internal/repository/schema.go +++ b/player-server/internal/repository/schema.go @@ -261,6 +261,15 @@ ALTER TABLE podcast_feeds ADD COLUMN consecutive_failures INTEGER NOT NULL DEFAU ALTER TABLE podcast_feeds ADD COLUMN next_check_at DATETIME; `, }, + { + // Adds the "finished" flag used by GetProgress / SetProgress on the + // playback_progress table. Databases created before this column was + // introduced still satisfy the CREATE TABLE IF NOT EXISTS in the base + // schema, so the column must be added via migration to avoid a 500 on + // GET /api/v1/media/{id} reading from progress. + name: "add_playback_progress_finished", + sql: `ALTER TABLE playback_progress ADD COLUMN finished BOOLEAN NOT NULL DEFAULT 0;`, + }, } // runMigrations applies each migration in order, skipping ones whose SQL |
