feat: add mbid column to artist_settings
Additive migration 008 adds an mbid column to artist_settings, extend the ArtistSettings struct and persistence functions (SaveArtistSettings, GetArtistSettings, GetAllArtistSettings, UpdateArtistSettings) to carry the MusicBrainz ID, and add round-trip tests covering empty and set MBID values.
This commit is contained in:
@@ -125,6 +125,10 @@ func (db *DB) migrate() error {
|
||||
name: "007_index_external_releases_artist_id",
|
||||
sql: `CREATE INDEX IF NOT EXISTS idx_external_releases_artist_id ON external_releases(artist_id);`,
|
||||
},
|
||||
{
|
||||
name: "008_add_mbid_to_artist_settings",
|
||||
sql: `ALTER TABLE artist_settings ADD COLUMN mbid TEXT;`,
|
||||
},
|
||||
}
|
||||
|
||||
for _, m := range migrations {
|
||||
@@ -173,6 +177,7 @@ func (db *DB) isMigrationApplied(name string) (bool, error) {
|
||||
type ArtistSettings struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
MBID string `json:"mbid"`
|
||||
IgnoreSingles bool `json:"ignore_singles"`
|
||||
IgnoreCompilations bool `json:"ignore_compilations"`
|
||||
Monitored bool `json:"monitored"`
|
||||
|
||||
Reference in New Issue
Block a user