fix: address code review findings

This commit is contained in:
2026-07-19 19:52:27 +03:00
parent a7803615cd
commit 0bee9b9b27
6 changed files with 138 additions and 31 deletions

View File

@@ -117,6 +117,10 @@ func (db *DB) migrate() error {
name: "005_add_cached_at_to_external_releases",
sql: `ALTER TABLE external_releases ADD COLUMN cached_at DATETIME;`,
},
{
name: "006_add_secondary_types_to_external_releases",
sql: `ALTER TABLE external_releases ADD COLUMN secondary_types TEXT;`,
},
}
for _, m := range migrations {
@@ -179,13 +183,14 @@ type LocalAlbum struct {
// ExternalRelease represents a row in the external_releases table.
type ExternalRelease struct {
RGID string `json:"rgid"`
ArtistID string `json:"artist_id"`
Title string `json:"title"`
Type string `json:"type"`
ReleaseDate string `json:"release_date"`
IsIgnored bool `json:"is_ignored"`
CachedAt time.Time `json:"cached_at"`
RGID string `json:"rgid"`
ArtistID string `json:"artist_id"`
Title string `json:"title"`
Type string `json:"type"`
ReleaseDate string `json:"release_date"`
IsIgnored bool `json:"is_ignored"`
CachedAt time.Time `json:"cached_at"`
SecondaryTypes []string `json:"secondary_types"`
}
// NotificationSent represents a row in the notifications_sent table.